Skip to content

Conversation

@raychu86
Copy link
Collaborator

Motivation

The existing code has a one-off issue with loading the epoch_provers_cache. The correct behavior when nodes are operating is that the cache should be cleared when the block height reaches an epoch boundary (block_height % N::NUM_BLOCKS_PER_EPOCH == 0). However the current logic when a node loads from DB and the block state is exactly at the epoch boundary will not account for this cleared cache. This can lead to deviation from expected values in the cache.

This PR fixes this by making sure the ledger has a clear cache when loading from DB and the block state starts at exactly the epoch boundary.

@raychu86 raychu86 requested a review from vicsn December 10, 2025 19:19
@raychu86 raychu86 changed the title [Fix] Fix one-off loading in epoch cache [Fix]one-off loading in epoch cache Dec 10, 2025
@raychu86 raychu86 changed the title [Fix]one-off loading in epoch cache [Fix] One-off loading in epoch cache Dec 10, 2025
@raychu86 raychu86 requested review from kaimast and vicsn December 16, 2025 19:24
@vicsn vicsn merged commit 3f45538 into staging Jan 5, 2026
7 checks passed
@vicsn vicsn deleted the fix/epoch_provers_loading branch January 5, 2026 09:41
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.

4 participants