Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btc: update btcd to fix critical block parsing failure #1896

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Oct 10, 2022

This updates the btcd require to v0.23.2, which includes a critical fix to the wire package's block parsing code that resolves a failure to deserialize a block with a script witness item larger than 11000.

There are now blocks on mainnet and testnet that cannot be deserialized with v0.23.1, meaning this is a critical fix for takers who need to find the maker's redeem transaction with compact block filters, and then pull the matching block to extract the spending transaction. either full node or SPV.

See mainnet block 0000000000000000000400a35a007e223a7fb8a622dc7b5aa5eaace6824291fb containing and enormous 998-of-999 tapscript multisig in txn 7393096d97bfee8660f4100ffd61874d62f9a65de9fb6acf740c4c386990ef73.

See also testnet block 0000000000000032fcf519b61aad2b966348e3f2d27687b26277933cc9881965 containing taproot transaction
44692bc2da73192cd0b89bc7a43c0ce43578f6b3567bc945e46e6952e8ec5ca5.

See btcsuite/btcd#1896

The simnet-trade-tests are broken on master for some time now, so we'll have to rely on the test results for the backport branch (#1897).

@jholdstock
Copy link
Member

I guess this issue was limited to btcd and is not present on bitcoind?

@chappjc
Copy link
Member Author

chappjc commented Oct 10, 2022

It affects any client using btcd/wire, so it affects dex users with bitcoind.

This updates the btcd require to v0.23.2, which includes a critical fix
to the wire package's block parsing code that resolves a failure to
deserialize a block with a script witness item larger than 11000.

There are now blocks on mainnet and testnet that cannot be deserialized
with v0.23.1, meaning this is a critical fix for takers who need to
find the maker's redeem transaction and pull the block containing the
spending transaction. For SPV, only the matching block is pulled.
For a full node RPC wallet, the blocks are pulled in sequence and each
transaction is checked directly. As such, the issue affects both types
of wallet clients.

See mainnet block 0000000000000000000400a35a007e223a7fb8a622dc7b5aa5eaace6824291fb
containing and enormous 998-of-999 tapscript multisig in txn
7393096d97bfee8660f4100ffd61874d62f9a65de9fb6acf740c4c386990ef73.

See also testnet block 0000000000000032fcf519b61aad2b966348e3f2d27687b26277933cc9881965
containing taproot transaction
44692bc2da73192cd0b89bc7a43c0ce43578f6b3567bc945e46e6952e8ec5ca5.

This also updates the btcwallet require from 0.15.1 to 0.16.1.

This also adds a new test with the above mainnet block and transaction
as test vectors.
@chappjc chappjc merged commit faf28ca into decred:master Oct 10, 2022
@chappjc chappjc deleted the btc-witness-item-size-fix branch October 10, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants