Ensure the version of the transaction is 2 for all e2e tests
What changed, and why it matters
This commit only changes automated test files. It forces the test transactions to use Bitcoin transaction version 2 so that a test helper called combinepsbt works correctly. There is no change to the actual Ledger app code that users run, and no security fix or vulnerability is present in the diff.
No security action needed. Treat as a normal test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies four end-to-end Python test files to set psbt.tx.nVersion = 2 after deserializing a PSBT and before re-serializing it. The commit message explains that some PSBTs produced by walletcreatefundedpsbt had nVersion = 1, which caused combinepsbt to fail because the sighash differs. This is a test-suite consistency change only; no firmware or library code is altered.
Changed components
tests/test_e2e_miniscript.pytests/test_e2e_multisig.pytests/test_e2e_musig2.pytests/test_e2e_tapscripts.pyInspect captured patch +8 / −0
diff --git a/tests/test_e2e_miniscript.py b/tests/test_e2e_miniscript.py
index bd53dc1..e273577 100644
--- a/tests/test_e2e_miniscript.py
+++ b/tests/test_e2e_miniscript.py
@@ -104,6 +104,8 @@ def run_test_e2e(navigator: Navigator, client: RaggerClient, wallet_policy: Wall
psbt = PSBT()
psbt.deserialize(psbt_b64)
+ psbt.tx.nVersion = 2 # Ensure transaction version 2 (walletcreatefundedpsbt may produce version 1)
+ psbt_b64 = psbt.serialize()
hww_sigs = client.sign_psbt(psbt, wallet_policy, wallet_hmac, navigator,
instructions=instructions_sign_psbt,
diff --git a/tests/test_e2e_multisig.py b/tests/test_e2e_multisig.py
index 6838a48..e6c9eda 100644
--- a/tests/test_e2e_multisig.py
+++ b/tests/test_e2e_multisig.py
@@ -104,6 +104,8 @@ def run_test(navigator: Navigator, client: RaggerClient, wallet_policy: WalletPo
psbt = PSBT()
psbt.deserialize(psbt_b64)
+ psbt.tx.nVersion = 2 # Ensure transaction version 2 (walletcreatefundedpsbt may produce version 1)
+ psbt_b64 = psbt.serialize()
hww_sigs = client.sign_psbt(psbt, wallet_policy, wallet_hmac, navigator,
instructions=instructions_sign_psbt,
diff --git a/tests/test_e2e_musig2.py b/tests/test_e2e_musig2.py
index 44c2c7c..87d05fd 100644
--- a/tests/test_e2e_musig2.py
+++ b/tests/test_e2e_musig2.py
@@ -130,6 +130,8 @@ def run_test_e2e_musig2(navigator: Navigator, client: RaggerClient, wallet_polic
psbt = PSBT()
psbt.deserialize(psbt_b64)
+ psbt.tx.nVersion = 2 # Ensure transaction version 2 (walletcreatefundedpsbt may produce version 1)
+ psbt_b64 = psbt.serialize()
psbt_stripped = strip_non_musig2_derivations(psbt)
hww_yielded: List[Tuple[int, SignPsbtYieldedObject]] = client.sign_psbt(psbt_stripped, wallet_policy, wallet_hmac, navigator,
diff --git a/tests/test_e2e_tapscripts.py b/tests/test_e2e_tapscripts.py
index 0699d48..821b915 100644
--- a/tests/test_e2e_tapscripts.py
+++ b/tests/test_e2e_tapscripts.py
@@ -101,6 +101,8 @@ def run_test_e2e(navigator: Navigator, client: RaggerClient, wallet_policy: Wall
psbt = PSBT()
psbt.deserialize(psbt_b64)
+ psbt.tx.nVersion = 2 # Ensure transaction version 2 (walletcreatefundedpsbt may produce version 1)
+ psbt_b64 = psbt.serialize()
hww_sigs = client.sign_psbt(psbt, wallet_policy, wallet_hmac, navigator,
instructions=instructions_sign_psbt,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.