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

approval-voting: Fix sending of assignments after restart #6973

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexggh
Copy link
Contributor

@alexggh alexggh commented Dec 20, 2024

There is a problem on restart where nodes will not trigger their needed assignment if they were offline while the time of the assignment passed.

That happens because after restart we will hit this condition

if !t.triggered() && t.tranche() > considered {
and considered will be tick_now which is already higher than the tick of our assignment.

The fix is to schedule a wakeup for untriggered assignments at restart and let the logic of processing an wakeup decide if it needs to trigger the assignment or not.

One thing that we need to be careful here is to make sure we don't schedule the wake up immediately after restart because, the node would still be behind with all the assignments that should have received and might make it wrongfully decide it needs to trigger its assignment, so I added a RESTART_WAKEUP_DELAY: Tick = 12 which should be more than enough for the node to catch up.

Signed-off-by: Alexandru Gheorghe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant