-
Notifications
You must be signed in to change notification settings - Fork 775
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 bonsai storage inconsistency issue #2492
Conversation
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
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.
LGTM - non-blocking feedback about the Optional.get()'s
if (persistedHeader.isEmpty()) { | ||
getTrieLogLayer(persistedState.blockHash()).ifPresent(rollBacks::add); | ||
} else { | ||
BlockHeader targetHeader = blockchain.getBlockHeader(blockHash).get(); |
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.
non-blocking: it would help with readability to resolve the Optional persistedHeader once here and use it in the rest of the block. all of the naked Optional.get()
make me nervous (despite being safe here). If we had a small refactor of the flow, those get's could be landmines
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.
ok I will do that
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.
Done
assertThat(bonsaiWorldStateArchive.getMutable(null, blockHeader.getHash())) | ||
.containsInstanceOf(BonsaiPersistedWorldState.class); | ||
|
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.
👍
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com> Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
PR description
This ticket fixes a consistency issue between the blockchain storage part and the worldstate storage .
Fixed Issue(s)
Changelog