feat(utxo-lib): add ZEC NU6.2 consensus branch id#8932
Merged
Conversation
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
8b13848 to
216825c
Compare
davidkaplanbitgo
approved these changes
Jun 3, 2026
lcovar
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the NU6.2 Zcash consensus branch ID to
@bitgo/utxo-libso transactions built for the post-upgrade chain are signed for the correct branch.NU6_2_BRANCH_ID = 0x5437f330, version markersVERSION4_BRANCH_NU6_2 = 457/VERSION5_BRANCH_NU6_2 = 552.getDefaultConsensusBranchIdForVersion,getDefaultVersionGroupIdForVersion,setPsbtDefaults, and bothsetDefaultsForVersionswitches (builder + PSBT).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 --noEmitclean; 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-utxochange (BitGoWASM #288) covers the shadow path.Refs: T1-3519