Skip to content

feat(utxo-lib): add ZEC NU6.2 consensus branch id#8932

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

feat(utxo-lib): add ZEC NU6.2 consensus branch id#8932
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 consensus branch ID to @bitgo/utxo-lib so transactions built for the post-upgrade chain are signed for the correct branch.

  • NU6_2_BRANCH_ID = 0x5437f330, version markers VERSION4_BRANCH_NU6_2 = 457 / VERSION5_BRANCH_NU6_2 = 552.
  • Wired through getDefaultConsensusBranchIdForVersion, getDefaultVersionGroupIdForVersion, setPsbtDefaults, and both setDefaultsForVersion switches (builder + PSBT).
  • Mainnet default build version bumped to NU6.2; testnet stays NU6.1 (its NU6.2 activation, block 4,052,000, has not been reached — the testnet default-version test is unchanged).

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 defaulted to NU6.1 (0x4dec4df0); any ZEC tx built at/after the activation height carried a stale branch ID and was rejected by upgraded nodes — breaking all ZEC withdrawals. (Inbound deposits are unaffected; we don't build those.)

Test

New test/bitgo/zcash/consensusBranchId.ts: mainnet defaults to NU6.2 (0x5437f330), bare v4/v5 mainnet → NU6.2, testnet stays NU6.1, explicit NU6.1 versions still resolve. tsc --noEmit clean; 21 zcash tests pass; prettier/eslint clean (no new warnings).

Deploy / last mile

This is the authoritative ZEC signing path. To actually fix withdrawals it must propagate: utxo-lib → abstract-utxo → sdk-coin-zec → BitGoExpress / wallet-platform (version bumps + deploy). The parallel wasm-utxo change (BitGoWASM #288) covers the shadow path.

Refs: T1-3519

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 3, 2026

T1-3519

lcovar
lcovar previously approved these changes Jun 3, 2026
Zcash NU6.2 activated on mainnet at block 3364600, introducing 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 defaulted to NU6.1 (0x4dec4df0), so transactions built for
heights >= 3364600 carried a stale branch id and were rejected by
upgraded nodes.

Add VERSION4/5_BRANCH_NU6_2 markers (457/552) and the 0x5437f330 branch
id, wire it through getDefaultConsensusBranchIdForVersion,
getDefaultVersionGroupIdForVersion, setPsbtDefaults, and both
setDefaultsForVersion switches. Bump the mainnet default build version
to NU6.2; testnet stays on NU6.1 because its NU6.2 activation
(block 4052000) has not been reached.

Regenerate the zcash PSBT signing fixtures: the consensus branch id
feeds the transaction sighash, so the serialized PSBTs and signatures
change with the new default.

Refs: T1-3519
@lcovar lcovar marked this pull request as ready for review June 3, 2026 16:06
@lcovar lcovar requested a review from a team as a code owner June 3, 2026 16:06
@davidkaplanbitgo davidkaplanbitgo merged commit f9604a0 into master Jun 3, 2026
22 checks passed
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