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

[stable2409] Backport #6973 #7160

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Conversation

paritytech-cmd-bot-polkadot-sdk[bot]

Backport #6973 into stable2409 from alexggh.

See the documentation on how to use this bot.

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
https://github.com/paritytech/polkadot-sdk/blob/4e805ca05067f6ed970f33f9be51483185b0cc0b/polkadot/node/core/approval-voting/src/lib.rs#L2495
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]>
Co-authored-by: ordian <[email protected]>
Co-authored-by: Andrei Eres <[email protected]>
(cherry picked from commit d38bb95)
@github-actions github-actions bot added the A3-backport Pull request is already reviewed well in another branch. label Jan 14, 2025
Copy link
Contributor

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 1/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8016751

@EgorPopelyaev
Copy link
Contributor

@alexggh Alex, could you please double check the failing tests: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8016751
If all is fine, I'll merge the PR

Signed-off-by: Alexandru Gheorghe <[email protected]>
@alexggh
Copy link
Contributor

alexggh commented Jan 15, 2025

@alexggh Alex, could you please double check the failing tests: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8016751 If all is fine, I'll merge the PR

it was a unnittest that was using functions added later, I fixed it.

@EgorPopelyaev EgorPopelyaev merged commit c03a381 into stable2409 Jan 15, 2025
154 of 186 checks passed
@EgorPopelyaev EgorPopelyaev deleted the backport-6973-to-stable2409 branch January 15, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3-backport Pull request is already reviewed well in another branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants