Conversation
Return backend read and write failures from the nine Result-returning Store methods instead of panicking. Propagate LiveChain iterator errors rather than returning an incomplete view of the chain.
…etadata error Propagate backend failures through the shared metadata helpers and return MissingMetadata when a required key is absent.
Propagate backend write and live-chain pruning failures from update_checkpoints instead of panicking. The checkpoint is still committed before live-chain pruning, so a pruning failure now returns an error after that commit. Propagate read and proof-pruning failures from prune_old_data instead of panicking or using the finalized slot as a fallback. Return UnexpectedMissingBlockHeader when the stored head has no header.
Return backend failures from pending and signed block writes, single-block reads, and range reads instead of panicking. Preserve existing behavior for missing blocks and pruned proofs.
Return backend read and write failures from state retrieval and insertion. Cache inserted states only after the write commits successfully.
Return backend failures from store restoration and anchor initialization instead of panicking. Add a Store variant to GetForkchoiceStoreError and a StoreInit variant to CheckpointSyncError so checkpoint startup reports storage failures separately from anchor-pair mismatches.
This branch has not been deployed
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.
Propagate backend failures from audited
Result-returningStoremethods, including reads, writes, commits, and LiveChain iteration, instead of panicking or returning an incomplete view.🗒️ Description / Motivation
Several
Storemethods already returnedResultbut panicked when the storage backend failed. LiveChain scans could also hide iterator failures. This change makes those failures visible to callers, including during store initialization.What Changed
MissingMetadatafor required metadata keys that are absent.GetForkchoiceStoreError::Storefor initialization failures andCheckpointSyncError::StoreInitso checkpoint startup reports them separately from anchor-pair mismatches.Correctness / Behavior Guarantees
UnexpectedMissingBlockHeader.expectmay still panic on returned errors.Tests Added / Run
make fmt,make lint, andmake test— passed.Related Issues / PRs
.expect(), propagate Result through storage layer #306✅ Verification Checklist
make fmt— cleanmake lint— cleanmake test— passed