Skip to content
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

[vms/proposervm] Set build block time correctly when anyone can propose #3197

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

dhrubabasu
Copy link
Contributor

@dhrubabasu dhrubabasu commented Jul 17, 2024

Why this should be merged

When anyone can propose, the next block build time isn't correctly set since we wrongly return ErrAnyoneCanPropose. This can cause delays in block building. Block verification is unaffected because this is strictly the build path.

How this works

Don't return ErrAnyoneCanPropose

How this was tested

Adds a regression test

@dhrubabasu dhrubabasu added the bug Something isn't working label Jul 17, 2024
@dhrubabasu dhrubabasu added this to the v1.11.10 milestone Jul 17, 2024
@dhrubabasu dhrubabasu self-assigned this Jul 17, 2024
Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I'm not reading this correctly, but wouldn't that means that all honest "AnyoneCanPropose" would never propose a block ?

@StephenButtolph
Copy link
Contributor

maybe I'm not reading this correctly, but wouldn't that means that all honest "AnyoneCanPropose" would never propose a block ?

That is the bug that is being resolved by this PR yes.

@tsachiherman
Copy link
Contributor

This can cause delays in block building

sounds to me like a "This can cause delays in block building" would be an understatement.

@StephenButtolph
Copy link
Contributor

StephenButtolph commented Jul 17, 2024

sounds to me like a "This can cause delays in block building" would be an understatement.

Sorry I actually mis-read your prior comment.

This bug would cause errors in resetting the block timer. So the previous block build time would always be used. Essentially, block producers could wait for up to 1 hour before they would attempt to build the block.

They would still eventually build blocks.

As an aside - this case is very much an edge case to begin with (originally there was no support for building blocks in this case at all, this was added because some test subnets got stuck because they removed all of their validators incorrectly).

@StephenButtolph StephenButtolph added this pull request to the merge queue Jul 17, 2024
Merged via the queue into master with commit 668b452 Jul 17, 2024
20 checks passed
@StephenButtolph StephenButtolph deleted the proposervm-fix branch July 17, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants