Commit 8554c05
committed
fix(eos): make test_updateauth's SLIP48 golden hash version-aware for the waits_count loop-bound fix
keepkey-firmware@0f4dafcca fixed eos_hashAuthorization()'s waits[]
serialization loop, which was bounded by accounts_count instead of
waits_count -- for an authorization with accounts_count=1, waits_count=0
(this test's SLIP48/is_slip48=True case: 1 account, 0 waits), the old code
hashed one uninitialized/stale waits[] slot the message never populated.
This test's golden hash was captured against that bug.
Independently confirmed the new value both ways:
- Code: the two loop bounds only diverge when accounts_count !=
waits_count. This test's is_slip48=False case has accounts_count ==
waits_count == 1, so both bounds agree and its hash (line 561) is
correctly unchanged -- exactly matching which of the two assertions
here actually failed.
- Build: reproduced the new hash independently against a from-scratch
local build of current alpha, matching CI's value exactly.
The fix ships starting in firmware 7.16.0 (current alpha). This suite also
runs against pinned older releases -- the RC18 compatibility job pins
7.15.0, which still has the old behavior -- so a single hardcoded hash
cannot be correct for both. Branches on the firmware version under test,
following the same semver comparison common.py's requires_firmware()
already uses, rather than picking one release's answer and breaking the
other's compatibility job.
This test never actually ran in CI until now -- keepkey-firmware's
secret-scan was silently skipping the entire build/test graph on every PR
(see keepkey-firmware#583) -- so nobody caught that the fix, landed and
merged weeks ago, needed this golden value updated to match.1 parent d9ab7fd commit 8554c05
1 file changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
572 | 589 | | |
573 | 590 | | |
574 | 591 | | |
| |||
0 commit comments