Skip to content

Conversation

@satoshiotomakan
Copy link
Collaborator

Description

dev branch contains important fixes of Kotlin Multiplatform memory leaks.

How to test

Integrate pre-release artifacts into a KMP sample/app and run it with a memory profiler.

Types of changes

See the changed files

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

vcoolish and others added 2 commits October 1, 2024 12:18
* Add deinit for KMP iOS and JVM targets

* Add deinit for JS target

* Add deinit for JS target

* Fix JVM native name

* Reuse one thread on JVM

---------

Co-authored-by: satoshiotomakan <[email protected]>
* Fix kmp issue: memory leak found in Base58.decode in iOS

* Remove unused functions

* Fix failed test cases

* Revert "Fix failed test cases"

This reverts commit 57eee39.

* Revert val -> value argument name refactoring

* Output better indentation

* Revert changes in TWEthereumAbiFunction.h

* Fix inconsistent naming

---------

Co-authored-by: satoshiotomakan <[email protected]>
* feat(ton): Add support for TON 24-words mnemonic in Rust

* feat(ton): Add tw_ton_wallet FFIs

* feat(ton): Add TWTONWallet FFI in C++

* feat(ton): Add tonMnemonic StoredKey type

* feat(ton): Add StoredKey TON tests

* feat(ton): Add TWStoredKey TON tests

* feat(ton): Add TONWallet support in Swift

* TODO add iOS tests

* feat(ton): Add `KeyStore` iOS tests

* feat(ton): Add TONWallet support in JavaScript

* Add `KeyStore` TypeScript tests

* feat(ton): Remove `TonMnemonic` structure, replace with a `validate_mnemonic_words` function

* [CI] Trigger CI

* feat(ton): Fix rustfmt

* feat(ton): Fix C++ build

* feat(ton): Fix C++ build

* feat(ton): Fix C++ build

* feat(ton): Fix C++ address analyzer

* feat(ton): Fix C++ tests

* feat(ton): Add Android tests

* feat(ton): Bump `actions/upload-artifact` to v4

* Bump `dawidd6/action-download-artifact` to v6

* feat(eth): Fix PR comments
@10gic
Copy link
Contributor

10gic commented Oct 9, 2024

Thank you very much for auditing. Could you let me know how long the auditing will take?

@10gic
Copy link
Contributor

10gic commented Nov 28, 2024

Hi @satoshiotomakan, I hope you're ready for some holiday magic. Is there any chance we could sprinkle some Christmas cheer by merging this PR into the master branch before Christmas Day? It would be a fantastic gift for our project!

@satoshiotomakan
Copy link
Collaborator Author

Hey @10gic, I would merge right now, but I have to wait for the security audit. Requested one more round one week ago, really hope to give an update ASAP.
If no update next week, I'll push them so to merge it before Christmas Day 👊
Wish we all can sleep well soon :)

@satoshiotomakan satoshiotomakan marked this pull request as ready for review December 19, 2024 16:31
@satoshiotomakan satoshiotomakan marked this pull request as draft December 19, 2024 16:31
@satoshiotomakan satoshiotomakan marked this pull request as ready for review January 3, 2025 14:42
@satoshiotomakan satoshiotomakan merged commit 11d320b into master Jan 3, 2025
27 checks passed
zkrypt-crossbar pushed a commit to Cramiumlabs/wallet-core that referenced this pull request Jun 15, 2025
* Kotlin multiplatform leaking memory (trustwallet#4037)

* Add deinit for KMP iOS and JVM targets

* Add deinit for JS target

* Add deinit for JS target

* Fix JVM native name

* Reuse one thread on JVM

---------

Co-authored-by: satoshiotomakan <[email protected]>

* [KMP] Fix issue: memory leak found in Base58.decode in iOS (trustwallet#4031)

* Fix kmp issue: memory leak found in Base58.decode in iOS

* Remove unused functions

* Fix failed test cases

* Revert "Fix failed test cases"

This reverts commit 57eee39.

* Revert val -> value argument name refactoring

* Output better indentation

* Revert changes in TWEthereumAbiFunction.h

* Fix inconsistent naming

---------

Co-authored-by: satoshiotomakan <[email protected]>

* [TON]: Add support for TON 24-words mnemonic (trustwallet#3998)

* feat(ton): Add support for TON 24-words mnemonic in Rust

* feat(ton): Add tw_ton_wallet FFIs

* feat(ton): Add TWTONWallet FFI in C++

* feat(ton): Add tonMnemonic StoredKey type

* feat(ton): Add StoredKey TON tests

* feat(ton): Add TWStoredKey TON tests

* feat(ton): Add TONWallet support in Swift

* TODO add iOS tests

* feat(ton): Add `KeyStore` iOS tests

* feat(ton): Add TONWallet support in JavaScript

* Add `KeyStore` TypeScript tests

* feat(ton): Remove `TonMnemonic` structure, replace with a `validate_mnemonic_words` function

* [CI] Trigger CI

* feat(ton): Fix rustfmt

* feat(ton): Fix C++ build

* feat(ton): Fix C++ build

* feat(ton): Fix C++ build

* feat(ton): Fix C++ address analyzer

* feat(ton): Fix C++ tests

* feat(ton): Add Android tests

* feat(ton): Bump `actions/upload-artifact` to v4

* Bump `dawidd6/action-download-artifact` to v6

* feat(eth): Fix PR comments

* Fix Java JVM leak (trustwallet#4092)

* [Chore]: Fix Android bindings (trustwallet#4095)

* [Chore]: Add GenericPhantomReference.java

* [Chore]: Fix unnecessary null assertion in WalletCoreLibLoader.kt

* Fix memory lead found in public key in kmp binding (trustwallet#4097)

* Update Callisto explorer (trustwallet#4131)

* Revert "[TON]: Add support for TON 24-words mnemonic (trustwallet#3998)" (trustwallet#4148)

This reverts commit 0b16771.

---------

Co-authored-by: Viacheslav Kulish <[email protected]>
Co-authored-by: 10gic <[email protected]>
zkrypt-crossbar pushed a commit to Cramiumlabs/wallet-core that referenced this pull request Jun 21, 2025
* Kotlin multiplatform leaking memory (trustwallet#4037)

* Add deinit for KMP iOS and JVM targets

* Add deinit for JS target

* Add deinit for JS target

* Fix JVM native name

* Reuse one thread on JVM

---------

Co-authored-by: satoshiotomakan <[email protected]>

* [KMP] Fix issue: memory leak found in Base58.decode in iOS (trustwallet#4031)

* Fix kmp issue: memory leak found in Base58.decode in iOS

* Remove unused functions

* Fix failed test cases

* Revert "Fix failed test cases"

This reverts commit 57eee39.

* Revert val -> value argument name refactoring

* Output better indentation

* Revert changes in TWEthereumAbiFunction.h

* Fix inconsistent naming

---------

Co-authored-by: satoshiotomakan <[email protected]>

* [TON]: Add support for TON 24-words mnemonic (trustwallet#3998)

* feat(ton): Add support for TON 24-words mnemonic in Rust

* feat(ton): Add tw_ton_wallet FFIs

* feat(ton): Add TWTONWallet FFI in C++

* feat(ton): Add tonMnemonic StoredKey type

* feat(ton): Add StoredKey TON tests

* feat(ton): Add TWStoredKey TON tests

* feat(ton): Add TONWallet support in Swift

* TODO add iOS tests

* feat(ton): Add `KeyStore` iOS tests

* feat(ton): Add TONWallet support in JavaScript

* Add `KeyStore` TypeScript tests

* feat(ton): Remove `TonMnemonic` structure, replace with a `validate_mnemonic_words` function

* [CI] Trigger CI

* feat(ton): Fix rustfmt

* feat(ton): Fix C++ build

* feat(ton): Fix C++ build

* feat(ton): Fix C++ build

* feat(ton): Fix C++ address analyzer

* feat(ton): Fix C++ tests

* feat(ton): Add Android tests

* feat(ton): Bump `actions/upload-artifact` to v4

* Bump `dawidd6/action-download-artifact` to v6

* feat(eth): Fix PR comments

* Fix Java JVM leak (trustwallet#4092)

* [Chore]: Fix Android bindings (trustwallet#4095)

* [Chore]: Add GenericPhantomReference.java

* [Chore]: Fix unnecessary null assertion in WalletCoreLibLoader.kt

* Fix memory lead found in public key in kmp binding (trustwallet#4097)

* Update Callisto explorer (trustwallet#4131)

* Revert "[TON]: Add support for TON 24-words mnemonic (trustwallet#3998)" (trustwallet#4148)

This reverts commit 0b16771.

---------

Co-authored-by: Viacheslav Kulish <[email protected]>
Co-authored-by: 10gic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants