-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Raise offence queue eras bound limit #11435
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
26a5a50
raise offence queue eras bound limit
cirko33 1ec3d82
Update from github-actions[bot] running command 'prdoc --audience run…
github-actions[bot] 83a0e95
Update from github-actions[bot] running command 'prdoc --audience run…
github-actions[bot] ed2e2cb
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 11f0815
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 b821916
Update from github-actions[bot] running command 'bench --pallet palle…
github-actions[bot] 75bae3b
update prdoc
cirko33 74dcf8d
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 753358e
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 3bd444a
Merge branch 'master' into cirko33-offence-queue-raise-limit
Ank4n 2ad136e
update offence processing limits in staking-async pallet
cirko33 7a4788f
add explaination comment & add unit test
cirko33 3526dfc
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 4729384
naming and comment refactor
cirko33 dc40626
fix test and fmt
cirko33 ee007e9
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 b6b7015
comment fix
cirko33 ce9b59e
update prdoc
cirko33 c60f124
sub instead of add & fix tests
cirko33 005bc7f
fmt
cirko33 d3adf1d
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 a8b5acd
fixed comment
cirko33 339c342
adjust test to use 2 eras instead of 3
cirko33 89226e2
update comment
cirko33 bbea93f
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 7a253fe
Merge branch 'master' into cirko33-offence-queue-raise-limit
cirko33 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
984 changes: 806 additions & 178 deletions
984
cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_staking_async.rs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| title: Raise offence queue eras bound limit | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: Fixes a bug where OffenceQueueEras bound (BondingDuration) was incorrect when SlashDeferDuration=0. The oldest reportable offence era formula allowed more eras than the bound could hold. | ||
| crates: | ||
| - name: pallet-staking-async | ||
| bump: minor | ||
| - name: asset-hub-westend-runtime | ||
| bump: patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What is the purpose of this? Why is it 10? Why isn't it used anywhere besides the
Getimpl below?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.
The scope could be limited since it's used only in the get impl below indeed - that came from (my 😅 ) comment where magic number 10 was used in two different places - but can be revised and kept where it is used only.
About why 10 and not 20, or 2*bonding_duration or anything else - this is very arbitrary. My understanding of this issue - but please @Ank4n , and @cirko33 (these days at EthCc so might not answer promptly) is that
BondingDuration.WeakBoundedVectorhere is not to protect against offence spam vs slow processing but rather being robust in case during a runtime upgrade we lowerBondingDurationand then we still want to be sure to be able to process offences from old eras that wouldn't fit in the post-RUOffenceQueueEras. Now,10is a magic number that might or might not work in this case and whatever number might not be good enough here. If we want to be more robust, and we still don't want to go for the hackish way of going through Vec conversion +force_from()discussed in other comments in this PR, one could assume that in the case someone wants to lower BondingDuration, it must provides also an ad-hoc migration or something like that.Wdyt?