Skip to content

feat(script): rotate opaque payloads by a checked runtime offset - #322

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/runtime-opaque-rotation
Nov 9, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:codex/runtime-opaque-rotation

Conversation

@brenorb

@brenorb brenorb commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Result

Adds support::rotation::rotate_opaque_left(n) for 1 through 996 opaque payload items and a canonical runtime offset. Each selected item is removed at a retained depth, which wraps exactly once as the source shrinks. The outputs retain their exact bytes and both caller stacks survive an exact suffix.

Payloads Offset Schedule Leaf bytes Data witness bytes Ordinary items Hint items Combined peak Executed non-push ops
8 6 Destructive 141 27 9 0 12 89
8 6 Copying 155 27 9 0 18 103
32 30 Destructive 543 99 33 0 36 329
32 30 Copying 609 99 33 0 66 379
128 126 Destructive 2178 387 129 0 132 1289
128 126 Copying 2515 387 129 0 258 1483
499 497 Destructive 8856 1503 500 0 503 4999
499 497 Copying 9749 1503 500 0 1000 5749

All complete leaves check the same ordered outputs byte-for-byte. Witness bytes include the runtime offset and exclude the leaf, control block, annex and transaction. The evidence is locally reproduced with unclassified execution.

The focused tests check every offset through width 12, byte-preserving handling of arbitrary payloads, malformed offsets and counts, the copying failure at 500, and the destructive 996-payload frontier. Periodic inputs may produce the same output at distinct canonical offsets.

Verification

  • Deterministic byte-preserving rotation, hostile witnesses and stack frontiers
  • 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:42
@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:47:45.175743Z 5afd753 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 deb8625 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