Skip to content

feat(commitments): verify two distinct SHA-256 pool openings - #320

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/distinct-sha256-openings
Nov 9, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/distinct-sha256-openings

Conversation

@brenorb

@brenorb brenorb commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Result

Adds commitments::sha256_pool::verify_two_distinct_sha256_openings. It verifies two openings from a unique public list using native SHA-256. Each canonical rank removes its selected digest, so the second rank cannot select the same slot. The checked fixed-index baseline compares original indices explicitly. The zero-hint scan requires distinct hashes and exactly two total hits.

Digests Schedule Leaf bytes Data witness bytes Ordinary items Hint items Hint bytes Combined peak Executed non-push ops
3 Destructive ranks 133 70 2 2 3 10 25
3 Fixed indices 142 70 2 2 3 10 32
3 Scan 141 67 2 0 0 6 33
32 Destructive ranks 1112 71 2 2 4 39 39
32 Fixed indices 1119 71 2 2 4 39 46
32 Scan 1388 67 2 0 0 6 265
129 Destructive ranks 4368 71 2 2 4 136 88
129 Fixed indices 4375 72 2 2 5 136 95
129 Scan 5559 67 2 0 0 6 1041
993 Destructive ranks 33807 72 2 2 5 1000 1015
993 Fixed indices 33815 72 2 2 5 1000 1023
993 Scan 42711 67 2 0 0 6 7953

The complete leaves include both checks, setup, cleanup and terminal true. Data witness serialization excludes the leaf, control block, annex and transaction. The 993-entry leaves are unoptimized under the central 32-KiB cutoff. Evidence is locally reproduced with unclassified execution.

The focused suite reproduces repeated-index acceptance by the existing HORS opening helper under its own contract, and rejection by the distinct-opening relation. The new fragment does not bind messages to indices or prevent replay of public openings.

Verification

  • Every ordered pair in three deterministic pools, repeated and malformed openings, caller-state preservation, and exact stack boundary
  • Exact metric snapshots, python3 tools/kb.py validate, cargo fmt --all -- --check, and git diff --check
  • cargo test --locked -- --skip fields::

@brenorb
brenorb marked this pull request as ready for review November 6, 2026 10:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T10:31:31.125629Z c3779a8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3779a8ec6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread knowledge/catalog.json
"fips-180-4",
"binohash-paper",
"bitcoin-script-locked",
"bitcoin-scriptexec-locked"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Cite the interpreter revision used by these measurements

For readers reproducing this experiment, bitcoin-scriptexec-locked resolves to historical revision ba96bc2 (knowledge/references/sources.json:104-108), whereas the tests use a09e87af (Cargo.lock:312-314). The cited revision predates the stack-limit repairs documented in NR-043, so following the catalog's execution-tool provenance selects a different interpreter from the one used for the reported strict stack-boundary evidence. Reference the existing bitcoin-scriptexec-csv-20260920 source ID, which identifies the actual dependency revision.

AGENTS.md reference: AGENTS.md:L52-L52

Useful? React with 👍 / 👎.

@RobinLinus
RobinLinus merged commit 709861b into solving-bitcoin:main Nov 9, 2026
3 checks passed
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.

2 participants