-
Notifications
You must be signed in to change notification settings - Fork 699
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 windowing when no validator is available #2529
Conversation
@@ -37,7 +37,7 @@ const ( | |||
var ( | |||
_ Windower = (*windower)(nil) | |||
|
|||
ErrNoProposersAvailable = errors.New("no proposers available") |
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 becomes an internal error that does not require a special error. Instead we should singla the case where no validators are available to be able to handle it appropriately
@@ -401,7 +401,7 @@ func (p *postForkCommonComponents) shouldBuildBlockPostDurango( | |||
parentTimestamp time.Time, | |||
parentPChainHeight uint64, | |||
newTimestamp time.Time, | |||
) error { | |||
) (bool, error) { |
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.
flipped the logic to align with verifyPre/PostDurangoBlockDelay
. Signed blocks will be the new normal so I chose to signal "should build signed block/should have a proposer" with true
Why this should be merged
In case a subnet ends up not having any validator, current windowing system would halt. It should instead allow any non-validator to propose
How this works
Whenever there are no validators to be sampled from, we allow any node to propose. We issue an unsigned block in such a casa
How this was tested
CI