Stop writing TransactionError into snapshots from status cache#6460
Closed
steveluscher wants to merge 1 commit intoanza-xyz:masterfrom
Closed
Stop writing TransactionError into snapshots from status cache#6460steveluscher wants to merge 1 commit intoanza-xyz:masterfrom
TransactionError into snapshots from status cache#6460steveluscher wants to merge 1 commit intoanza-xyz:masterfrom
Conversation
|
If this PR represents a change to the public RPC API:
Thank you for keeping the RPC clients in sync with the server API @steveluscher. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6460 +/- ##
========================================
Coverage 82.8% 82.8%
========================================
Files 849 850 +1
Lines 379161 379200 +39
========================================
+ Hits 314064 314171 +107
+ Misses 65097 65029 -68 🚀 New features to boost your workflow:
|
brooksprumo
reviewed
Jun 9, 2025
brooksprumo
left a comment
There was a problem hiding this comment.
Looks reasonable so far! Please ensure that a snapshot created with this PR can be loaded by v2.3 (or v2.2 if the plan is to backport).
Also, also please re-request a review once the other PRs that this one depends on are merged.
d71eb28 to
d7b04a5
Compare
TransactionError into snapshots from seen transaction cacheTransactionError into snapshots from status cache
Author
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.
Problem
It is very difficult to change the format of
TransactionErrorbecause it gets written to disk when the validator snapshotsBankStatusCache. The thing is,BankStatusCachehas no need ofTransactionErrorsor indeedTransactionResultsat all; all it needs to track is whether a given transaction message has been seen or not.Summary of Changes
In this PR we shim the code that serializes/deserializes the
status_cachesnapshot to unconditionally writeOk(())into the snapshot, even if the actualResultisErr(TransactionError).This ensures that:
Ok(())to disk)TransactionErrorchanges, the snapshot file will only ever containOk(()))FAQ
Q: Doesn't this require a SIMD for the snapshot format?
A: No! This doesn't actually change the format of the snapshot, it just makes it so that conveniently the snapshot will never contain
TransactionError. This is one step along the path to making it so that a change toTransactionErrorlike this will not break snapshots, nor require a SIMD at all.Q: Doesn't this bust the ABI hash?
A: No! As far as the snapshotter is concerned, it's still serializing
TransactionResult, even though this change makes every single value a non-error.Furthers #6457.