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

Staking ledger bonding fixes #3639

Merged
merged 23 commits into from
Mar 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
30b00e3
Add more try runtime checks to staking
gpestana Feb 28, 2024
8b49b43
more changes
gpestana Mar 1, 2024
20a87e2
clean up
gpestana Mar 6, 2024
bb837d2
Merge branch 'master' into gpestana/3245ledger_consistency_runtimecheck
gpestana Mar 6, 2024
31cbd74
fixes set controller and batch deprecation when controller is double …
gpestana Mar 11, 2024
6bc85bc
removes unecessary warns
gpestana Mar 11, 2024
16a692e
prevents controller to become a stash
gpestana Mar 13, 2024
47f9e25
warn only try-runtime checks
gpestana Mar 13, 2024
8ed57de
prevents calling bond_extra in inconsistent ledgers
gpestana Mar 13, 2024
410d784
Update substrate/frame/staking/src/mock.rs
gpestana Mar 13, 2024
86b0ad7
adds bad state checks at the staking ledger level; ensures all access…
gpestana Mar 13, 2024
6e16fa4
nit
gpestana Mar 13, 2024
5986a4e
comments nits
gpestana Mar 13, 2024
578a407
add tests for staking ledger fetch in bad state
gpestana Mar 13, 2024
8dd4818
adds prdoc
gpestana Mar 13, 2024
52c648e
fixes prdoc
gpestana Mar 13, 2024
e3e9672
Update substrate/frame/staking/src/ledger.rs
gpestana Mar 13, 2024
541037f
Update substrate/frame/staking/src/ledger.rs
gpestana Mar 13, 2024
0c1bff6
replaces btreemap with btreeset in try runtime checks
gpestana Mar 13, 2024
371b0cf
simplifies getter check
gpestana Mar 13, 2024
4670659
check if bonded controller is the expected
gpestana Mar 13, 2024
649bf59
Merge branch 'master' into gpestana/3245ledger_consistency_runtimecheck
gpestana Mar 14, 2024
0dde68a
Empty-Commit
kianenigma Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes prdoc
  • Loading branch information
gpestana committed Mar 13, 2024
commit 52c648e8acfd52fbedb58fb4743a312a889930ba
4 changes: 2 additions & 2 deletions prdoc/pr_3639.prdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ doc:
- audience: Runtime User
description: |
This PR introduces a fix to the staking logic which prevents an existing controller from bonding as a stash of another ledger, which
lead to staking ledger inconsistencies down the line. In addition, it adds a few (temporary) gates to prevent ledgers that are already
in a bad state from mutating its state.
lead to staking ledger inconsistencies down the line. In addition, it adds a few (temporary) gates to prevent ledgers that are already
in a bad state from mutating its state.

In summary:
* Checks if stash is already a controller when calling `Call::bond` and fails if that's the case;
Expand Down
Loading