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 #6540 #6592

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Conversation

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

Backport #6540 into stable2409 from Ank4n.

See the documentation on how to use this bot.

@paritytech-cmd-bot-polkadot-sdk
Copy link
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-6540-to-stable2409
git worktree add --checkout .worktree/backport-6540-to-stable2409 backport-6540-to-stable2409
cd .worktree/backport-6540-to-stable2409
git reset --hard HEAD^
git cherry-pick -x bf20a9ee18f7215210bbbabf79e955c8c35b3360
git push --force-with-lease

Copy link

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: check-tracing
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7797721

…ash amount is atleast ED (#6540)

This change prevents `pools::apply_slash` from being executed when the
pending slash amount of the member is lower than the ED.

The issue came to light with the failing [benchmark
test](https://github.com/polkadot-fellows/runtimes/actions/runs/11879471717/job/33101445269?pr=490#step:11:765)
in Kusama. The problem arises from the inexact conversion between points
and balance. Specifically, when points are converted to balance and then
back to points, rounding can introduce a small discrepancy between the
input and the resulting value. This issue surfaced in Kusama due to its
ED being different from Westend and Polkadot (1 UNIT/300), making the
rounding issue noticeable.

This fix is also significant because applying a slash is feeless and
permissionless. Allowing super small slash amounts to be applied without
a fee is undesirable. With this change, such small slashes will still be
applied but only when member funds are withdrawn.

---------

Co-authored-by: Dónal Murray <[email protected]>
(cherry picked from commit bf20a9e)
@Ank4n Ank4n force-pushed the backport-6540-to-stable2409 branch from 21a6b10 to 4d15745 Compare November 21, 2024 18:33
@Ank4n Ank4n marked this pull request as ready for review November 21, 2024 19:00
Ank4n
Ank4n previously approved these changes Nov 21, 2024
@Ank4n Ank4n requested a review from seadanda November 21, 2024 19:01
- name: pallet-nomination-pools-runtime-api
bump: patch
- name: pallet-nomination-pools
bump: major
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we currently deal with backporting major changes? Something smells about that, depending how far back we go

Copy link
Contributor

Choose a reason for hiding this comment

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

@seadanda I assume it will only patch the existing release.

Also, practically this may not be a breaking change (I think). The client gets the new type information from the metadata, and the module error is only really for error description. Changes in Storage or RuntimeCall are more critical as some dapp's business logic may depend on it.

I could make one of the following change if that helps:

  • Add the new error variant to the end so existing indexes are not affected.
  • The backport version does not add the new error and reuses one of the existing errors.

@Ank4n
Copy link
Contributor

Ank4n commented Nov 30, 2024

/cmd prdoc --bump patch --audience runtime_user

Copy link

github-actions bot commented Nov 30, 2024

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.

@EgorPopelyaev EgorPopelyaev merged commit 319b07f into stable2409 Dec 9, 2024
157 of 189 checks passed
@EgorPopelyaev EgorPopelyaev deleted the backport-6540-to-stable2409 branch December 9, 2024 14:06
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.

6 participants