mirror of
https://github.com/bitcoin/bips.git
synced 2026-09-21 19:04:28 +00:00
The control block length rule in Script Validation caps m at 128, but compute_merkle_root and compute_control_block applied no depth bound, so a 129-deep tree produced a 4129-byte control block for an output consensus must reject as unspendable. Structural validation also used assert, which python -O strips: a malformed 3-child branch silently returned the root of its first two leaves rather than raising, dropping a script leaf from the commitment. Adds negative_structure_tests covering both, run from BIP360_tests.