Conversation
|
Review recommendation: fix before merging. The reported 129-byte witness is a fixture size, not the general maximum for 64 numeric byte inputs. Canonical ScriptNum encodings of 128..255 require two payload bytes, so the maximum serialized data witness is Label the fixture-specific value accurately or report the general maximum. Also qualify the claimed lower boundary: the size of one selected SHA256 backend does not establish a lower bound across available representations/backends. Integrate the corrected text with #14/#17 and keep their consensus/policy distinctions accurate. Evidence: the example output is September 11 local validation (unchanged PR head): Integration: rebase on current main, resolve any catalog/NR/OP ID collisions, and run the affected correctness tests and focused metric checks. Reviewed commit: |
ec2ae11 to
57b9e85
Compare
|
Updated in place and rebased onto current main. Corrected the 129-byte value to a one-byte fixture and added the canonical 193-byte maximum for 64 two-byte ScriptNum payloads; both are 64 data items with zero hints and exclude orientation, script, and control-block items. Qualified the 1,060,200-byte / 770,481-opcode result as an unoptimized, compile-only sha2_u32 backend profile rather than a universal lower bound or complete verifier. Kept ordinary HASH256 Merkle composition distinct from Taproot TapBranch, reused NR-057 and OP-021, and avoided the existing NR/OP ID collisions. Added an active merkle_branch_boundary_metrics_are_current check. The example, focused metric test, knowledge-base tests, full primitive_metrics (106 passed, 1 ignored), cargo fmt, and kb validation pass. Commit 57b9e85. |
Summary
HASH256(left || right)verificationMeasured boundary
These figures exclude double hashing, branch routing, and output conversion, so they are not a complete Merkle verifier metric.
Validation
cargo run --locked --example merkle_branch_boundarycargo test --locked --lib commitments::hash_path::tests(7 passed)python3 tools/kb.py validatecargo fmt --checkgit diff --check