Skip to content

fix: restore processed signatures on restart - #98

Merged
bmuddha merged 1 commit into
devfrom
fix/restore-signature-cache
Aug 28, 2026
Merged

fix: restore processed signatures on restart#98
bmuddha merged 1 commit into
devfrom
fix/restore-signature-cache

Conversation

@bmuddha

@bmuddha bmuddha commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Extend retained block-range reads with indexed transaction signatures and terminal statuses.
  • Seed blockhash and processed-signature caches from one bounded history read anchored to the AccountsDB slot.
  • Cache terminal statuses produced by snapshot-tail replay without appending duplicate ledger records or publishing live subscriptions.

Closes #97

Impact

Previously processed transactions remain deduplicated across clean restarts and snapshot-tail recovery. BlockRangePayload has a breaking in-process response type; the on-disk ledger format is unchanged.

Reviewer notes

Startup history is bounded by the largest cache or SlotHashes window and inserted oldest-to-newest at original block slots. Replay updates the signature cache only after re-execution advances state and deliberately bypasses live ledger and subscription fanout.

@bmuddha bmuddha added the bug Something isn't working label Aug 27, 2026
@bmuddha bmuddha self-assigned this Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b089c15-a7e3-4fdb-82a3-f0366d93fdc1

📥 Commits

Reviewing files that changed from the base of the PR and between cd02197 and 93d2f24.

📒 Files selected for processing (14)
  • engine/README.md
  • engine/tests/recovery.rs
  • keeper/README.md
  • keeper/src/accessor.rs
  • keeper/src/builder.rs
  • keeper/src/cache.rs
  • keeper/src/util.rs
  • ledger/README.md
  • ledger/src/reader.rs
  • ledger/src/request.rs
  • ledger/src/tests/integration.rs
  • processor/README.md
  • processor/src/executor.rs
  • processor/src/tests.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The ledger now returns indexed transaction signatures and terminal statuses in block history. Keeper startup builds a unified cache seed from retained history and SlotHashes, including processed-signature entries. Replay commits account transitions and caches terminal statuses without appending ledger records or publishing subscriptions. Recovery tests verify restored signatures reject duplicate submissions and prevent repeated account execution. Documentation describes the updated startup, ledger, and replay behavior.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #97. Startup reconstructs processed-signature history, replay caches terminal statuses without ledger or subscription side effects, and tests verify duplicate rejection, stat…
Out of Scope Changes check ✅ Passed The code, tests, and documentation changes support the linked issue objectives. No unrelated code changes are evident.
Docstring Coverage ✅ Passed Docstring coverage is 94.59% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 10 files. (4 skipped: 4…
Title check ✅ Passed The title clearly and concisely summarizes the primary change: restoring processed transaction signatures after restart.
Description check ✅ Passed The description directly explains the cache restoration, retained history reads, snapshot-tail replay behavior, duplicate detection, and compatibility impact.
Full details: Linked Issues check

Explanation

The changes satisfy issue #97. Startup reconstructs processed-signature history, replay caches terminal statuses without ledger or subscription side effects, and tests verify duplicate rejection, status preservation, and prevention of repeated execution.

Full details: Docstring Coverage

Explanation

Docstring coverage is 94.59% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 10 files. (4 skipped: 4 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/restore-signature-cache

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bmuddha
bmuddha marked this pull request as ready for review August 27, 2026 14:31
@bmuddha
bmuddha merged commit 948283c into dev Aug 28, 2026
4 checks passed
@bmuddha
bmuddha deleted the fix/restore-signature-cache branch August 28, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Processed transactions can execute again after restart

1 participant