Serve verified uncommitted blocks to seq-only lookups in CachedStorage - #497
Open
samliok wants to merge 10 commits into
Open
Serve verified uncommitted blocks to seq-only lookups in CachedStorage#497samliok wants to merge 10 commits into
samliok wants to merge 10 commits into
Conversation
yacovm
reviewed
Aug 6, 2026
yacovm
reviewed
Aug 6, 2026
samliok
commented
Aug 13, 2026
This was referenced Aug 13, 2026
samliok
marked this pull request as ready for review
August 13, 2026 22:23
… restoring from the WAL
…ck while restoring from the WAL" This reverts commit c95862b.
yacovm
reviewed
Aug 14, 2026
|
|
||
| item, exists := cs.cache[digest] | ||
| if exists { | ||
| cs.lock.RUnlock() |
yacovm
reviewed
Aug 14, 2026
|
|
||
| // If we are requesting an empty digest, and the sequence is not found in storage, | ||
| // check if we have verified but not indexed this sequence | ||
| if err == common.ErrBlockNotFound && digest == (common.Digest{}) { |
Collaborator
There was a problem hiding this comment.
shouldn't this be: f err == common.ErrBlockNotFound || digest == (common.Digest{}) ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CachedStorage keeps verified-but-not-yet-finalized blocks in a cache keyed by digest. The msm sealing-block checks (
buildBlockOrTransitionEpoch,areWeReadyToTransitionEpoch) look blocks up by sequence only and pass a zero digest, so they can never hit the cache. The lookup falls through to committed storage, and while the sealing block is notarized but not yet indexed, block building fails withfailed to retrieve sealing block for previous epoch. The failed build is not retried, so the leader misses its round and the round empty-notarizes.