ragger: fail if a request succeeds without showing the expected screens
What changed, and why it matters
This commit fixes the automated test harness, not the Ledger Bitcoin app itself. Previously, the test framework could silently pass even when the device completed a request without showing the expected on-screen review. The change makes tests fail if the expected screens are not shown, and it tidies up some test instructions. It does not change the security behavior of the device firmware or the wallet application that users interact with.
No user or operator action is required. This is a test-framework quality improvement. Reviewers may want to confirm that the new stricter test checks now pass against the current firmware and that any newly failing tests reflect real UI behavior rather than outdated instruction definitions.
Security signals we found
Test-hardening only: no firmware or runtime application code changed
Fixes false-negative test results where a request could succeed without expected UI review
Corrects scope of navigation settings to avoid leaking across nested or subsequent calls
Removes incorrect navigation instructions for silent MuSig2 round 1
Evidence from the diff
The patch modifies the Ragger-based Python test client (ragger_bitcoin/ragger_bitcoin.py) and several test instruction sets. It introduces a context manager (_navigation) so that navigation state applies only to the current API call and is restored afterward, even on exceptions. It also adds a check in _make_request_with_navigation that raises RuntimeError if a successful APDU response (SW 0x9000) is received before all expected UI navigation steps have been consumed, with an exemption for a final status screen. Several test instruction definitions are corrected to remove redundant steps, and MuSig2 round-1 tests no longer pass signing-review navigation instructions because round 1 is silent. These are test-infrastructure improvements; no device-side code is changed.
Changed components
ragger_bitcoin/ragger_bitcoin.pytests/instructions.pytests/test_e2e_miniscript.pytests/test_e2e_multisig.pytests/test_e2e_musig2.pytests/test_e2e_tapscripts.pytests/test_sign_psbt_musig.pyInspect captured patch +76 / −95
### ragger_bitcoin/ragger_bitcoin.py
@@ -1,4 +1,5 @@
-from typing import Tuple, List, Optional, Union
+from contextlib import contextmanager
+from typing import Iterator, Tuple, List, Optional, Union
from pathlib import Path
from ledger_bitcoin.common import Chain
@@ -9,7 +10,7 @@
from ledger_bitcoin.client import NewClient
from ledger_bitcoin.client_base import print_response, print_apdu, ApduException
-from ragger.navigator import Navigator
+from ragger.navigator import Navigator, NavInsID
from ragger_bitcoin.ragger_instructions import Instructions
from ragger.utils import pack_APDU
@@ -59,6 +60,20 @@ def _make_request(
self, apdu, client_intepreter)
return sw, response
+ @contextmanager
+ def _navigation(self, navigator: Optional[Navigator], testname: str,
+ instructions: Optional[Instructions]) -> Iterator[None]:
+ # Navigation applies to the requests of this call only: not to the requests of a nested
+ # call without a navigator (e.g. the address check in register_wallet), nor to later calls
+ # if this one raises.
+ saved = (self.navigate, self.navigator, self.testname, self.instructions)
+ self.navigate = navigator is not None
+ self.navigator, self.testname, self.instructions = navigator, testname, instructions
+ try:
+ yield
+ finally:
+ self.navigate, self.navigator, self.testname, self.instructions = saved
+
def last_async_response(self) -> Tuple[int, bytes]:
return self.transport_client.last_async_response.status, self.transport_client.last_async_response.data
@@ -123,36 +138,34 @@ def _make_request_with_navigation(self, navigator: Navigator, apdu: dict, client
sw, response, index = self.ragger_navigate(
navigator, apdu, instructions, testname, index)
+
+ # A request that succeeds without showing all the expected screens skipped the review.
+ # A final status screen (e.g. "Transaction signed") does not block the APDU, so it is only
+ # navigated if a later APDU happens to still be pending: it is not required.
+ if sw == 0x9000 and instructions:
+ required = len(instructions.data['text'])
+ if required > 0 and all(i == NavInsID.USE_CASE_STATUS_DISMISS
+ for i in instructions.data['instruction_on_text'][-1]):
+ required -= 1
+ if index < required:
+ raise RuntimeError(
+ f"Request completed after {index} of the {required} expected UI interactions")
return sw, response
def get_extended_pubkey(self, path: str, display: bool = False, navigator: Optional[Navigator] = None,
testname: str = "",
instructions: Instructions = None) -> str:
- if navigator:
- self.navigate = True
- self.navigator = navigator
- self.testname = testname
- self.instructions = instructions
-
- response = NewClient.get_extended_pubkey(self, path, display)
-
- self.navigate = False
+ with self._navigation(navigator, testname, instructions):
+ response = NewClient.get_extended_pubkey(self, path, display)
return response
def register_wallet(self, wallet: WalletPolicy, navigator: Optional[Navigator] = None,
testname: str = "", instructions: Instructions = None) -> Tuple[bytes, bytes]:
- if navigator:
- self.navigate = True
- self.navigator = navigator
- self.testname = testname
- self.instructions = instructions
-
- wallet_id, wallet_hmac = NewClient.register_wallet(self, wallet)
-
- self.navigate = False
+ with self._navigation(navigator, testname, instructions):
+ wallet_id, wallet_hmac = NewClient.register_wallet(self, wallet)
return wallet_id, wallet_hmac
@@ -168,32 +181,18 @@ def get_wallet_address(
testname: str = ""
) -> str:
- if navigator:
- self.navigate = True
- self.navigator = navigator
- self.testname = testname
- self.instructions = instructions
-
- result = NewClient.get_wallet_address(
- self, wallet, wallet_hmac, change, address_index, display)
-
- self.navigate = False
+ with self._navigation(navigator, testname, instructions):
+ result = NewClient.get_wallet_address(
+ self, wallet, wallet_hmac, change, address_index, display)
return result
def sign_psbt(self, psbt: Union[PSBT, bytes, str], wallet: WalletPolicy, wallet_hmac:
Optional[bytes], navigator: Optional[Navigator] = None,
testname: str = "", instructions: Instructions = None) -> List[Tuple[int, PartialSignature]]:
- if navigator:
- self.navigate = True
- self.navigator = navigator
- self.testname = testname
- self.instructions = instructions
-
- result = NewClient.sign_psbt(self, psbt, wallet, wallet_hmac)
-
- self.navigate = False
+ with self._navigation(navigator, testname, instructions):
+ result = NewClient.sign_psbt(self, psbt, wallet, wallet_hmac)
return result
@@ -203,15 +202,8 @@ def sign_message(self, message: Union[str, bytes], bip32_path: str, navigator:
testname: str = ""
) -> str:
- if navigator:
- self.navigate = True
- self.navigator = navigator
- self.testname = testname
- self.instructions = instructions
-
- response = NewClient.sign_message(self, message, bip32_path)
-
- self.navigate = False
+ with self._navigation(navigator, testname, instructions):
+ response = NewClient.sign_message(self, message, bip32_path)
return response
### tests/instructions.py
@@ -140,8 +140,6 @@ def register_wallet_instruction_approve(model: Firmware, save_screenshot=True) -
instructions.new_request("Register account", save_screenshot=save_screenshot)
else:
instructions.choice_confirm(save_screenshot=save_screenshot)
- instructions.choice_confirm(save_screenshot=save_screenshot)
- instructions.choice_confirm(save_screenshot=save_screenshot)
return instructions
@@ -152,8 +150,6 @@ def register_wallet_instruction_approve_no_save(model: Firmware) -> Instructions
instructions.new_request("Register account", save_screenshot=False)
else:
instructions.choice_confirm(save_screenshot=False)
- instructions.choice_confirm(save_screenshot=False)
- instructions.choice_confirm(save_screenshot=False)
return instructions
@@ -164,9 +160,6 @@ def register_wallet_instruction_approve_long(model: Firmware, save_screenshot=Tr
instructions.new_request("Register account", save_screenshot=save_screenshot)
else:
instructions.choice_confirm(save_screenshot=save_screenshot)
- instructions.choice_confirm(save_screenshot=save_screenshot)
- instructions.choice_confirm(save_screenshot=save_screenshot)
- instructions.choice_confirm(save_screenshot=save_screenshot)
return instructions
@@ -177,7 +170,6 @@ def register_wallet_instruction_approve_unusual(model: Firmware) -> Instructions
instructions.new_request("Register account")
else:
instructions.choice_confirm()
- instructions.choice_confirm()
return instructions
@@ -334,15 +326,13 @@ def sign_psbt_instruction_approve_generic(model: Firmware, output_count: int, sa
return instructions
-def e2e_register_wallet_instruction(model: Firmware, n_keys) -> Instructions:
+def e2e_register_wallet_instruction(model: Firmware) -> Instructions:
instructions = Instructions(model)
if model.name.startswith("nano"):
instructions.new_request("Register account", save_screenshot=False)
else:
- for _ in range(n_keys + 1):
- instructions.choice_confirm(save_screenshot=False)
- instructions.choice_confirm(save_screenshot=False)
+ instructions.choice_confirm(save_screenshot=False)
return instructions
### tests/test_e2e_miniscript.py
@@ -174,7 +174,7 @@ def test_e2e_miniscript_one_of_two_1(navigator: Navigator, firmware: Firmware, c
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_one_of_two_2(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -194,7 +194,7 @@ def test_e2e_miniscript_one_of_two_2(navigator: Navigator, firmware: Firmware, c
])
run_test_e2e(navigator, client, wallet_policy, [_], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_2fa(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -214,7 +214,7 @@ def test_e2e_miniscript_2fa(navigator: Navigator, firmware: Firmware, client: Ra
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_decaying_3of3(navigator: Navigator, firmware: Firmware, client:
@@ -236,7 +236,7 @@ def test_e2e_miniscript_decaying_3of3(navigator: Navigator, firmware: Firmware,
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name1, core_wallet_name2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_bolt3_offered_htlc(navigator: Navigator, firmware: Firmware, client:
@@ -259,7 +259,7 @@ def test_e2e_miniscript_bolt3_offered_htlc(navigator: Navigator, firmware: Firmw
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name1, core_wallet_name2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_bolt3_received_htlc(navigator: Navigator, firmware: Firmware, client:
@@ -282,7 +282,7 @@ def test_e2e_miniscript_bolt3_received_htlc(navigator: Navigator, firmware: Firm
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name1, core_wallet_name2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_me_or_3of5(navigator: Navigator, firmware: Firmware, client:
@@ -309,7 +309,7 @@ def test_e2e_miniscript_me_or_3of5(navigator: Navigator, firmware: Firmware, cli
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_me_large_vault(navigator: Navigator, firmware: Firmware, client:
@@ -338,7 +338,7 @@ def test_e2e_miniscript_me_large_vault(navigator: Navigator, firmware: Firmware,
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_me_and_bob_or_me_and_carl_1(navigator: Navigator, firmware: Firmware,
@@ -367,7 +367,7 @@ def test_e2e_miniscript_me_and_bob_or_me_and_carl_1(navigator: Navigator, firmwa
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name1], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_miniscript_policy_with_a(navigator: Navigator, firmware: Firmware, client:
@@ -395,7 +395,7 @@ def test_e2e_miniscript_policy_with_a(navigator: Navigator, firmware: Firmware,
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_invalid_miniscript(navigator: Navigator, firmware: Firmware, client: RaggerClient,
### tests/test_e2e_multisig.py
@@ -161,8 +161,7 @@ def test_e2e_multisig_2_of_2(navigator: Navigator, firmware: Firmware, client: R
)
run_test(navigator, client, wallet_policy, [core_wallet_name], rpc, rpc_test_wallet,
- speculos_globals, e2e_register_wallet_instruction(
- firmware, wallet_policy.n_keys),
+ speculos_globals, e2e_register_wallet_instruction(firmware),
e2e_sign_psbt_instruction(firmware), test_name)
@@ -195,7 +194,7 @@ def test_e2e_multisig_multiple_internal_keys(navigator: Navigator, firmware: Fir
run_test(navigator, client, wallet_policy, [core_wallet_name_3],
rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys),
+ e2e_register_wallet_instruction(firmware),
e2e_sign_psbt_instruction(firmware), test_name)
@@ -229,5 +228,5 @@ def test_e2e_multisig_15keys(navigator: Navigator, firmware: Firmware, client: R
run_test(navigator, client, wallet_policy, core_wallet_names,
rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys),
+ e2e_register_wallet_instruction(firmware),
e2e_sign_psbt_instruction(firmware), test_name)
### tests/test_e2e_musig2.py
@@ -134,9 +134,9 @@ def run_test_e2e_musig2(navigator: Navigator, client: RaggerClient, wallet_polic
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,
- instructions=instructions_sign_psbt,
- testname=f"{test_name}_sign")
+ # Round 1 does not require navigation instructions, since it is silent
+ hww_yielded: List[Tuple[int, SignPsbtYieldedObject]] = client.sign_psbt(
+ psbt_stripped, wallet_policy, wallet_hmac)
for (input_index, yielded) in hww_yielded:
if isinstance(yielded, MusigPubNonce):
@@ -254,7 +254,7 @@ def test_e2e_musig2_keypath(navigator: Navigator, firmware: Firmware, client: Ra
])
run_test_e2e_musig2(navigator, client, wallet_policy, [core_wallet_name], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_musig2_keypath2(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -276,7 +276,7 @@ def test_e2e_musig2_keypath2(navigator: Navigator, firmware: Firmware, client: R
])
run_test_e2e_musig2(navigator, client, wallet_policy, [core_wallet_name], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_musig2_scriptpath(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -298,7 +298,7 @@ def test_e2e_musig2_scriptpath(navigator: Navigator, firmware: Firmware, client:
])
run_test_e2e_musig2(navigator, client, wallet_policy, [core_wallet_name], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_musig2_multi_a_scriptpath(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -324,7 +324,7 @@ def test_e2e_musig2_multi_a_scriptpath(navigator: Navigator, firmware: Firmware,
])
run_test_e2e_musig2(navigator, client, wallet_policy, [core_wallet_name_1, core_wallet_name_2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_musig2_3of3keypath_decaying_scriptpath(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -345,7 +345,7 @@ def test_e2e_musig2_3of3keypath_decaying_scriptpath(navigator: Navigator, firmwa
])
run_test_e2e_musig2(navigator, client, wallet_policy, [core_wallet_name_1, core_wallet_name_2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_musig2_5of5(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -385,7 +385,7 @@ def test_e2e_musig2_5of5(navigator: Navigator, firmware: Firmware, client: Ragge
])
run_test_e2e_musig2(navigator, client, wallet_policy, core_wallet_names, rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_musig_invalid(client: RaggerClient, speculos_globals: SpeculosGlobals):
### tests/test_e2e_tapscripts.py
@@ -176,7 +176,7 @@ def test_e2e_tapscript_one_of_two_keypath(navigator: Navigator, firmware: Firmwa
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapscript_one_of_two_scriptpath(navigator: Navigator, firmware: Firmware, client:
@@ -196,7 +196,7 @@ def test_e2e_tapscript_one_of_two_scriptpath(navigator: Navigator, firmware: Fir
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapscript_one_of_three_keypath(navigator: Navigator, firmware: Firmware, client:
@@ -218,7 +218,7 @@ def test_e2e_tapscript_one_of_three_keypath(navigator: Navigator, firmware: Firm
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapscript_one_of_three_scriptpath(navigator: Navigator, firmware: Firmware, client:
@@ -240,7 +240,7 @@ def test_e2e_tapscript_one_of_three_scriptpath(navigator: Navigator, firmware: F
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapscript_multi_a_2of2(navigator: Navigator, firmware: Firmware, client:
@@ -261,7 +261,7 @@ def test_e2e_tapscript_multi_a_2of2(navigator: Navigator, firmware: Firmware, cl
])
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name2], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapscript_maxdepth(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -290,7 +290,7 @@ def test_e2e_tapscript_maxdepth(navigator: Navigator, firmware: Firmware, client
keys_info=keys_info)
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapscript_large(navigator: Navigator, firmware: Firmware, client: RaggerClient,
@@ -320,7 +320,7 @@ def test_e2e_tapscript_large(navigator: Navigator, firmware: Firmware, client: R
keys_info=keys_info)
run_test_e2e(navigator, client, wallet_policy, [core_wallet_name], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapminiscript_keypath_or_decaying_3of3(navigator: Navigator, firmware: Firmware,
@@ -345,7 +345,7 @@ def test_e2e_tapminiscript_keypath_or_decaying_3of3(navigator: Navigator, firmwa
])
run_test_e2e(navigator, client, wallet_policy, [core_name_2, core_name_3], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapminiscript_with_hash256(navigator: Navigator, firmware: Firmware, client:
@@ -367,7 +367,7 @@ def test_e2e_tapminiscript_with_hash256(navigator: Navigator, firmware: Firmware
])
run_test_e2e(navigator, client, wallet_policy, [core_name_3], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_e2e_tapminiscript_mixed_leaves(navigator: Navigator, firmware: Firmware, client:
@@ -392,7 +392,7 @@ def test_e2e_tapminiscript_mixed_leaves(navigator: Navigator, firmware: Firmware
])
run_test_e2e(navigator, client, wallet_policy, [], rpc, rpc_test_wallet, speculos_globals,
- e2e_register_wallet_instruction(firmware, wallet_policy.n_keys), e2e_sign_psbt_instruction(firmware), test_name)
+ e2e_register_wallet_instruction(firmware), e2e_sign_psbt_instruction(firmware), test_name)
def test_invalid_tapminiscript(navigator: Navigator, firmware: Firmware, client: RaggerClient,
### tests/test_sign_psbt_musig.py
@@ -77,8 +77,8 @@ def get_participant_pubkey(self) -> bip0327.Point:
def generate_public_nonces(self, psbt: PSBT) -> None:
print("PSBT before nonce generation:", psbt.serialize())
- res = self.client.sign_psbt(
- psbt, self.wallet_policy, self.wallet_hmac, navigator=self.navigator, testname=self.testname, instructions=self.instructions)
+ # Round 1 does not require navigation instructions, since it is silent
+ res = self.client.sign_psbt(psbt, self.wallet_policy, self.wallet_hmac)
print("Pubnonces:", res)
for (input_index, yielded) in res:
if isinstance(yielded, MusigPubNonce):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.