Skip to content

Commit f01c36d

Browse files
committed
ci(firmware): pin the emulator build to an immutable revision
Both integration jobs cloned BitHighlander/keepkey-firmware at `alpha`, a moving branch. A firmware push could therefore change this PR's result with no Python commit, which makes any green run unciteable as evidence. Pin both to a710bb57. That SHA is alpha at the time of pinning, and it is 7.16.0 -- NOT 7.15.0/RC18. The suite needs firmware that only exists after RC18: variant_getName() returning "EmulatorBTC", which requires_bitcoinOnly() and therefore the whole integration-btc job depend on, and the Ironwood known-answer vectors. Pinning to audit/7.15.0-rc18-final would fail both. The comment says so, so the next reader does not mistake a green run for validation of the RC18 dependency graph. Also gate the two Ironwood device tests to 7.16.0. The class-level requires_firmware("7.15.0") is a floor, so they would otherwise run against RC18, whose zcash.cpp has no IronwoodNoteCommitment_V3KnownVector. This is a firmware-support gate, not a wire-contract one: messages-zcash.proto marks only sapling_digest reserved-and-rejected.
1 parent 9d64a07 commit f01c36d

2 files changed

Lines changed: 38 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,17 @@ jobs:
113113
uses: actions/checkout@v4
114114
with:
115115
repository: BitHighlander/keepkey-firmware
116-
ref: alpha
116+
# PINNED, not `alpha`. A moving branch means a firmware push can
117+
# change this PR's result with no Python commit, which makes a green
118+
# run unciteable. This SHA is alpha at the time of pinning.
119+
#
120+
# NOTE: this is 7.16.0, NOT 7.15.0/RC18. The suite needs firmware
121+
# that only exists after RC18 -- variant_getName() returning
122+
# "EmulatorBTC" (required by requires_bitcoinOnly, so by the whole
123+
# integration-btc job) and the Ironwood known-answer vectors. So this
124+
# job validates 7.16.0; it does not validate the RC18 dependency
125+
# graph. Bump deliberately, and re-read that claim when you do.
126+
ref: a710bb5777f3ad888bb489b383dbafab800d55c6
117127
path: keepkey-firmware
118128

119129
# NOT `submodules: recursive`. trezor-firmware carries a micropython
@@ -334,7 +344,17 @@ jobs:
334344
uses: actions/checkout@v4
335345
with:
336346
repository: BitHighlander/keepkey-firmware
337-
ref: alpha
347+
# PINNED, not `alpha`. A moving branch means a firmware push can
348+
# change this PR's result with no Python commit, which makes a green
349+
# run unciteable. This SHA is alpha at the time of pinning.
350+
#
351+
# NOTE: this is 7.16.0, NOT 7.15.0/RC18. The suite needs firmware
352+
# that only exists after RC18 -- variant_getName() returning
353+
# "EmulatorBTC" (required by requires_bitcoinOnly, so by the whole
354+
# integration-btc job) and the Ironwood known-answer vectors. So this
355+
# job validates 7.16.0; it does not validate the RC18 dependency
356+
# graph. Bump deliberately, and re-read that claim when you do.
357+
ref: a710bb5777f3ad888bb489b383dbafab800d55c6
338358
path: keepkey-firmware
339359

340360
# Same non-recursive init as the regular job: trezor-firmware's

tests/test_msg_zcash_sign_pczt_device.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,28 @@ def test_note_commitment_binds_the_recipient(self):
280280
self.client.zcash_sign_pczt(**sign_kwargs(actions))
281281
self.assertIn('commitment mismatch', str(caught.exception))
282282

283+
# The Ironwood pool is NOT part of the 7.15/RC18 product. The note
284+
# fixtures below come from unittests/firmware/zcash.cpp, and
285+
# IronwoodNoteCommitment_V3KnownVector does not exist on the RC18 branch
286+
# (audit/7.15.0-rc18-final) -- it arrives with 7.16. The class-level
287+
# requires_firmware("7.15.0") is a FLOOR, so without this these two would
288+
# run against RC18 and fail. Gate them to the release that implements the
289+
# pool, so RC18 skips instead.
290+
#
291+
# NB: this is about firmware support, not the wire contract.
292+
# messages-zcash.proto marks only `sapling_digest` as reserved and
293+
# currently rejected; `shielded_pool` and `ironwood_digest` are ordinary
294+
# v6 fields there.
295+
IRONWOOD_FIRMWARE = "7.16.0"
296+
283297
def test_pool_selection_is_honoured(self):
284298
"""The same note commits differently in each pool.
285299
286300
Orchard and Ironwood derive a different cmx from identical inputs, so
287301
offering the Orchard commitment while declaring the Ironwood pool must
288302
be rejected. If the device ignored shielded_pool this would pass.
289303
"""
304+
self.requires_firmware(self.IRONWOOD_FIRMWARE)
290305
actions = [note_action(CMX_ORCHARD)]
291306

292307
with self.assertRaises(Exception) as caught:
@@ -299,6 +314,7 @@ def test_ironwood_note_is_accepted(self):
299314
The positive half of the pool test -- together they prove the branch is
300315
selected by shielded_pool rather than one path serving both.
301316
"""
317+
self.requires_firmware(self.IRONWOOD_FIRMWARE)
302318
actions = [note_action(CMX_IRONWOOD)]
303319
screens = self._capture_button_screens()
304320

0 commit comments

Comments
 (0)