bip360: fix stale links, version header and a size example label - #2221
Conversation
- 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).
| [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) |
There was a problem hiding this comment.
@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."
There was a problem hiding this comment.
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.
| [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) |
There was a problem hiding this comment.
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.
Small doc fixes in bip-0360.mediawiki, noticed while implementing against the published vectors:
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.