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.
The t3infosecurity.com domain is being retired, so mail to the address
listed for the first author will stop being delivered. BIP-3 ties several
process outcomes to author reachability: a Draft may be moved to Closed
unless its authors respond within four weeks of being contacted, and an
applicant asking to take over a BIP is appointed by the Editors if the
authors are unreachable or do not respond in a timely manner.
The new address is the one already behind the discussion threads linked in
this BIP's own preamble, so the contact and the discussion record now agree.
Both tables give the properties of a fragment in function of those of its
subexpressions, and both are written assuming that the conditions in the
"Requires" column of that fragment hold. Where they do not, the tables
still assign values, but the values carry none of the meaning the
descriptions of the properties give them, and implementations are free to
differ on them.
thresh is the case that surfaced this. Its rule is "e=all are s", so
thresh(2,or_i(pk(A),pk(B)),a:or_i(pk(C),pk(D))) is "e" even though each
or_i child has two unconditional dissatisfactions, giving the threshold
four, which is the opposite of the "unique unconditional dissatisfaction"
that the description of "e" promises. The threshold fails the "e"
requirement the same table imposes, though, so it is malleable and the
value is a don't-care.
Say so below both tables, so that implementations which disagree on the
type of an invalid or malleable expression are not read as contradicting
this document. Bitcoin Core (bitcoin/bitcoin#36028) and rust-miniscript
are aligning on the values the tables give, and the test vectors proposed
in #2240 leave out the properties that are not meaningful: z/o/n/d/u for
invalid expressions and s/f/e for malleable ones.
In everywhere except the handshake diagram, the transport initialization method name is `initialize_v2_transport`, but was `v2_initialize` in the diagram.
In BIP380 the capital letter H is explicitly defined as an invalid
indicator for a hardened step. The "Invalid expression" section has
explicit examples prefixed "Invalid hardened indicators" that show
"0H/0H/0H" as being wrong.