-
Notifications
You must be signed in to change notification settings - Fork 63
test(7.15): consolidated Python harness, bindings, and device coverage #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BitHighlander
wants to merge
90
commits into
master
Choose a base branch
from
reconcile/upstream-sync
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
a08dbd9
test(7.15): consolidated Python harness, bindings, and device coverage
BitHighlander d58dc63
fix: address review on the 7.15 harness
BitHighlander e60ce4f
ci(circleci): stop gating python-keepkey on the firmware's C++ suite
BitHighlander c73750c
fix(thorchain): expose version-gated send denoms
BitHighlander 55adaad
test(thorchain): defer denom emulator coverage
BitHighlander be1975c
docs(osmosis): correct the uosmo restriction rationale
pastaghost 70f3055
fix(zcash): validate the transparent signature list
pastaghost 44d82ef
ci(bitcoin-only): actually run the product-boundary suite
pastaghost 73f96be
fix(clearsign-abi): reject Solidity types that do not exist
pastaghost d469ea6
test(ethereum): bind the signing-guard tests to the signed pre-image
pastaghost 9d64a07
ci(tokens): gate the firmware token-table generators
pastaghost f01c36d
ci(firmware): pin the emulator build to an immutable revision
pastaghost 2663fd5
fix(tests): use py3.6-compatible subprocess.run kwargs
BitHighlander 5f872cc
fix(tests): the display-disclosure suite was passing vacuously
BitHighlander 34a1c6c
fix(tests): a v6 fixture must use the real empty-Orchard-bundle digest
BitHighlander b91d87b
test: an oversized multisig signature must be refused
BitHighlander e68a877
fix(tests): end-anchor the token-table row pattern
pastaghost d46a985
fix(clearsign): point the Aave fixtures at the V3 Pool
pastaghost f275388
fix(metadata): make signing preconditions survive python -O
pastaghost bc7eecf
fix(tokens): key deduplication on (chain_id, address)
pastaghost 63484ad
fix(tests): resolve the emulator path before killing it
pastaghost 4e4374b
fix(udp): let the emulator timeout reach the caller
pastaghost 65f69f7
fix(osmosis): version-gate the denom restriction
pastaghost 1db9da2
ci(rc18): run the suite against the release target, non-blocking
pastaghost 7ab558b
fix(tests): follow through on the Aave and precondition changes
pastaghost c477e72
ci(rc18): make the non-blocking job able to report red
pastaghost 3305b80
fix(signing): cover ZIP-229 and ambiguous message acks
BitHighlander 700c36d
ci(rc18): gate post-candidate firmware behavior
BitHighlander e7e39ba
ci(rc18): promote compatibility run to a release gate
BitHighlander 9aaaa84
test(reset): run dice and re-entry coverage from firmware 7.14.3
BitHighlander 85c4d20
test(bitcoin-only): exercise the 7.14.3 product
BitHighlander e353ce5
test(bitcoin-only): skip Maya-only memo coverage
BitHighlander cef50e5
test: cover signing session security boundaries
BitHighlander 84d0213
test: cover authenticator authorization boundaries
BitHighlander 7e39fd5
ci: checkout fork branches from current project
BitHighlander 758f20c
ci: bind companion tests to firmware PR 604
BitHighlander e79c6b8
test(bitcoin-only): gate unsupported 7.15 handlers
BitHighlander c697a25
test(report): respect Bitcoin-only feature boundaries
BitHighlander b532d98
Merge pull request #220 from keepkey/fix/7.15-bitcoin-only-capability…
BitHighlander 621c3dd
merge: carry 7.14.2 regressions into 7.14.3 companion
BitHighlander fc12c6d
test(fixtures): drop noncanonical unused taproot prevtx
BitHighlander ef41fc9
ci: install hermetic fixture network dependency
BitHighlander 4e8f3b5
ci: exercise the 7.14.3 bitcoin-only product
BitHighlander 9a4af72
ci: surface integration test hangs
BitHighlander 5b03b26
merge: reconcile 7.15 tests after 7.14.3 gate
BitHighlander 86831be
ci: permit emulator UDP through offline gate
BitHighlander 29e47e9
Merge commit '86831be' into prepare/715-pyk-reconcile
BitHighlander 7d32a39
ci: run reconciliation branches
BitHighlander 2771e17
fix(report): restore exact screenshot selector CLI
BitHighlander c9cc7d3
merge: carry 7.14.3 report selector fix into 7.15
BitHighlander 3ddc544
test(solana): build canonical stake authorize accounts
BitHighlander 1067497
merge: carry canonical Solana stake authorize test into 7.15
BitHighlander 0014cfb
test(report): align screenshot audit with fail-closed flows
BitHighlander 32b7216
merge: carry screenshot audit fixes into 7.15
BitHighlander 9d69038
fix(report): gate 7.15 storage tests by version
BitHighlander ba2f86f
merge: carry versioned report catalog into 7.15
BitHighlander 34b45fa
feat(report): accept exact evidence provenance
BitHighlander eb26dcb
merge: carry report provenance inputs into 7.15
BitHighlander 68173d8
fix(7.15): preserve session policy and valid auth fixtures
BitHighlander 96c5805
test(7.15): align Solana wire case and OLED baselines
BitHighlander 57642ad
ci(7.15): test against the matching firmware branch
BitHighlander c4fb8bf
test(7.15): assert fail-closed signing contracts
BitHighlander 7598628
Merge audited release Python fixes into upstream sync
BitHighlander 146f341
chore(deps): pin upstream device protocol release head
BitHighlander 004e33a
test(7.14.3): preserve legacy Osmosis release control
BitHighlander 9c39820
fix(report): require Solana LUT coverage from 7.16
BitHighlander 2304a13
test: carry terminal decode rejection into release host suite
BitHighlander a49e704
test: lease exact UDP ports for owned storage emulators
BitHighlander 60ce9f3
test: validate power-cycle storage stamps for both firmware products
BitHighlander 7f46aa2
test: carry independently verified EOS authorization vector to releases
BitHighlander e08d607
test(zcash): exercise capabilities present in canonical 7.15
BitHighlander b625321
test(zcash): require viewing-key consent and reject account aliases
BitHighlander 96a7572
test: enforce the canonical 7.15 capability matrix
BitHighlander 08e491c
test(report): require canonical 7.15 LUT coverage in validator regres…
BitHighlander fb96883
test(ripple): exercise memo serialization on full 7.15
BitHighlander 81b950d
test(ripple): assert displayed address survives debug capture
BitHighlander 8e5eaaa
test(ripple): assert displayed address survives debug capture
BitHighlander 0f4c839
test(ripple): require rejection of unsupported 7.14.3 memo
BitHighlander 7646e85
test(ping): preserve message presence after a debug screen read
BitHighlander f4040d2
test(ping): preserve message presence after a debug screen read
BitHighlander ec828d4
test(reset): collect dice backup words once per logical group
BitHighlander 081fad0
test(reset): collect dice backup words once per logical group
BitHighlander 6268e38
test(storage): preserve CRC framing in migration fixtures
BitHighlander 5dae186
test(storage): preserve CRC framing in migration fixtures
BitHighlander 6e472fc
test: consolidate the 7.14.3 and 7.15 host suites onto one head
BitHighlander 3a81a54
fix(tokens): fail closed when the vetted token source is missing
BitHighlander 4a8c7a4
docs: record the python-keepkey consolidation receipt
BitHighlander 45e19bc
test(reset): branch the entropy screen on actual policy, not a versio…
BitHighlander 8649abe
fix(report): floor the taproot must-run at the release taproot ships in
BitHighlander 7f538a9
test(reset): assert display_random is ignored on every product
BitHighlander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule device-protocol
updated
21 files
| +50 −0 | .github/workflows/ci.yml | |
| +23 −0 | .github/workflows/copilot-review.yml | |
| +179 −0 | lib/messages-ripple_pb.d.ts | |
| +1,425 −0 | lib/messages-ripple_pb.js | |
| +12 −0 | messages-ethereum.options | |
| +189 −0 | messages-ethereum.proto | |
| +58 −0 | messages-hive.options | |
| +220 −0 | messages-hive.proto | |
| +60 −0 | messages-near.proto | |
| +1 −0 | messages-ripple.proto | |
| +4 −0 | messages-solana.options | |
| +65 −0 | messages-solana.proto | |
| +1 −0 | messages-thorchain.proto | |
| +12 −5 | messages-zcash.options | |
| +111 −33 | messages-zcash.proto | |
| +101 −1 | messages.proto | |
| +177 −6 | package-lock.json | |
| +5 −3 | package.json | |
| +70 −0 | tools/check_zcash_contract.py | |
| +1 −0 | types.proto | |
| +183 −28 | yarn.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| """ | ||
| Minimal, deterministic Solidity ABI encoder for STATIC types only. | ||
|
|
||
| Used to build REAL calldata for the clear-sign flow catalog from a function | ||
| signature + argument values, instead of hand-typing hex (which is how bugs | ||
| get shipped in a signing test suite). Selectors are always derived from | ||
| keccak256(signature) here — never trusted from an external source — so a | ||
| wrong/hallucinated selector fails loudly instead of silently producing a | ||
| plausible-looking but wrong test vector. | ||
|
|
||
| Deliberately does NOT support dynamic types (string, bytes, T[], tuples with | ||
| dynamic members) — those need offset/length ABI encoding that's easy to get | ||
| subtly wrong by hand. Calls with dynamic types are hand-built at the call | ||
| site (see clearsign_catalog.py's multicall/handleOps entries) using the | ||
| primitives here (_word/_addr_word) plus an explicit comment that the layout | ||
| is a representative simplification, not a literal captured mainnet tx. | ||
| """ | ||
|
|
||
| from .signed_metadata import keccak256 | ||
|
|
||
|
|
||
| def parse_signature(signature): | ||
| """'supply(address,uint256,address,uint16)' -> ('supply', ['address', 'uint256', 'address', 'uint16'])""" | ||
| name, rest = signature.split('(', 1) | ||
| rest = rest.rsplit(')', 1)[0] | ||
| types = [t.strip() for t in rest.split(',')] if rest.strip() else [] | ||
| return name, types | ||
|
|
||
|
|
||
| def selector(signature): | ||
| """4-byte function selector, always computed — never trusted as input.""" | ||
| return keccak256(signature.encode('ascii'))[:4] | ||
|
|
||
|
|
||
| def _word(value): | ||
| if isinstance(value, str) and value.startswith('0x'): | ||
| value = int(value, 16) | ||
| return int(value).to_bytes(32, 'big') | ||
|
|
||
|
|
||
| def _addr_word(address): | ||
| if isinstance(address, str): | ||
| address = bytes.fromhex(address[2:] if address.startswith('0x') else address) | ||
| assert len(address) == 20, 'address must be 20 bytes, got %d' % len(address) | ||
| return b'\x00' * 12 + address | ||
|
|
||
|
|
||
| def encode_static_args(types, values): | ||
| """ABI-encode STATIC Solidity types into concatenated 32-byte words. | ||
| Raises on any dynamic type (string/bytes/arrays) — build those by hand.""" | ||
| assert len(types) == len(values), ( | ||
| 'arg count mismatch: %d types, %d values' % (len(types), len(values))) | ||
| out = bytearray() | ||
| for typ, val in zip(types, values): | ||
| if typ == 'address': | ||
| out += _addr_word(val) | ||
| elif typ.startswith('uint') or typ.startswith('int'): | ||
| digits = typ[4:] if typ.startswith('uint') else typ[3:] | ||
| bits = int(digits) if digits else 256 | ||
| n = int(val) | ||
| assert 0 <= n < (1 << bits), 'value %r out of range for %s' % (val, typ) | ||
| out += n.to_bytes(32, 'big') | ||
|
BitHighlander marked this conversation as resolved.
Outdated
|
||
| elif typ == 'bool': | ||
| out += (1 if val else 0).to_bytes(32, 'big') | ||
| elif typ.startswith('bytes') and typ != 'bytes' and not typ.endswith('[]'): | ||
| n = int(typ[5:]) | ||
| b = val if isinstance(val, (bytes, bytearray)) else bytes.fromhex( | ||
| val[2:] if val.startswith('0x') else val) | ||
| assert len(b) == n, 'bytes%d value has wrong length' % n | ||
| out += b.ljust(32, b'\x00') # bytesN is left-aligned per ABI spec | ||
| else: | ||
| raise ValueError( | ||
| 'dynamic/unsupported type %r — build this call by hand ' | ||
| '(see module docstring)' % typ) | ||
| return bytes(out) | ||
|
|
||
|
|
||
| def build_calldata(signature, values): | ||
| """selector(signature) + ABI-encoded static args, in one call.""" | ||
| _, types = parse_signature(signature) | ||
| return selector(signature) + encode_static_args(types, values) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only partially complete: d58dc63 restored branch = master, but the gitlink still points to a1a1dda while device-protocol PR #112 remains open. Reopening this thread because the canonical master repin and binding regeneration must wait for that merge.