-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add storage bounds for pallet staking and clean up deprecated non paged exposure storages
#6445
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
Changes from 41 commits
6c808b6
1b18bb1
0ac60af
4edb8e1
65c7de6
35069c9
d4b15af
eb93a70
58cf45d
292c5d0
74f2055
63f2c5e
b249a67
362f505
4f21d53
e258baf
4b7d896
01e2233
243bec8
a599afc
9a25fbc
98daabc
aec5087
36204da
18e9bee
cbfd4a5
b5cbfec
9ca25a1
10e7295
b3186b1
336137a
c1911e1
2ac794e
583e46d
6347a8c
9e82b85
1db7f39
f996a97
e030506
3ab45d9
a980daa
827e898
c4d5142
df8e567
c066632
686b6b3
9cf2263
21ad9ea
ca881ac
e986264
ea59383
9a21b8f
47863bb
50ce1a1
40ccdec
c3365a6
584fe53
5333a7d
31a9300
898d469
32df05d
7bc9b98
9c4d874
536d5c5
608ec88
76469ea
fb1a4fa
181fe4d
b1f5f97
9c002c1
503a7d9
63a18b1
49059c0
efde7a7
8186680
3fb6ca7
66923a4
bec0544
3708085
73af22a
1139689
2bda8eb
fe3147b
cd8a0c3
5b15e24
9d055a8
07b021b
87e0e46
473e0ff
eb64ffc
74d6c7a
94f5b31
7b1fc5e
cf9d8c3
c265974
bb5229c
6588714
4754629
76a2d4b
67c41fa
bd28db5
043b7d6
68481f4
312904e
d508f8d
529fa0f
17eeef7
21a12d1
e2fa0ca
4bf3cd6
f7c1fe4
c881bb0
306cd41
2da736a
831f1b0
3702ce5
489fc9d
65fc95b
9c88d39
a5e98e6
7b82520
30520af
0d47dc5
4b58f0a
33e59b2
c889905
300b7f9
fc63dc7
720c9eb
a065a91
483eb03
7aeb8a5
c51d09b
1a9be6b
235a260
83a888b
b2efa18
78539f0
1a39de4
3b7bc95
dc93f0f
e6c9942
d91414b
9d2e835
88d20a3
649b0f9
6c9806c
6ca4347
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -716,6 +716,7 @@ parameter_types! { | |
| pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); | ||
| // 2 eras for unbonding (12 hours). | ||
| pub const BondingDuration: sp_staking::EraIndex = 2; | ||
| pub const MaxBondedEras: u32 = (BondingDuration::get() as u32) + 1; | ||
| // 1 era in which slashes can be cancelled (6 hours). | ||
| pub const SlashDeferDuration: sp_staking::EraIndex = 1; | ||
| pub const MaxExposurePageSize: u32 = 64; | ||
|
|
@@ -738,6 +739,7 @@ impl pallet_staking::Config for Runtime { | |
| type Reward = (); | ||
| type SessionsPerEra = SessionsPerEra; | ||
| type BondingDuration = BondingDuration; | ||
| type MaxBondedEras = MaxBondedEras; | ||
| type SlashDeferDuration = SlashDeferDuration; | ||
| type AdminOrigin = EitherOf<EnsureRoot<AccountId>, StakingAdmin>; | ||
| type SessionInterface = Self; | ||
|
|
@@ -756,6 +758,7 @@ impl pallet_staking::Config for Runtime { | |
| type EventListeners = (NominationPools, DelegatedStaking); | ||
| type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>; | ||
| type DisablingStrategy = pallet_staking::UpToLimitWithReEnablingDisablingStrategy; | ||
| type MaxInvulnerables = frame_support::traits::ConstU32<20>; | ||
| } | ||
|
|
||
| impl pallet_fast_unstake::Config for Runtime { | ||
|
|
@@ -1839,6 +1842,7 @@ pub mod migrations { | |
| parachains_shared::migration::MigrateToV1<Runtime>, | ||
| parachains_scheduler::migration::MigrateV2ToV3<Runtime>, | ||
| pallet_staking::migrations::v16::MigrateV15ToV16<Runtime>, | ||
| pallet_staking::migrations::v17::MigrateV16ToV17<Runtime>, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can check the logs for this migration in this CI job: there seems to be some error-ish logs in there:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Solved with EDIT: I can also see a third option: merge pages for old items until they are less than 20.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think using |
||
| // permanent | ||
| pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>, | ||
| ); | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.