From 37526ca430f00d74a77757260ab5f6191aa6314d Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Thu, 30 Jul 2026 13:38:40 +0200 Subject: [PATCH] wally: update libwally to v1.5.6 This got fixed in libwally v1.5.2: https://github.com/ElementsProject/libwally-core/commit/7e483c049b0a4405801f010e60c9f0335d2a617f ``` def test_sign_signed_psbt(node_factory, bitcoind, chainparams): l1 = node_factory.get_node() l1.fundwallet(10**6) psbt = l1.rpc.txprepare([{l1.rpc.newaddr('bech32')['bech32']: 10000}])['psbt'] signed_psbt = l1.rpc.signpsbt(psbt)['signed_psbt'] if TEST_NETWORK != 'liquid-regtest': # FIXME: ideally this would succeed, as a noop. But it shouldn't crash > with pytest.raises(RpcError): ^^^^^^^^^^^^^^^^^^^^^^^ E Failed: DID NOT RAISE ``` Changelog-Changed: Update libwally to v1.5.6 Changelog-Fixed: JSON-RPC: `signpsbt` on an already-signed PSBT with taproot paths now succeeds as a no-op instead of failing. --- external/libwally-core | 2 +- tests/test_wallet.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/external/libwally-core b/external/libwally-core index 12f5ac4cc..0c41f38fb 160000 --- a/external/libwally-core +++ b/external/libwally-core @@ -1 +1 @@ -Subproject commit 12f5ac4ccf0e24df90f764db4c516a7ab7b74ad3 +Subproject commit 0c41f38fb1c201786e9c3ac9eae4f5f80c051399 diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 1e7e2a040..54e6b5510 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -983,13 +983,12 @@ def test_sign_signed_psbt(node_factory, bitcoind, chainparams): psbt = l1.rpc.txprepare([{l1.rpc.newaddr('bech32')['bech32']: 10000}])['psbt'] signed_psbt = l1.rpc.signpsbt(psbt)['signed_psbt'] - if TEST_NETWORK != 'liquid-regtest': - # FIXME: ideally this would succeed, as a noop. But it shouldn't crash - with pytest.raises(RpcError): - l1.rpc.signpsbt(signed_psbt)['signed_psbt'] - else: - # Non-taproot works fine. - assert l1.rpc.signpsbt(signed_psbt)['signed_psbt'] == signed_psbt + # libwally >= 1.5.2 ignores duplicate taproot keypath entries + # (issue: ElementsProject/libwally-core#509, + # commit with fix: ElementsProject/libwally-core#7e483c049b0a4405801f010e60c9f0335d2a617f), + # so re-signing an already signed PSBT input is now a noop + # rather than an error, on both bitcoin and liquid. + assert l1.rpc.signpsbt(signed_psbt)['signed_psbt'] == signed_psbt def test_psbt_version(node_factory, bitcoind, chainparams):