Skip to content

feat(wasm-utxo): add ZEC NU6.2 consensus branch id#288

Merged
davidkaplanbitgo merged 1 commit into
masterfrom
otto/T1-3519-zec-nu62-branch-id
Jun 3, 2026
Merged

feat(wasm-utxo): add ZEC NU6.2 consensus branch id#288
davidkaplanbitgo merged 1 commit into
masterfrom
otto/T1-3519-zec-nu62-branch-id

Conversation

@OttoAllmendinger
Copy link
Copy Markdown
Contributor

What

Adds the NU6.2 Zcash network upgrade to wasm-utxo so transactions built for heights ≥ 3,364,600 carry the correct consensus branch ID.

  • src/zcash/mod.rs: new NetworkUpgrade::Nu6_2 (branch id 0x5437f330, mainnet 3364600, testnet 4052000), added to ALL + params(). branch_id_for_height resolves it automatically.

Why

Zcash activated the NU6.2 hard fork at mainnet block 3,364,600 (≈00:05 EDT 2026-06-03) with a new consensus branch ID 0x5437f330, re-enabling Orchard with a corrected circuit after the GHSA-ghc3-g8w4-whf9 emergency soft fork. The builder previously topped out at NU6.1 (0x4dec4df0); any ZEC tx built at/after the activation height was signed for the stale branch and rejected by upgraded nodes.

Parity-test decoupling (temporary)

The pinned zebra-chain 7.0 does not yet expose NU6.2, so:

  • to_zebra_upgrade now returns Option and returns None for NU6.2; the four parity_with_zebra_chain tests skip it.
  • A dedicated test_nu6_2_constants guards the hardcoded values + the activation boundary (3364599 → NU6.1, 3364600 → NU6.2).

Follow-up: bump zebra-chain 7.0 → 9.0 and re-couple NU6.2 to the parity tests (remove the skip + the standalone guard).

Test

cargo test --lib zcash:: → 26 passed, 0 failed (incl. new test + parity tests). cargo fmt --check + cargo clippy clean.

Notes

  • This is the WASM/utxo-core path, currently shadow-only for ZEC signing. The authoritative withdrawal fix is the parallel @bitgo/utxo-lib (TS) change — also tracked under T1-3519.
  • Requires a WASM rebuild/republish to take effect in consumers.

Refs: T1-3519

Zcash NU6.2 hard fork (mainnet block 3364600) introduced a new consensus branch id 0x5437f330, re-enabling Orchard after the GHSA-ghc3-g8w4-whf9 emergency soft fork. Without it, ZEC transactions built for heights >= 3364600 carry the stale NU6.1 branch id and are rejected by upgraded nodes.

The pinned zebra-chain 7.0 does not yet expose NU6.2, so the value is hardcoded (matching ZcashFoundation/zebra main) and excluded from the zebra parity tests, guarded instead by test_nu6_2_constants until the dependency is bumped (7.0 -> 9.0).

Refs: T1-3519
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 3, 2026

T1-3519

@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review June 3, 2026 15:49
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner June 3, 2026 15:49
@davidkaplanbitgo davidkaplanbitgo merged commit 0fe0da2 into master Jun 3, 2026
17 checks passed
@davidkaplanbitgo davidkaplanbitgo deleted the otto/T1-3519-zec-nu62-branch-id branch June 3, 2026 15:53
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.

3 participants