From ce15a9cc4f421039fae9244c13e57c836ad5f273 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Sat, 25 Oct 2025 15:34:35 +0300 Subject: [PATCH 1/4] Bump tiny-bip39 from 1.0.1 to 2.0.0 --- Cargo.lock | 24 ++++++++++++++++++++---- Cargo.toml | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79d26799d..db25d547a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,7 +1514,7 @@ dependencies = [ "sha3 0.10.8", "sp-core", "thiserror 2.0.17", - "tiny-bip39", + "tiny-bip39 2.0.0", ] [[package]] @@ -3738,7 +3738,7 @@ dependencies = [ "sp-runtime", "sp-timestamp", "thiserror 2.0.17", - "tiny-bip39", + "tiny-bip39 2.0.0", "tokio", "tracing", "try-runtime-cli", @@ -8134,7 +8134,7 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror 1.0.69", - "tiny-bip39", + "tiny-bip39 1.0.1", "tokio", ] @@ -9759,7 +9759,7 @@ dependencies = [ "ss58-registry", "substrate-bip39", "thiserror 1.0.69", - "tiny-bip39", + "tiny-bip39 1.0.1", "zeroize", ] @@ -10784,6 +10784,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "tiny-bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a30fd743a02bf35236f6faf99adb03089bb77e91c998dac2c2ad76bb424f668c" +dependencies = [ + "once_cell", + "pbkdf2 0.12.2", + "rustc-hash", + "sha2 0.10.8", + "thiserror 1.0.69", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + [[package]] name = "tiny-keccak" version = "2.0.2" diff --git a/Cargo.toml b/Cargo.toml index f06db835a..8c743c1eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ similar-asserts = { version = "1", default-features = false } static_assertions = { version = "1", default-features = false } syn = { version = "2", default-features = false } thiserror = { version = "2.0.17", default-features = false } -tiny-bip39 = { version = "1", default-features = false } +tiny-bip39 = { version = "2", default-features = false } tokio = { version = "1", default-features = false } tracing = { version = "0.1", default-features = false } tracing-test = { version = "0.2", default-features = false } From faec3c90d522ecee4209ce5ceac3c520919eda4b Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Sat, 25 Oct 2025 15:35:17 +0300 Subject: [PATCH 2/4] Update features snapshot --- utils/checks/snapshots/features.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/checks/snapshots/features.yaml b/utils/checks/snapshots/features.yaml index d010e860e..b76127c35 100644 --- a/utils/checks/snapshots/features.yaml +++ b/utils/checks/snapshots/features.yaml @@ -3357,6 +3357,8 @@ - korean - rand - spanish +- name: tiny-bip39 2.0.0 + features: [] - name: tiny-keccak 2.0.2 features: - default From cd69aaec9ebeaf7d3e1cf6bae2f36f0d2baaea1b Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Sat, 25 Oct 2025 15:38:36 +0300 Subject: [PATCH 3/4] Apply changes related to 46 RP at tiny-bip39 --- Cargo.lock | 1 - crates/crypto-utils-evm/Cargo.toml | 1 - crates/crypto-utils-evm/src/lib.rs | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db25d547a..b415483f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1507,7 +1507,6 @@ dependencies = [ name = "crypto-utils-evm" version = "0.1.0" dependencies = [ - "anyhow", "bip32", "hex-literal", "libsecp256k1", diff --git a/crates/crypto-utils-evm/Cargo.toml b/crates/crypto-utils-evm/Cargo.toml index 2e629e01a..80957c7cb 100644 --- a/crates/crypto-utils-evm/Cargo.toml +++ b/crates/crypto-utils-evm/Cargo.toml @@ -8,7 +8,6 @@ publish = false ignored = ["tiny-bip39"] [dependencies] -anyhow = { workspace = true } bip32 = { workspace = true, features = ["default"] } libsecp256k1 = { workspace = true } sha3 = { workspace = true, features = ["default"] } diff --git a/crates/crypto-utils-evm/src/lib.rs b/crates/crypto-utils-evm/src/lib.rs index b30137bf0..600f7599d 100644 --- a/crates/crypto-utils-evm/src/lib.rs +++ b/crates/crypto-utils-evm/src/lib.rs @@ -42,7 +42,7 @@ pub enum FromMnemonicBip44Error { pub enum FromPhraseBip44 { /// Mnemonic parsing failed. #[error("mnemonic: {0}")] - Mnemonic(anyhow::Error), + Mnemonic(bip39::ErrorKind), /// Inner [`KeyData::from_mnemonic_bip44`] call failed. #[error(transparent)] FromMnemonicBip44(FromMnemonicBip44Error), From 667a42445f449fa773b1c8aad27ffb43928868ed Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Sat, 25 Oct 2025 15:52:16 +0300 Subject: [PATCH 4/4] Apply changes related to 42 RP at tiny-bip39 --- Cargo.lock | 1 + crates/humanode-peer/Cargo.toml | 2 +- utils/checks/snapshots/features.yaml | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b415483f6..f1f0a8f68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10791,6 +10791,7 @@ checksum = "a30fd743a02bf35236f6faf99adb03089bb77e91c998dac2c2ad76bb424f668c" dependencies = [ "once_cell", "pbkdf2 0.12.2", + "rand 0.8.5", "rustc-hash", "sha2 0.10.8", "thiserror 1.0.69", diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index 1538df368..5f5600cc8 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -74,7 +74,7 @@ sp-panic-handler = { workspace = true } sp-runtime = { workspace = true } sp-timestamp = { workspace = true } thiserror = { workspace = true } -tiny-bip39 = { workspace = true } +tiny-bip39 = { workspace = true, features = ["rand"] } tokio = { workspace = true, features = ["full"] } tracing = { workspace = true } try-runtime-cli = { workspace = true, optional = true } diff --git a/utils/checks/snapshots/features.yaml b/utils/checks/snapshots/features.yaml index b76127c35..52ecf2f53 100644 --- a/utils/checks/snapshots/features.yaml +++ b/utils/checks/snapshots/features.yaml @@ -3358,7 +3358,8 @@ - rand - spanish - name: tiny-bip39 2.0.0 - features: [] + features: + - rand - name: tiny-keccak 2.0.2 features: - default