-
Notifications
You must be signed in to change notification settings - Fork 220
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
Don't mark block complete twice #3487
Conversation
Also sligthly changed the name of the effect to be more suggestive. Signed-off-by: Alexandru Sardan <alexandru@casperlabs.io>
The block accumulator would mark a block completed in storage if it was executed. Since the block is already marked as completed in the reactor control logic after a block is executed and announced and also by the block synchronizer when it's synchronizing historical blocks, there's no need to mark it complete again in the block accumulator. This fixes a bug where the block was marked completed two times in rapid succession. Signed-off-by: Alexandru Sardan <alexandru@casperlabs.io>
Removed ShouldStore::SingleSignature variant for the block acceptor code since it was never used there and refactored the code sligtly for better readablility. Signed-off-by: Alexandru Sardan <alexandru@casperlabs.io>
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.
Makes sense to me.
Trying to remember why put_complete_block_to_storage
was added in the first place. Was it just because the synchronizer didn't mark them as complete yet at that time? Maybe another pair of reviewer eyes would be good.
}); | ||
if response == true { | ||
harness.send_request(storage, move |responder| { | ||
BlockCompleteConfirmationRequest { |
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.
Is that something specific to these tests?
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.
Not sure if it really needs to mark them complete to be honest. This was changed in 503c4d0 so I wanted to preserve the same semantics due to that change.
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 👍
Applied the |
Signed-off-by: Alexandru Sardan <alexandru@casperlabs.io>
will be addressed by #3520 |
Don't mark the block complete from the Block Accumulator component.
This fixes: #3458