Skip to content

Integrate 27 reviewed PRs with corrected validation and Taproot preflight - #244

Merged
RobinLinus merged 119 commits into
mainfrom
codex/review-bitcoin-prs-20260928
Sep 28, 2026
Merged

RobinLinus merged 119 commits into
mainfrom
codex/review-bitcoin-prs-20260928

Conversation

@RobinLinus

@RobinLinus RobinLinus commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Integrates #243, #235, #232, #225, #224, #223, #222, #216, #203, #201, #155, #152, #147, #146, #145, #144, #143, #140, #139, #138, #137, #84, #66, #45, #40, #24, #17. These source heads have been reviewed and each has successful Rust, knowledge/Python/formatting, and pinned Core CI jobs. The updated PRs address the previous clean-stack false positives, redundant zero-check change, partial-staging hook issue, numeric-alias/order regressions, per-limb validation gaps, and evidence-scope corrections. #243 adds a separately scoped Taproot script-path commitment preflight.

Preserves the original PR commits and combines independent module exports, catalog records, README entries, and metric tests. Resolves the shared Core fixture changes as a 46-case suite, retaining commitment gating, historical report provenance, and both new LSB/popcount cases. Source implementations are unchanged; all 20 newly added Rust files match their reviewed source heads byte for byte.

Validation on the combined tree: 49 Python tests, 26 selected primitive metric tests, five Taproot commitment tests and two fixture-generator tests pass. A fresh pinned Core v30.3 regtest run passes all 46 cases and 92 combined local/Core comparisons; its report is checked in as tests/data/core-validation-v30.3.integrated-20260927.json. Knowledge validation (117 records / 283 configurations), Rust formatting, and whitespace checks pass. All 167 selected library regressions also pass, for 200 targeted Rust tests total. No local full-repository or field-arithmetic suite was run.

Robin Linus added 7 commits September 27, 2026 19:22
# Conflicts:
#	knowledge/comparisons/commitments.md
# Conflicts:
#	knowledge/catalog.json
#	knowledge/primitives/u32.md
#	tests/primitive_metrics.rs
# Conflicts:
#	knowledge/catalog.json
#	knowledge/comparisons/arithmetic.md
#	knowledge/primitives/index.md
#	src/arithmetic/u4/README.md
#	src/arithmetic/u4/mod.rs
#	tests/primitive_metrics.rs
# Conflicts:
#	examples/core_validation_fixtures.rs
#	knowledge/core-validation.md
# Conflicts:
#	examples/core_validation_fixtures.rs
#	knowledge/core-validation.md
@RobinLinus
RobinLinus merged commit 3d1001f into main Sep 28, 2026
6 checks passed
brenorb added a commit to brenorb/bitcoin-scripts that referenced this pull request Sep 28, 2026
…e ternary path

Second integration of origin/main (3d1001f, after solving-bitcoin#244). Conflicts:

- src/commitments/mod.rs: keep main's tapbranch module/exports and the
  ternary_hash_path module/exports (alphabetical order).
- tests/primitive_metrics.rs: keep main's tapbranch imports and the ternary
  imports; all 134 main tests/931 metric keys remain, plus the ternary test
  and its three keys.
- knowledge/comparisons/commitments.md: keep main's TapBranch u4 row and the
  ternary row.
- knowledge/negative-results/index.md: keep main's NR-066 and append the
  ternary entry as NR-072 after it (68 unique NR headings).

Catalog auto-merged: 117 main records unchanged plus the ternary record
(118 records, 284 configurations).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brenorb added a commit to brenorb/bitcoin-scripts that referenced this pull request Sep 28, 2026
Integrates origin/main (3d1001f, PR solving-bitcoin#244's 27-PR batch) into the
ripemd160 midstate-continuation branch. Robin Linus's review on
2026-09-25 named tests/primitive_metrics.rs as the integration
conflict; the actual merge also produced conflicts in
src/hashes/ripemd160/mod.rs and src/arithmetic/u4/mod.rs.

- tests/primitive_metrics.rs: kept every #[test] fn and metric `key`
  from both sides (main's 134 test fns plus the PR's
  ripemd160_midstate_metrics_are_current, merged set has 135, no
  duplicates; sha256_midstate_metrics_are_current and
  sha256_tagged_hash_metrics_are_current preserved as required).
- src/hashes/ripemd160/mod.rs: main independently extracted the
  byte-reversal helper into the shared
  arithmetic::u32::stack::u8_reverse_toaltstack; adapted
  ripemd160_80bytes_from_midstate to call that shared helper instead
  of restoring the PR's now-redundant private
  push_reverse_bytes_to_alt.
- src/arithmetic/u4/mod.rs: main's mod list is a strict superset of
  the PR's (PR only reordered existing entries); took main's version
  (47 pub mod lines) verbatim.
- knowledge/catalog.json: verified main's 117 records and the PR's
  101 records (including the ripemd160-u32 record's
  message-80-midstate configuration) are both subsets of the merged
  117-record file, with no duplicate ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brenorb added a commit to brenorb/bitcoin-scripts that referenced this pull request Sep 28, 2026
…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>
brenorb added a commit to brenorb/bitcoin-scripts that referenced this pull request Sep 28, 2026
…PIs, resolve NR-064 collision

Rebases the RIPEMD-160/SHA-1/SHA-256 output-prefix adapters over the SHA256
midstate-continuation and BIP340 tagged-hash APIs merged into main via solving-bitcoin#67/solving-bitcoin#68
(and the further 27-PR integration in solving-bitcoin#244). Resolves conflicts in
knowledge/catalog.json, knowledge/comparisons/hashes.md,
knowledge/negative-results/index.md, knowledge/primitives/sha256-u32.md,
src/arithmetic/u4/mod.rs, src/hashes/ripemd160/mod.rs, src/hashes/sha1/mod.rs,
src/hashes/sha256/README.md, src/hashes/sha256/sha2_u4.rs, and
tests/primitive_metrics.rs by keeping both API families: main's
sha256_80bytes_from_midstate/sha256_tagged_hash_32bytes plus this PR's
sha256_prefix/ripemd160_prefix/sha1_prefix adapters, with matching catalog
records, README rows, and primitive_metrics entries on both sides.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
brenorb added a commit to brenorb/bitcoin-scripts that referenced this pull request Sep 28, 2026
…/byte-plane overlaps

Integrates main's 27-PR batch (solving-bitcoin#244, at 3d1001f) with feat/u4-unpack.

Conflicts resolved:
- knowledge/catalog.json: merged the shared "arithmetic/u4" record's
  stack_contract sentence so it documents both the byte unpacker (PR)
  and the per-nibble/total popcount projections (main, solving-bitcoin#224).
- knowledge/techniques/representations.md: kept both the u4 byte-unpacker
  paragraph and the u32 byte-plane adapter paragraph, moving the latter
  next to the other u32 mask paragraphs; corrected an inaccurate
  "table wins at larger batches" claim that was not backed by any
  measurement.
- src/arithmetic/u4/README.md: kept both the unpack bullet (PR) and the
  threshold/clamp/equality bullets plus the updated lsb caveat (main);
  corrected an arithmetic error in the byte/stack tradeoff prose (the
  table path was described as "smaller by 32 bytes" when it is actually
  102 bytes larger at the only measured batch size).
- src/arithmetic/u4/mod.rs: sorted union of every `pub mod` from both
  sides (48 modules total; verified head and main are each full subsets
  and the union matches exactly).
- tests/primitive_metrics.rs: kept both `u4_unpack_metrics_are_current`
  (PR) and `tapbranch_metrics_are_current` (main), independent tests that
  were inserted at the same line.

Also corrected the same unsupported "table path trades stack occupancy
for a smaller repeated-batch script" claim in
knowledge/primitives/u4.md, and re-grounded all four locations
(README, knowledge page, representations.md) in the only measured
comparison (16 bytes: table 1,168 bytes/546 items vs. scalar 1,066
bytes/34 items), explicitly declining to claim a crossover batch size
that isn't measured in this repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants