fix: retain forester proofs after eligibility ends - #2387
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesThe proof cache now accepts late proof results after Proof cache warming coordination
Priority: ⬇️ Low — Defer this forester proof-cache change because it is a scoped improvement to retain late proofs and avoid duplicate work, with no stated customer or external urgency. Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to Late proof results are retained for later eligible slots while overlapping proof work is deferred during cache warming. The implemented completion and failure handling is covered, with no current merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant TxSender
participant ProofChannel
participant ProofCache
participant EpochManager
TxSender->>ProofCache: hand off proof receiver
ProofChannel-->>ProofCache: deliver late proof results
ProofCache->>ProofCache: finish warming when channel closes
EpochManager->>ProofCache: check warming state
ProofCache-->>EpochManager: return warming state
EpochManager->>EpochManager: defer overlapping proof work
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.97.1)Clippy execution failed 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55cec09c00
ℹ️ 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".
| tree = %tree_pubkey, | ||
| "Deferring V2 proof work while late proofs are collected" | ||
| ); | ||
| return Ok(()); |
There was a problem hiding this comment.
Do not consume an eligible slot while the cache warms
When a late-proof collector is still active at the start of an eligible slot, this return reports success, after which process_queue unconditionally clears that scheduled slot at line 1869. The warming period can last up to the prover timeout and can be unbounded while submit_with_backpressure retries queue_full, so an entire eligible slot—and potentially the final eligible slot—can be discarded even if the cached proofs become ready moments later. Poll or wait within the slot until warming completes (or the slot expires) instead of returning successfully here.
Useful? React with 👍 / 👎.
Summary
Why
The existing cache only drained results that were immediately available when eligibility ended. Proofs still running in the prover completed after the receiver was dropped, so they could not be retried later and the same queue work was recomputed.
Validation
Local devnet evidence
Validated with both devnet foresters using TRANSACTION_MAX_CONCURRENT_BATCHES=3. For amt2kaJA14v3urZbZvnc5v2np8jqvc4Z8zDep5wbtzx, one result was available at handoff and three arrived late; all four were retained. The next eligible forester sent the four cached instructions in 1,401 ms without regenerating them.
Transaction: 21oZcBeMdhWTMbFeCdqM5Y7miuF5gUx2z1m6prXE42Hk82DCSY225zaJoGZoKjLrHSdLmMCDRim6qYn4ndsfS2Sr
The queue advanced from start index 977251 to 978251. No forester processing errors were observed; the short indexer-root mismatch afterward was expected lag because on-chain state had already advanced.
Summary by CodeRabbit
Performance
Reliability