BitGo / bitgo-utxo-lib

UTXO coins functions implemented in pure JavaScript
83 stars 142 forks source link

Handling of Zcash consensus branch ID will cause problems for future upgrades that don't change tx version #61

Open daira opened 4 years ago

daira commented 4 years ago

See https://github.com/BitGo/bitgo-utxo-lib/commit/7707109be4b232873b6fc70513662d1c17f59b07#commitcomment-36629702 :

This will work for now, but it's not the ideal way to code this. In general you're assuming that the consensus branch ID is determined by the transaction version, which will cause a problem for any upgrade that doesn't change the tx version (as Blossom didn't). Furthermore there could be multiple tx versions valid at the same time, but the consensus branch ID changes at the upgrade regardless of which tx version is actually used.

OttoAllmendinger commented 4 years ago

thanks for the heads up!

zquestz commented 4 years ago

Just a note, this already happened on testnet.

// Fix the consensusBranchId to the latest valid value.
bitgo.networks.zcashTest.consensusBranchId['4'] = 0xf5b9230b
dractw commented 3 years ago

And happened once again with 0xe9ff75a6 :)