You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge upstream/master (#216) into the 7.15 harness (#197)
#216 landed as one squashed commit whose content had already reached #197 by
another route, so most of the 31 conflicts are the two branches doing the same
thing in different words. Resolved by hand, hunk by hunk; no --ours/--theirs.
Every #216 addition is verified present in the merged tree, including the
files that never conflicted (test_msg_display_disclosure.py, the eip155
vectors, the ripple/ping/tron/eth-signtx disclosure tests, and the
`chain_id is not None` fix in keepkeylib/client.py -- that one matters, it is
what lets an explicit chain_id=0 reach the wire to be refused).
tests/test_sign_typed_data.py (1 hunk) -- #197
Same policy call on both sides; the only difference is `with open(...)` vs
open/close and one extra clause of comment. Nothing asserted differs.
tests/test_msg_thorchain_signtx.py (2 hunks) -- #197, and this one is a real
divergence, not a restatement.
#197 repointed test_sign_eth_add_liquidity at the firmware-pinned THORChain
router (to=0xd37bbe57...); that line auto-merged, so it IS the transaction
the merged test signs. #216 regenerated exact r/s against the OLD
to=0x41e55600.... `to` is an RLP field of the legacy sighash, so #216's
vectors do not describe the transaction under test and would fail. #197's
structural assertions win on those grounds -- NOT because structural is
preferable. They are genuinely weaker than what #216 had, and the superseded
vectors are recorded in a comment at the assertion so the gap is visible and
regenerable on-device. Same treatment for the memo-length hunk: both sides
independently corrected 0x3b -> 0x3a (the memo is 58 bytes; the 59th was ABI
padding), so the comments were combined rather than one dropped.
tests/test_msg_mayachain_signtx.py (2 hunks) -- #197
Same router story (to=0xe3985e6b..., Maya router v4), so #216's exact r/s --
byte-identical to the thorchain pair, same base fixture -- are stale here too.
#197 does not merely relax: it reconstructs the sighash host-side and recovers
the signer, so a wrong digest, wrong calldata or wrong key fails. Taking #216
would also have re-added a stray `)` and restored @unittest.skip on
test_mayachain_remove_liquidity, which #197 unskipped. Raw assertion count in
this file drops 26 -> 13 because seven frozen-vector memo cases became one
loop over the same seven memos and three skipped tests now actually run; memo
coverage is unchanged at nine cases and none of them are skipped any more.
tests/test_msg_ton_signtx.py (9 hunks) -- union
Both sides added the identical AdvancedMode opt-in to nine tests; #216 also
carried the four-line reason. Kept #216's comment and call on all nine.
#197 additionally gated three tests #216 did not -- the reject-path tests --
and those auto-merged; annotated them, because opening the gate is what stops
them passing for the wrong reason (with the gate shut the firmware refuses
every TonSignTx and the raises-assertion is satisfied without the parser ever
validating a field).
scripts/generate-test-report.py (17 hunks) -- #197
Fifteen hunks are section-letter collisions: #216 filed Display Binding under
'S' and Display Disclosure under 'D', but 'S' is already Solana and 'D' is
already BIP-85 Child Derivation, so #216's own catalog carries each letter
twice. #197 assigns 'J' and 'Q' and does not collide; _audit_catalog() asserts
letter and id uniqueness and would have tripped on #216's scheme. Entries are
otherwise identical -- same module, same test, same prose -- so nothing #216
catalogued is lost, only relettered. Fixed one cross-reference #197's rename
left dangling: J13's prose said "the control for S12", which now points at a
Solana test; it means J12. The other two hunks are #197-only additions (the F,
I, L, U, TD sections and MUST_RUN_MODULES) against an empty #216 side.
tests/test_msg_ethereum_erc20_0x_signtx.py -- union, and git got this one wrong
Not one of the 31: it merged clean and merged badly. Both sides inserted an
AdvancedMode opt-in into test__sign_transformERC20 at different offsets, so
the merged file called apply_policy twice in a row. Deduped to one call
carrying both rationales (#216's 1480-bytes-past-the-1024-chunk mechanism,
which is what atlas J1 actually claims, plus #197's no-recognised-handler
note). Folded in the comment #197 left three lines above it saying "No
AdvancedMode policy is set here on purpose", which contradicted its own
apply_policy call and both sides' findings; kept as an explicitly superseded
note rather than deleted, so the behaviour change stays legible.
Verified: 0 conflict markers; every .py under tests/, scripts/ and keepkeylib/
parses; _audit_catalog() passes and the report renders 27 sections / 381
distinct tests; all 383 catalog rows resolve to a test that exists (V17-V67
against CLEARSIGN_FLOWS, which generates those methods by the same transform;
K3-K11 are native gtest suites the JUnit parser handles by bare classname).
Not verified: no test was executed against firmware. The one suite that runs
offline, test_storage_version_gate.py, needs the firmware sources checked out
above this tree and errors in setUp without them -- unchanged by this merge.
'0000000000000000000000000000000000000000000000000000000000000080'+# offset of memo string from 4
208
-
'000000000000000000000000000000000000000000000000000000000000003a'+# length of memo string in bytes (58, not 59: the 59th byte is ABI padding)
208
+
'000000000000000000000000000000000000000000000000000000000000003a'+# length of memo string in bytes (58: ADD:ETH.ETH:<addr>:420; the 59th byte the old 0x3b counted was ABI padding)
'0000000000000000000000000000000000000000000000000000000000000080'+# offset of memo string from 4
140
-
'000000000000000000000000000000000000000000000000000000000000003a'+# length of memo string in bytes (58, not 59: the 59th byte is ABI padding)
140
+
'000000000000000000000000000000000000000000000000000000000000003a'+# length of memo string in bytes (58: ADD:ETH.ETH:<addr>:420; the 59th byte the old 0x3b counted was ABI padding)
0 commit comments