-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[AHM/Staking/VMP] Paginated Offence Reports + Retries for Validator Set #9619
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 33 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
73be128
test to demonstrate the issue
kianenigma 9bffa3e
unfinished approach with a complicated queueing, but not tweaking tim…
kianenigma 9705fe3
e2e test works well
kianenigma 339f754
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
kianenigma 32dac67
cleanup and lite self review
kianenigma 6e7ddc6
self review + vmp spamming infra
kianenigma 7840146
more work on vmp spamming demonstration
kianenigma 0864c63
SendQueue -> OffenceSendQueue
kianenigma 3f2ba86
validator set buffering
kianenigma 38ca009
fmtc
kianenigma 7d6659e
self review, westend fixes
kianenigma 33b5298
updates
kianenigma 4ce26f6
Update substrate/frame/staking-async/ah-client/src/lib.rs
kianenigma 6289237
Update substrate/frame/staking-async/ah-client/src/lib.rs
kianenigma efb4cb1
reuse the same offense sending pipeline for migration buffered offences
kianenigma 72b4184
session reprot retry
kianenigma bfb93b0
Merge branch 'kiz-offence-dropping' of github.com:paritytech/polkadot…
kianenigma 16b57f5
Master.into()
kianenigma 8a6f7c8
fmt
kianenigma 8310c67
fix
kianenigma a2ace20
Update from github-actions[bot] running command 'prdoc --bump patch'
github-actions[bot] 0af8f0d
fix prdoc
kianenigma 16694a6
taplo
kianenigma 3b360c6
fully remove old API, fix runtimes
kianenigma a47b525
call indices
kianenigma 3feb2c6
nits
kianenigma 0e55f64
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
kianenigma aa61622
fix
kianenigma c04bc62
fix rustdoc
kianenigma 8a5d5b7
remove bench
kianenigma ad185f4
fix prdoc
kianenigma 8c178fd
Apply suggestion from @kianenigma
kianenigma 1b70662
deeper self review
kianenigma 684b63c
review notes
kianenigma eba827e
fix
kianenigma 1a2deab
Merge branch 'master' into kiz-offence-dropping
kianenigma 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
78 changes: 0 additions & 78 deletions
78
polkadot/runtime/westend/src/weights/pallet_staking_async_ah_client.rs
This file was deleted.
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,46 @@ | ||
| title: '[AHM/Staking/VMP] Paginated Offence Reports + Retries for Validator Set' | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: |- | ||
| This PR makes the following changes: | ||
|
|
||
| #### Common | ||
|
|
||
| * `SendToRelayChain` and `SendToAssetHub` traits now return a result, allowing the caller to know if the underlying XCM was sent or not. | ||
| * Adds a number of testing facilities to `pallet-root-offences`, and `staking-async/papi-tests`. Both of which can be ignored in the review. | ||
|
|
||
| #### Offences | ||
|
|
||
| * Mark `SendToAssetHub::relay_new_offence` as deprecated. This interface is now only used for any offence that might happen during the migration, and thereafter we use the new `relay_new_offence_paged` which is a vector of self-contained offences, not requiring us to group offences per session in each message. | ||
kianenigma marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * Offences are not sent immediately anymore. | ||
| * Instead, they are stored in a paginated `OffenceSendQueue` | ||
| * `on-init`, we grab one page of this storage map, and sent it. | ||
|
|
||
| #### Session Report | ||
| * Session reports now also have a retry mechanism. | ||
| * Upon each failure, we emit an `UnexpectedEvent` | ||
| * If our retries run out and we still can't send the session report, we will emit a different `UnexpectedEvent`. We also retore the validator points that we meant to send, and merge them back, so that they are sent in the next session report. | ||
|
|
||
| #### Validator Set | ||
| * Similar to offences, they are not sent immediately anymore. | ||
| * Instead, they are stored in a storage item, and are sent on subsequent on-inits. | ||
| * A maximum retry count is added. | ||
| crates: | ||
| - name: pallet-offences | ||
| bump: patch | ||
| - name: pallet-root-offences | ||
| bump: major | ||
| - name: pallet-staking-async-ah-client | ||
| bump: major | ||
| - name: pallet-staking-async | ||
| bump: patch | ||
| - name: westend-runtime | ||
| bump: minor | ||
| - name: pallet-staking-async-rc-client | ||
| bump: major | ||
| - name: pallet-staking-async-rc-runtime-constants | ||
| bump: patch | ||
| - name: asset-hub-westend-runtime | ||
| bump: minor | ||
| - name: pallet-election-provider-multi-block | ||
| 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.