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

Add self-bond filter condition when computing new set of collators #1043

Merged
merged 12 commits into from
Mar 16, 2023

Conversation

Garandor
Copy link
Contributor

@Garandor Garandor commented Mar 14, 2023

Description

This will result in collators on calamari below 4M self-bond no longer being eligible to produce blocks.

  • Previously, tests were not handling the 6th collator correctly, causing the fact that it wasn't offboarded in the old PR to be missed.
  • A take-N-before-filter sequence bug in parachain-staking led to fewer-than-expected collators being selected
  • Added regression test for correct offboarding

Followup to #937


Before we can approve this PR for merge, please make sure that all the following items have been checked off:

  • Connected to an issue with discussion and accepted design using zenhub "Connect issue" button below
  • Added one label out of the L- group to this PR
  • Added one or more labels from the A- and C- groups to this PR
  • Explicitly labelled A-calamari, A-dolphin and/or A-manta if your changes are meant for/impact either of these (CI depends on it)
  • Re-reviewed Files changed in the Github PR explorer.

Situational Notes:

  • If adding functionality, write unit tests!
  • If importing a new pallet, choose a proper module index for it, and allow it in BaseFilter. Ensure every extrinsic works from front-end. If there's corresponding tool, ensure both work for each other.
  • If needed, update our Javascript/Typescript APIs. These APIs are officially used by exchanges or community developers.
  • If modifying existing runtime storage items, make sure to implement storage migrations for the runtime and test them with try-runtime. This includes migrations inherited from upstream changes, and you can search the diffs for modifications of #[pallet::storage] items to check for any.

Signed-off-by: Adam Reif <Garandor@manta.network>
@Garandor Garandor added C-bug Category: Issues documenting a bug A-calamari Area: Issues and PRs related to the Calamari Runtime L-fixed Log: Issues and PRs related to bug fixes labels Mar 14, 2023
@Garandor Garandor self-assigned this Mar 14, 2023
Adam Reif added 5 commits March 14, 2023 15:44
fix
Signed-off-by: Adam Reif <Garandor@manta.network>
Signed-off-by: Adam Reif <Garandor@manta.network>
Signed-off-by: Adam Reif <Garandor@manta.network>
Signed-off-by: Adam Reif <Garandor@manta.network>
fmt
Signed-off-by: Adam Reif <Garandor@manta.network>
Adam Reif added 3 commits March 16, 2023 09:24
Signed-off-by: Adam Reif <Garandor@manta.network>
Signed-off-by: Adam Reif <Garandor@manta.network>
Signed-off-by: Adam Reif <Garandor@manta.network>
ferrell-code
ferrell-code previously approved these changes Mar 16, 2023
Signed-off-by: Adam Reif <Garandor@manta.network>
ghzlatarev
ghzlatarev previously approved these changes Mar 16, 2023
ferrell-code
ferrell-code previously approved these changes Mar 16, 2023
Copy link
Contributor

@ferrell-code ferrell-code left a comment

Choose a reason for hiding this comment

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

seems clippy needs a older nightly version

Signed-off-by: Adam Reif <Garandor@manta.network>
@Garandor Garandor dismissed stale reviews from ferrell-code and ghzlatarev via 3ae54d0 March 16, 2023 16:23
ferrell-code
ferrell-code previously approved these changes Mar 16, 2023
ghzlatarev
ghzlatarev previously approved these changes Mar 16, 2023
Signed-off-by: Adam Reif <Garandor@manta.network>
@Garandor Garandor dismissed stale reviews from ghzlatarev and ferrell-code via 7f1042f March 16, 2023 17:44
@Garandor Garandor merged commit c23fe26 into manta Mar 16, 2023
@Garandor Garandor deleted the garandor/staking-fix branch March 16, 2023 19:57
SupremoUGH pushed a commit that referenced this pull request Mar 17, 2023
…1043)

Signed-off-by: SupremoUGH <francisco@manta.network>
ghzlatarev pushed a commit that referenced this pull request Apr 4, 2023
* new method

Signed-off-by: SupremoUGH <francisco@manta.network>

* checkpoint

Signed-off-by: SupremoUGH <francisco@manta.network>

* Add self-bond filter condition when computing new set of collators (#1043)

Signed-off-by: SupremoUGH <francisco@manta.network>

* everything compiles

Signed-off-by: SupremoUGH <francisco@manta.network>

* typo

Signed-off-by: SupremoUGH <francisco@manta.network>

* chore: add dense_initial_pull

Signed-off-by: SupremoUGH <francisco@manta.network>

* bring back initial_pull

Signed-off-by: SupremoUGH <francisco@manta.network>

* upgrade to 0.5.13

Signed-off-by: SupremoUGH <francisco@manta.network>

* everything compiles

Signed-off-by: SupremoUGH <francisco@manta.network>

* fix cargo lock

Signed-off-by: SupremoUGH <francisco@manta.network>

---------

Signed-off-by: SupremoUGH <francisco@manta.network>
Co-authored-by: Adam Reif <garandor@manta.network>
Co-authored-by: Daniel <danielnickreal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-calamari Area: Issues and PRs related to the Calamari Runtime C-bug Category: Issues documenting a bug L-fixed Log: Issues and PRs related to bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants