Repository navigation
test(u4): validate LSB projection under Core policy - #225
Conversation
|
Review: changes required before merge. The new Core fixture covers 16 nibbles, but promoting record-level Evidence: Reviewed commit: |
9bdbaa4 to
75d3db3
Compare
|
Updated in commit 75d3db3. The reusable 32-nibble LSB fragment is now classified as locally-reproduced and unclassified. Core evidence is isolated to the exact 0x0123456789abcdef complete 16-nibble Taproot leaf: 264-byte leaf, 333-byte serialized Taproot witness, 18 complete witness items, 34-item strict peak, and 184 static non-push opcodes. The separate catalog configuration records differentially-validated and policy-validated scope at Core v30.3 commit 49faec4f87f5cd19c88db01a82e5c68b087c8227. Focused checks passed: cargo test --locked --example core_validation_fixtures, cargo fmt --all -- --check, python3 tools/kb.py validate, and git diff --cached --check. |
|
Review of The earlier evidence-inheritance issue is addressed: the 16-nibble funded leaf now has its own configuration, and the 32-nibble fragment retains local/unclassified status. Keep that separation when rebasing over the newly merged LSB boundary tests. Rerun the focused LSB and metric checks plus the funded Core fixture on the integrated tree. Current integration conflicts: Validation scope: source/diff and existing CI review; no new full-repository or field-arithmetic test run was requested. |
|
Addressed the integration review on
Validation on the integrated tree passed: focused LSB tests, the named LSB metric, the shared fixture example, shared Core harness unit tests, KB validation, formatting and whitespace checks. The final funded Core v30.3 run ( |
…solving-bitcoin#236 and Core fixture solving-bitcoin#225 Resolve conflicts in knowledge/catalog.json, knowledge/primitives/u4-lsb.md, src/arithmetic/u4/README.md, src/arithmetic/u4/lsb.rs and src/arithmetic/u4/mod.rs (the last one is new relative to e9d5a66 because main now also carries solving-bitcoin#244). - lsb.rs: keep solving-bitcoin#236's range-checked wording, imports and its three tests (projects_all_nibble_least_significant_bits_in_order, rejects_out_of_range_nibbles_at_each_position, respects_stack_frontier_and_preserves_state); keep this PR's separate u4_nibbles_to_lsb_canonical API, its 981-input bound and its four tests. Document the canonical API's contract distinctly. - mod.rs: take main's sorted module list (superset of the PR's). - catalog: keep main's range-only summary/security wording and solving-bitcoin#225's Core complete-leaf configuration; add the PR's canonical-checked-batch32 configuration, list the canonical tests and metric, and state that only the canonical API enforces canonical ScriptNum encoding. - knowledge page / README: keep solving-bitcoin#236 and solving-bitcoin#225 text verbatim; add the canonical adapter as a separate API with its 1..=981 frontier and the note that the Core fixture does not validate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This adds a complete 16-nibble u4 LSB projection to the shared Bitcoin Core v30.3 fixture suite. The funded Taproot leaf checks every output for the canonical witness encoding of
0x0123456789abcdefand is accepted under consensus and default relay policy.Evidence is scoped to the exact complete leaf: 264 policy-compiled script bytes, 333 serialized Taproot witness bytes, 16 data items plus script/control block (18 total items), zero hints, and a 34-item combined stack peak in the strict local helper. The existing 32-nibble fragment remains locally-reproduced / unclassified, with unchanged 440-byte script and 50-item peak.
Current main's LSB boundary and preserved-state tests are retained. Malformed-input checks use raw runtime witnesses, exact validation errors, and a validator-bypass control. The fixture test pins script and Tapleaf hashes and complete-leaf metrics. Existing Core fixtures, catalog configurations and metric entries are preserved.
Validation: focused LSB tests, the named LSB metric, the shared fixture example and Core harness unit tests, KB validation, formatting, and an actual funded Core run. All 45 Core fixtures meet their consensus/policy expectations. No metric refresh or local broad/field-arithmetic suite was run.