Skip to content
  • Ankan's avatar
    Bound staking storage items (#12230) · c6a9abcc
    Ankan authored
    
    
    * replace pallet level unboundedness to individual storage items
    
    * bound structs
    
    * bounding history depth
    
    * defensive error
    
    * use the era history depth from config
    
    * clean up history depth from storage in v11
    
    * keep the name HistoryDepth for the new configuration value
    
    * use u32 for history depth in node runtime
    
    * improve doc comments
    
    * add HistoryDepth to mock runtimes with pallet-staking
    
    * rustfmt
    
    * refactor and doc improve
    
    * apply re-benchmarked weight for staking
    
    * pr feedback improvements
    
    * test for claimed rewards following the expected bounds
    
    * refactor test to calculate first and last reward era programmatically
    
    * verify previous eras cannot be claimed
    
    * add migration v12
    
    * ".git/.scripts/bench-bot.sh" pallet dev pallet_staking
    
    * fix compiler error
    
    * corrupting history depth does not lead to catastrophic issue
    
    * fix new line
    
    * remove unused import
    
    * fmt
    
    * add test to document scenario where history depth is reduced without migration
    
    * fmt
    
    * Update frame/staking/src/lib.rs
    
    Co-authored-by: default avatarKian Paimani <[email protected]>
    
    * Update frame/staking/src/migrations.rs
    
    Co-authored-by: default avatarKian Paimani <[email protected]>
    
    * doc for all storage items bounded by HistoryDepth
    
    * Update frame/staking/src/pallet/mod.rs
    
    Co-authored-by: default avatarKian Paimani <[email protected]>
    
    * Update frame/staking/src/tests.rs
    
    Co-authored-by: default avatarKian Paimani <[email protected]>
    
    * pr feedback fixes
    
    * Update frame/staking/src/tests.rs
    
    Co-authored-by: default avatarKian Paimani <[email protected]>
    
    * remove extra checks
    
    * fix merge
    
    * fmt
    
    Co-authored-by: command-bot <>
    Co-authored-by: default avatarKian Paimani <[email protected]>
    Co-authored-by: default avatarkianenigma <[email protected]>
    c6a9abcc