Skip to content

test: regression coverage for 7.15.0 firmware fixes - #20

Open
BitHighlander wants to merge 2 commits into
masterfrom
feat/regression-tests-7.15.0-fixes
Open

test: regression coverage for 7.15.0 firmware fixes#20
BitHighlander wants to merge 2 commits into
masterfrom
feat/regression-tests-7.15.0-fixes

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

Summary

  • fix/eip1559 (test_msg_ethereum_signtx.py): 3 tests for EIP-1559 signing on Base (8453), Arbitrum One (42161), and Avalanche C-Chain (43114) — chains that were broken by uint8_t overflow of chain_id
  • fix/token-chain-id (test_msg_signtx_ethereum_erc20.py): ERC-20 transfers on Arbitrum and Base with large chain IDs; asserts correct EIP-155 v value
  • fix/eip712-security (test_sign_typed_data.py): New TestEIP712Security class — verifies normal EIP-712 hash signing still works after the security fix (domain+message, and domain-only)
  • feat/ripple-memo (test_msg_ripple_sign_tx.py): Backward-compat test pinning exact serialized bytes for a no-memo send — adding the optional memo field must not change existing encodings
  • feat/thorchain-any-denom (test_msg_thorchain_signtx.py): rune denom backward-compat via the client helper; plus a direct-proto test that skips cleanly if the pb2 hasn't been regenerated yet
  • fix/solana-token-decimals (test_msg_solana_signtx.py): Two TokenTransferChecked tests (decimals=6, decimals=9) verifying instruction-level decimals are used
  • fix/tron-blind-sign (test_msg_tron_signtx.py): Functional smoke test — signing must still return a 65-byte signature after the UX change
  • fix/ton-blind-sign (test_msg_ton_signtx.py): Functional smoke test — signing must still return a 64-byte Ed25519 signature after the UX change

Test plan

  • Run against firmware 7.15.0+ with a real device: all new tests should PASS
  • Run against firmware 7.14.x: tests gated with requires_firmware("7.15.0") will SKIP cleanly
  • python3 -m py_compile passes on all 8 modified files (verified locally)
EIP-1559 (fix/eip1559):
- test_eip1559_base_chain_id: Base mainnet chain_id=8453 (overflows uint8_t)
- test_eip1559_arbitrum_chain_id: Arbitrum One chain_id=42161
- test_eip1559_avalanche_chain_id: Avalanche C-Chain chain_id=43114

Token chain-id (fix/token-chain-id):
- test_erc20_transfer_arbitrum: ERC-20 transfer on Arbitrum (chain_id=42161)
- test_erc20_transfer_base: ERC-20 transfer on Base (chain_id=8453)

EIP-712 security (fix/eip712-security):
- TestEIP712Security.test_eip712_normal_hash_signing_still_works
- TestEIP712Security.test_eip712_hash_signing_no_message_hash

Ripple memo (feat/ripple-memo):
- test_ripple_sign_no_memo_backward_compat: omitting memo must not change serialized bytes

THORChain any-denom (feat/thorchain-any-denom):
- test_thorchain_rune_denom_backward_compat: rune path unchanged after firmware fix
- test_thorchain_msgsend_direct_with_denom: direct proto call with denom (skips if pb2 not updated)

Solana token decimals (fix/solana-token-decimals):
- test_solana_token_transfer_checked_decimals_6: TokenTransferChecked with decimals=6
- test_solana_token_transfer_checked_decimals_9: TokenTransferChecked with decimals=9

TRON blind-sign (fix/tron-blind-sign):
- test_tron_blind_sign_still_completes_after_ux_fix

TON blind-sign (fix/ton-blind-sign):
- test_ton_blind_sign_still_completes_after_ux_fix
Test bugs fixed:
- ETH THORChain deposit: assertIn(sig_v, [27,28]) → [37,38] (EIP-155, chain_id=1)
- TON blind-sign: remove message arg from assertEqual (custom assertEqual takes 2 args)
- TRON blind-sign: same assertEqual fix
- EIP-712 hash signing: fix odd-length hex (63→64 chars, prepend '0')
- XRP no-memo check: b'\xf9' → b'\xf9\xea' (0xF9 appears naturally in DER sigs)

Skip unimplemented alpha features:
- Zcash PCZT Orchard action signing (4 tests): skipTest until feature lands in alpha
- Zcash ZcashDisplayAddress FVK validation (1 test): skipTest until feature lands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant