Skip to content

build(variants): gate the coin engines behind the bitcoin-only build - #357

Closed
BitHighlander wants to merge 1 commit into
feature/715-15-entropy-rng-dicefrom
feature/715-16-bitcoin-only-variant
Closed

build(variants): gate the coin engines behind the bitcoin-only build#357
BitHighlander wants to merge 1 commit into
feature/715-15-entropy-rng-dicefrom
feature/715-16-bitcoin-only-variant

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

7.15 review stack position 16/17.

This PR is intentionally one coherent commit, based on feature/715-15-entropy-rng-dice, for individual auditing.
The full stack is linear from the clean fork develop at 1af2ffe.

Review scope: build(variants): gate the coin engines behind the bitcoin-only build.

The preserved pre-restage candidate remains available at preserve/alpha-2026-08-05.

Turns the KK_BITCOIN_ONLY flag from a build option into an image that actually
strips what it claims to:

- Coin engines (Ethereum and its contract decoders, Solana, Hive, TRON, TON,
  Ripple, EOS, the Tendermint family, Nano) and the Zcash privacy engine are
  excluded from the bitcoin-only sources, together with their message-map rows,
  handler includes and unit-test suites.
- The always-on Initialize/ClearSession/Cancel handlers still call each engine's
  abort hook and factory reset still clears clear-sign signers, so bitcoin-only
  provides no-op definitions rather than conditionally editing those handlers.
- GetFeatures reports the established KeepKeyBTC / EmulatorBTC variant names so
  existing hosts skip multi-chain-only behaviour, and reports
  bitcoin-only-locked when the wallet on the device was created by bitcoin-only
  firmware and this image must not touch it.
- ChangePin, ChangeWipeCode, LoadDevice and ResetDevice refuse to run against a
  bitcoin-only-locked wallet.
- GetCoinTable omits the token table in the bitcoin-only image.
- Guards use value macros compared with `#if FLAG`, because device builds
  compile with -Wundef -Werror and an undefined identifier there is a hard
  error, not a silent zero.
@BitHighlander

Copy link
Copy Markdown
Owner Author

Superseded by the smaller audit-ready 7.15 stack: #359 release foundation, #360 authenticated clear-signing, #361 recovery and entropy, #362 Zcash Orchard, #363 chain integrations, and #364 Bitcoin/release security. All release changes remain preserved in the replacement branches and preservation tags. The replacement aggregate was tree-verified against the prior release and passed the local CI-equivalent container suite (405 firmware, 2 board, 18 crypto, and 7 Pallas constant-time tests). GitHub-hosted checks have been explicitly dispatched and are currently queued.

@BitHighlander
BitHighlander deleted the feature/715-16-bitcoin-only-variant branch August 9, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant