Skip to content

fix(forester): retain proofs after eligibility ends - #2387

Draft
sergeytimoshin wants to merge 1 commit into
mainfrom
agent/cache-late-proof-results
Draft

fix(forester): retain proofs after eligibility ends#2387
sergeytimoshin wants to merge 1 commit into
mainfrom
agent/cache-late-proof-results

Conversation

@sergeytimoshin

Copy link
Copy Markdown
Contributor

Summary

  • keep the proof-result receiver alive after a forester loses eligibility
  • cache proofs that finish late and reuse them in a later eligible slot
  • defer duplicate per-tree proof work while that cache is warming
  • cover successful and failed late-proof completion with unit tests

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

  • cargo test -p forester late_proof --lib
  • cargo check -p forester
  • cargo fmt -p forester -- --check
  • git diff --check

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.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: aa8df148-85d5-48d0-b2db-cb73085a09ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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