mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge bitcoin/bitcoin#29412: p2p: Don't process mutated blocks
d8087adc7e[test] IsBlockMutated unit tests (dergoegge)1ed2c98297Add transaction_identifier::size to allow Span conversion (dergoegge)1ec6bbeb8d[validation] Cache merkle root and witness commitment checks (dergoegge)5bf4f5ba32[test] Add regression test for #27608 (dergoegge)49257c0304[net processing] Don't process mutated blocks (dergoegge)2d8495e080[validation] Merkle root malleation should be caught by IsBlockMutated (dergoegge)66abce1d98[validation] Introduce IsBlockMutated (dergoegge)e7669e1343[refactor] Cleanup merkle root checks (dergoegge)95bddb930a[validation] Isolate merkle root checks (dergoegge) Pull request description: This PR proposes to check for mutated blocks early as a defense-in-depth mitigation against attacks leveraging mutated blocks. We introduce `IsBlockMutated` which catches all known forms of block malleation and use it to do an early mutation check whenever we receive a `block` message. We have observed attacks that abused mutated blocks in the past, which could have been prevented by simply not processing mutated blocks (e.g. https://github.com/bitcoin/bitcoin/pull/27608 for which a regression test is included in this PR). ACKs for top commit: achow101: ACKd8087adc7emaflcko: ACKd8087adc7e🏄 fjahr: Code review ACKd8087adc7esr-gi: Code review ACKd8087adc7eTree-SHA512: 618ff4ea7f168e10f07504d3651290efbb1bb2ab3b838ffff3527c028caf6c52dedad18d04d3dbc627977479710930e200f2dfae18a08f627efe7e64a57e535f
This commit is contained in:
@@ -308,6 +308,7 @@ BASE_SCRIPTS = [
|
||||
'wallet_crosschain.py',
|
||||
'mining_basic.py',
|
||||
'feature_signet.py',
|
||||
'p2p_mutated_blocks.py',
|
||||
'wallet_implicitsegwit.py --legacy-wallet',
|
||||
'rpc_named_arguments.py',
|
||||
'feature_startupnotify.py',
|
||||
|
||||
Reference in New Issue
Block a user