-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fixed the error during dry run #2365
base: master
Are you sure you want to change the base?
Conversation
block.entity.header().time(); | ||
|
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.
nice catch
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.
Did not go in depth with the review, but I can follow the main idea behind the fix.
LGTM
The base branch was changed.
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 👍
@@ -649,27 +649,33 @@ mod dry_run { | |||
} | |||
|
|||
#[tokio::test] | |||
async fn dry_run__errors_early_if_height_is_lower_than_chain_tip() { |
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 did a quick scan but couldn't see a test for this on the produce or produce_predefined. Maybe I missed it. Do you think we need that coverage?
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.
We have test case for BlockHeightShouldBeHigherThanPrevious
error.
But after introduction of the state rewind feature, I don't think that BlockHeightShouldBeHigherThanPrevious
error makes a lot of sense. Basically importer already is responsible and upgradable executor do this kind of check inside, some maybe we can just remove it from the block producer
Because of race condition it was possible that dry run will fail. I moved the check to production, where we really need to require this behavior. But in the case of the dry run we only care about previous block existence.
Checklist
Before requesting review