* bip-89, bip-114, bip-441: add missing <references/> tag
These three BIPs use <ref> footnotes but never place a <references/>
tag, so GitHub's mediawiki renderer drops the footnote text entirely and
the [n] superscripts link to anchors that do not exist.
Add a Footnotes section as well, so the notes are rendered.
---------
Co-authored-by: Kanan M <kanan@MacBook-Pro-Sanan.local>
- Specification was a level-3 heading and therefore rendered as a
subsection of Motivation; Backward Compatibility, Implementation and
Related Work were one level too deep as well.
- Drop the stray '<' in front of the testnet address tb1pfees9rn5nz.
- 'typea' -> 'type', 'ineherent' -> 'inherent'.
- Add the Copyright section required by BIP 3, matching the
BSD-3-Clause License header.
Line 57 uses a closing </pre> where the opening tag was intended, so
the example TxDP that follows (up to the real </pre> on line 90) is
rendered as prose instead of a preformatted block.
The self-test reads time.clock_gettime_ns(time.CLOCK_MONOTONIC) for
extra_in on even iterations. CPython documents both symbols
"Availability: Unix", so the attribute lookup raises AttributeError on
Windows and python3 reference.py does not run there.
Take extra_in from secrets instead, at a random length, so the self-test
also exercises extra_in of varying length. time has no other use in the
file, so its import goes too.
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.
Restrict codex32-encoded BIP32 master seeds to 16, 20, 24, 28,
32, or 64 bytes. These sizes correspond to the BIP39 entropy
sizes and the 512-bit BIP32 seed produced by BIP39 recovery and provide
minimum six-character length gaps to reduce target length ambiguity
during optional insertion/deletion correction.
Move payload decoding out of the generic codex32 secret definition
and make it application-specific. Define the byte conversion and
length requirements under the master seed format instead.
Additionally:
- Enforce the new valid encoded lengths (48, 54, 61, 67, 74, 127) in
the Python `ms32_decode` in-line reference.
- Remove obsolete short-checksum backward compatibility constraints and
unsupported length test vectors.
- Add test vectors for 160, 192, and 224-bit master seeds
- Update rationale, compatibility, and reference implementation links.
Include the expanded human-readable part when selecting the codex32
checksum. This keeps regular codewords within the 93-symbol BCH period
and rejects the 94- and 95-symbol gap before the long checksum starts
at 96 symbols.
Split regular and long checksum construction and verification so their
periods can be tested independently. Add assertions for both selection
boundaries and the long checksum upper limit.
Refs: https://github.com/bitcoin/bips/pull/2258#issuecomment-5411804501
Note that the purpose of this change is primarily to improve clarity
for implementers and consistency with existing BIPs like BIP-340 and
BIP-327. Under the assumption that reaching a challenge hash with
`e >= n` is negligible, the newly introduced test vectors in the next
commit would also fail without the new rejection branch.