Skip to content

Verify one strict signed peak - #336

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/strict-signed-single-peak
Nov 9, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/strict-signed-single-peak

Conversation

@brenorb

@brenorb brenorb commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Verify a strict signed ascent to one interior peak followed by a strict descent. Return the canonical peak index. The reverse scan checks the rightmost descent first, then uses the ascent count to forbid another descent after the phase changes. The counterexample [0,2,1,3,0] passes a count-only variant and fails the checked phase.

The matched branched schedule shares the signed width checks, edge comparisons, exact result and terminal predicate. Every ordinary input coexists at entry. The serialized data witness includes item count and lengths, excluding the leaf, control block, annex and transaction. Executed counts include processed control delimiters.

Width Peak index Schedule Leaf bytes Data witness bytes Ordinary items Hint items Peak Executed
32 1 Arithmetic phase 556 90 32 0 34 521
32 1 Branched phase 649 90 32 0 34 494
32 30 Arithmetic phase 557 93 32 0 34 521
32 30 Branched phase 650 93 32 0 34 494
128 53 Arithmetic phase 2,285 375 128 0 130 2,153
128 53 Branched phase 2,666 375 128 0 130 2,030
998 497 Arithmetic phase 17,946 2,993 998 0 1,000 16,943
998 497 Branched phase 20,937 2,993 998 0 1,000 15,950

At width 998 the arithmetic phase saves 2,991 bytes and executes 993 additional non-push operations. Tests enumerate short signed vectors, reject malformed inputs and plateaus, and preserve both caller stacks at the exact frontier. The existing nondecreasing nibble predicate and #306 use different input and result contracts.

Evidence is locally reproduced and execution is unclassified. Focused tests, metric snapshots, knowledge validation, formatting, and diff checks passed. The required full non-field suite passed on this exact published commit.

@brenorb
brenorb marked this pull request as ready for review November 6, 2026 13:08
@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-06T13:13:14.210415Z 6f75dc1 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.

@RobinLinus
RobinLinus merged commit 19c6027 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