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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: block apply in the past #11767
fix: block apply in the past #11767
Changes from 2 commits
491d092
5c2336e
85c27c1
7d11e2d
8551ac5
5b8d3ca
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like use flat storage and source should be exclusive options. Can you structure it that way in code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have started in such a way, but then I realized you could potentially use both together.. for example use flat storage and still access trie for free.
No strong opinion if you prefer I'll make the options in CLI exclusive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When would it be possible to use both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when flat storage is enabled we don't read trie at all (except for the non-inlined values).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm referring to this struct
API-wise it gives the impression
use-flat-storage
is orthogonal from theStorageDataSource
. You can use flat storage or not over a DB that charges gas costs or not.Yes not charging gas costs is similar to using flat-storage in some contexts (replaying block)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah well then this struct is wrong too :) Given the source is already there the 'use_flat_storage' should be derivable from it. I would just remove it. If you don't want to go so far in this PR perhaps you can just add a new ctor? I just dislike this pattern of calling ctor and then immediately overwriting one of the fields, it seems very volatile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, I'll add another constructor!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made some sweeping changes to make stuff more explicit. No more flags to enable flat storage or free tries, instead now there's an enum
StorageSource
with all different options