Skip to content

Validate signed six-mode sighash matrix against Core - #345

Open
adrienlacombe wants to merge 2 commits into
solving-bitcoin:mainfrom
adrienlacombe:codex/binohash-signed-six-mode-core
Open

adrienlacombe wants to merge 2 commits into
solving-bitcoin:mainfrom
adrienlacombe:codex/binohash-signed-six-mode-core

Conversation

@adrienlacombe

Copy link
Copy Markdown
Contributor

Question

Do the six canonical legacy sighash modes' host-side field commitments predict whether an unchanged signature still authorizes a funded spend?

Change

Add six ordinary two-input P2SH CHECKSIG baselines and eight one-field variants per mode. The pinned Core v30.3 harness confirms all six baseline spends in a block, directly rejects the 34 variants whose digest changes, and accepts the other 14 under default mempool policy. Every variant has a complete transaction and a checked report guard; a metric marker binds the representative locking-script bytes to that report.

This isolates signature-hash field commitments. The signature is not embedded in scriptCode, so this does not exercise selected FindAndDelete, Binohash grinding, or transaction pinning. Unchanged-digest variants have policy acceptance, not separate block confirmations.

Validation

  • cargo test --locked --example binohash_signed_sighash_matrix (1 passed)
  • python3 tools/binohash_signed_sighash_matrix_regtest.py (pinned Core report passed twice, byte-identical)
  • python3 -m unittest discover -s tools -p 'test_binohash_signed_sighash_matrix_regtest.py' (3 passed)
  • cargo test --locked --test primitive_metrics binohash_signed_matrix_core_report_metrics_are_current (1 passed)
  • python3 tools/kb.py validate; cargo fmt --all -- --check; git diff --check
  • Full non-field Rust suite will run in CI.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T19:46:06.804072Z 7ad6c20 PR opened
ℹ️ 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: 7ad6c20a3d

ℹ️ 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 on lines +12 to +16
Each of the six baselines passes default relay policy and is confirmed in a
Core block. All 48 single-field variants receive default-policy verdicts: 34 reject
and 14 accept. Where the local digest changes, Core rejects the signature under both policy
and direct block validation. Where the local digest remains the same, Core
accepts it under policy; those variants are not separately mined. This

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 Update OP-011 with the signed Core progress

The OP-011 progress section still ends its six-mode discussion at the host-only matrix (knowledge/open-problems.md:546-548) without recording this newly added signed fixture. The canonical open-problem status therefore omits the six funded baselines and 48 Core-tested mutations documented here; add this differential while preserving the remaining pinning, grinding, and extraction gaps.

AGENTS.md reference: AGENTS.md:L81-L83

Useful? React with 👍 / 👎.

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.

1 participant