Commit 19e73c8
committed
feat(solana): KKSOLSW1 lookup-table account attestation tests
Four tests for the transaction-bound attestation that upgrades an ALT
transaction from a blind sign to a described one.
The positive test asserts the SCREEN COUNT, not just that signing succeeded,
and that is the whole reason it was worth writing: it caught a real firmware
bug on first run. nanopb hands each repeated `bytes` element back as a
{size, bytes[32]} struct, and the firmware was casting the array to
(uint8_t(*)[32]) -- hashing the size word plus 28 bytes of the first key. The
signature never verified. A test that only checked "did it sign" would have
passed, because the fallback path signs perfectly well.
test_attested_accounts_are_shown_and_blind_sign_still_follows
base flow + 1 identity screen + 1 per account, and the baseline codes
still present at the TAIL -- the additive invariant, restated for Solana
test_bad_signature_degrades_to_todays_flow
an unverifiable attestation adds nothing and refuses nothing
test_attestation_does_not_replay_onto_another_transaction
the same signature against a perturbed tx describes nothing
test_no_signer_loaded_means_no_extra_screens
trust is opt-in per session; without a provider the payload is inert
Note for whoever extends these: the three negative cases pass trivially if the
signer is not loaded, because "no extra screens" is also what a broken positive
path produces. Only the count assertion in the first test distinguishes them.
That is why it exists, and why it should not be relaxed into "signature is 64
bytes".
messages_solana_pb2.py regenerated for the new tags. It must be generated with
a protoc whose output the pinned protobuf==3.20.3 runtime accepts -- the system
protoc emits code importing google.protobuf.runtime_version, which 3.20 does
not have. grpcio-tools==1.48.2 produces compatible output.1 parent cedad1c commit 19e73c8
2 files changed
Lines changed: 286 additions & 501 deletions
0 commit comments