-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: gracefully handle missing persisted_trie_updates
#13942
base: main
Are you sure you want to change the base?
Conversation
d358142
to
8e0666a
Compare
persisted_trie_updates
persisted_trie_updates
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 a bit torn about this because this could be very confusing
and not really a fan of introducing another type here.
but having the trienodes separate from the actual block makes a ton of sense and I have a feeling that this will be beneficial in the future.
leaning towards we should make this change
wdyt @rkrasiuk @Rjected
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.
this change kinda grew on me,
one caveat here is that this now always excludes trieupdates for reorged blocks so if users are currently relying on that this will no longer be possible.
but I don't think this is the case or is even something that is useful?
01f1884
to
a888357
Compare
yeah I would expect that you wouldn't need this info generally, gvien that TrieUpdates are only useful when applying blocks to db, @rkrasiuk wdyt? |
Closes #13940
This PR divides
ExecutedBlock
intoExecutedBlockWithTrieUpdates
andExecutedBlock
. in-memory state only containsExecutedBlockWithTrieUpdates
without tracking thepersisted_trie_updates
separately.NewCanonicalChain::Reorg
variant now only contains aVec<ExecutedBlock>
for reorg chain, thus not requiring us to obtain TrieUpdates for those.Reorged blocks are no longer re-inserted into in-memory state