Skip to content

bip360: fix stale links, version header and a size example label - #2221

Merged
jonatack merged 1 commit into
bitcoin:masterfrom
jeanpablojp:bip360-fix-links
Aug 2, 2026
Merged

bip360: fix stale links, version header and a size example label#2221
jonatack merged 1 commit into
bitcoin:masterfrom
jeanpablojp:bip360-fix-links

Conversation

@jeanpablojp

@jeanpablojp jeanpablojp commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Small doc fixes in bip-0360.mediawiki, noticed while implementing against the published vectors:

  • The Test Vectors section linked P2MR_construction.json; the file on disk is lowercase p2mr_construction.json, so the link 404s.
  • The same section still linked the rust implementation under bip-0360/ref-impl/rust, which bip360: add python example impl, drop Rust/JS ones; test vector fixes #2202 moved out of the repository. Kept the python link and adjusted the sentence around it.
  • The header said Version: 0.12.0 while the changelog's latest entry is 0.12.1.
  • The 135-byte depth-1 witness example labeled the merkle path "(empty)" while counting 32 bytes for it. A depth-1 path has one 32-byte node.

Two things I left unchanged because they affect consumers' parsers: the schema mixes given.scriptTree (most vectors) with given.script_tree (the missing-tree error vectors), and a missing tree is encoded both as null and as an empty string. Happy to normalize those too if there is a preferred spelling.

- The Test Vectors section linked P2MR_construction.json; the file on
  disk is lowercase p2mr_construction.json, so the link 404s.
- The same section still linked the rust implementation under
  bip-0360/ref-impl/rust, which bitcoin#2202 moved out of the repository.
- The header said Version: 0.12.0 while the changelog's latest entry
  is 0.12.1.
- The 135-byte depth-1 witness example labeled the merkle path
  "(empty)" while counting 32 bytes for it (a depth-1 path has one
  32-byte node).
@jonatack jonatack added Bug fix Link fix Fixups Minor fixups not worth bothering the BIP author(s) for labels Jul 27, 2026

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, good fixups (thanks!)

Comment thread bip-0360.mediawiki
[size] signature (1 + 64 bytes = 65 bytes),
leaf script = [size] [OP_PUSHBYTES_32, 32-byte public key, OP_CHECKSIG] (1 + 1 + 32 + 1 bytes = 35 bytes),
control block = [size] [control byte] [merkle path (empty)] (1 + 1 + 32 bytes = 34 bytes)
control block = [size] [control byte] [merkle path] (1 + 1 + 32 bytes = 34 bytes)

@jonatack jonatack Jul 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cryptoquick @EthanHeilman can I get your feedback on this? It looks correct to me.

(Also on this, from the PR description):

"Two things I left unchanged because they affect consumers' parsers: the schema mixes given.scriptTree (most vectors) with given.script_tree (the missing-tree error vectors), and a missing tree is encoded both as null and as an empty string. Happy to normalize those too if there is a preferred spelling."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is correct, and now is the time to fix what's not ideal now, because technical debt and such like this have a tendency to compound, especially after activation.

Keep up the good work, guys.

@jonatack jonatack removed the Bug fix label Jul 27, 2026

@cryptoquick cryptoquick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Comment thread bip-0360.mediawiki
[size] signature (1 + 64 bytes = 65 bytes),
leaf script = [size] [OP_PUSHBYTES_32, 32-byte public key, OP_CHECKSIG] (1 + 1 + 32 + 1 bytes = 35 bytes),
control block = [size] [control byte] [merkle path (empty)] (1 + 1 + 32 bytes = 34 bytes)
control block = [size] [control byte] [merkle path] (1 + 1 + 32 bytes = 34 bytes)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is correct, and now is the time to fix what's not ideal now, because technical debt and such like this have a tendency to compound, especially after activation.

Keep up the good work, guys.

@jonatack
jonatack merged commit 9f65bdb into bitcoin:master Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fixups Minor fixups not worth bothering the BIP author(s) for Link fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants