1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-09-21 19:04:28 +00:00
Files
bips/bip-0360
Ashwin Goyal 3c8190e11e bip360: bound merkle depth at 128 and replace validation asserts
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.
2026-09-02 23:38:15 +00:00
..