From 483b987bf44f34d93771ab18409dceff4c29e6ff Mon Sep 17 00:00:00 2001 From: Otto Allmendinger Date: Tue, 21 Oct 2025 17:18:01 +0200 Subject: [PATCH 1/3] feat: bump miniscript crate to 12.3.4 Co-authored-by: llm-git Issue: BTC-2650 --- packages/wasm-utxo/Cargo.lock | 4 ++-- packages/wasm-utxo/Cargo.toml | 2 +- packages/wasm-utxo/test/opdrop.ts | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/wasm-utxo/Cargo.lock b/packages/wasm-utxo/Cargo.lock index 6adc290..efea235 100644 --- a/packages/wasm-utxo/Cargo.lock +++ b/packages/wasm-utxo/Cargo.lock @@ -149,8 +149,8 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "miniscript" -version = "12.2.0" -source = "git+https://github.com/BitGo/rust-miniscript?branch=opdrop#eb984856a2e560a7ee98b248519eb7ef5d650e5e" +version = "12.3.4" +source = "git+https://github.com/BitGo/rust-miniscript?tag=miniscript-12.3.4-opdrop#4e730b3a1ccc0116e6f6e05ddbf132938cc8395c" dependencies = [ "bech32", "bitcoin", diff --git a/packages/wasm-utxo/Cargo.toml b/packages/wasm-utxo/Cargo.toml index 7554f03..e7f228b 100644 --- a/packages/wasm-utxo/Cargo.toml +++ b/packages/wasm-utxo/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib"] [dependencies] wasm-bindgen = "0.2" js-sys = "0.3" -miniscript = { git = "https://github.com/BitGo/rust-miniscript", branch = "opdrop" } +miniscript = { git = "https://github.com/BitGo/rust-miniscript", tag = "miniscript-12.3.4-opdrop" } [dev-dependencies] base64 = "0.22.1" diff --git a/packages/wasm-utxo/test/opdrop.ts b/packages/wasm-utxo/test/opdrop.ts index ec034da..fdd5f6c 100644 --- a/packages/wasm-utxo/test/opdrop.ts +++ b/packages/wasm-utxo/test/opdrop.ts @@ -13,9 +13,6 @@ function getDescriptorOpDropP2ms(locktime: number, keys: utxolib.BIP32Interface[ } describe("CLV with OP_DROP", function () { - // OP_DROP enabled in this branch - // return; - const locktime = 1024; const descriptor = Descriptor.fromString( getDescriptorOpDropP2ms(locktime, rootWalletKeys.triple), From 4a6ac871553024bb08efb84dd254dc775ad35724 Mon Sep 17 00:00:00 2001 From: Otto Allmendinger Date: Wed, 22 Oct 2025 08:39:48 +0200 Subject: [PATCH 2/3] fix(test): move assertion inside derivable check Moves the assertion that checks `.atDerivationIndex(0)` doesn't throw inside the conditional block that verifies the descriptor is derivable. The new rust-miniscript version fails at the `.atDerivationIndex(0)` call which frankly makes more sense. Issue: BTC-2650 Co-authored-by: llm-git --- packages/wasm-utxo/test/test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/wasm-utxo/test/test.ts b/packages/wasm-utxo/test/test.ts index f74a387..0f1599a 100644 --- a/packages/wasm-utxo/test/test.ts +++ b/packages/wasm-utxo/test/test.ts @@ -99,11 +99,11 @@ describe("Descriptor fixtures", function () { it("should parse (pkType derivable)", async function () { const descriptor = Descriptor.fromString(fixture.descriptor, "derivable"); - assert.doesNotThrow(() => - Descriptor.fromString(fixture.descriptor, "derivable").atDerivationIndex(0), - ); - if (isDerivable(i)) { + assert.doesNotThrow(() => + Descriptor.fromString(fixture.descriptor, "derivable").atDerivationIndex(0), + ); + if (descriptor.descType() !== "Tr") { assert.doesNotThrow(() => descriptor.atDerivationIndex(0).encode()); } From f57bda5f217f3305d2da535460dbfebbbe177054 Mon Sep 17 00:00:00 2001 From: Otto Allmendinger Date: Wed, 22 Oct 2025 08:41:45 +0200 Subject: [PATCH 3/3] test: remove kepicky path from pkh fixture Small difference in miniscript version Issue: BTC-2650 Co-authored-by: llm-git --- packages/wasm-utxo/test/fixtures/2.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/wasm-utxo/test/fixtures/2.json b/packages/wasm-utxo/test/fixtures/2.json index 85dd48a..94675eb 100644 --- a/packages/wasm-utxo/test/fixtures/2.json +++ b/packages/wasm-utxo/test/fixtures/2.json @@ -1,11 +1,11 @@ { - "descriptor": "pkh([deadbeef/1/2'/3/4']03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)#v0p5w8jl", + "descriptor": "pkh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)#wf36a0pg", "wasmNode": { "Pkh": { - "Single": "[deadbeef/1/2'/3/4']03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd" + "Single": "03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd" } }, "ast": { - "pkh": "[deadbeef/1/2'/3/4']03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd" + "pkh": "03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd" } } \ No newline at end of file