Skip to content

feat(prism): add offline recovery for accepted pending blocks - #259

Merged
kiwidream merged 1 commit into
2.x.xfrom
recover-pending-prism-blocks
Sep 9, 2026
Merged

kiwidream merged 1 commit into
2.x.xfrom
recover-pending-prism-blocks

Conversation

@kiwidream

@kiwidream kiwidream commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Accepted blocks can remain pending when large candidate payloads stall the coordinator during replay. Add a standalone recovery command that processes an explicit block-hash allowlist one candidate at a time through the existing accepted-block finalizer.

The default invocation only checks metadata and active-chain identity. --apply requires the normal coordinator to be stopped, acquires the existing guarded writer lease, preserves heartbeat and accounting fences, and verifies durable accounting and audit evidence before reporting completion. It never starts Stratum or submits new blocks. Rerunning the same hashes resumes partial completion and skips verified completed blocks.

The fresh recovery process uses cooperative Python JSON codecs to reduce interpreter stalls. This is a temporary mitigation for #255, not a byte or memory bound. Includes operating instructions and PostgreSQL coverage in the existing native-client CI gate. No production deployment has been performed for this runner.

Validation:

  • 14 focused tests passed, including three native PostgreSQL tests for exclusive lease ownership, read-only selection, and real finalizer recovery after an injected audit-publication failure. Node and cryptographic proof generation/verification use deterministic fixtures in the finalizer test.
  • 339 existing block-candidate, finalization, and coordinator-configuration tests passed.
  • Docker Python lint/compile and ShellCheck passed; whitespace checks passed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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 ⚠️ Failed 2026-09-09T17:43:12.446043Z 0e0468d 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.

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