1. Dec 26, 2022
  2. Dec 08, 2022
    • Keith Yeung's avatar
      Introduce sensible weight constants (#12868) · 51db8c77
      Keith Yeung authored
      * Introduce sensible weight constants
      
      * cargo fmt
      
      * Remove unused import
      
      * Add missing import
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery
      
      Co-authored-by: command-bot <>
      51db8c77
  3. Nov 09, 2022
    • Ankan's avatar
      Bound Election and Staking by MaxActiveValidators (#12436) · 657d9920
      Ankan authored
      
      
      * bounding election provider with kian
      
      * multi phase implement bounded election provider
      
      * election provider blanket implementation
      
      * staking compiles
      
      * fix test for election provider support
      
      * fmt
      
      * fixing epmp tests, does not compile yet
      
      * fix epmp tests
      
      * fix staking tests
      
      * fmt
      
      * fix runtime tests
      
      * fmt
      
      * remove outdated wip tags
      
      * add enum error
      
      * sort and truncate supports
      
      * comment
      
      * error when unsupported number of election winners
      
      * compiling wip after kian's suggestions
      
      * fix TODOs
      
      * remove,fix tags
      
      * ensure validator count does not exceed maxwinners
      
      * clean up
      
      * some more clean up and todos
      
      * handle too many winners
      
      * rename parameter for mock
      
      * todo
      
      * add sort and truncate rule if there are too many winners
      
      * fmt
      
      * fail, not swallow emergency result bound not met
      
      * remove too many winners resolution as it can be guaranteed to be bounded
      
      * fix benchmark
      
      * give MaxWinners more contextual name
      
      * make ready solution generic over T
      
      * kian feedback
      
      * fix stuff
      
      * Kian's way of solvign this
      
      * comment fix
      
      * fix compile
      
      * remove use of BoundedExecution
      
      * fmt
      
      * comment out failing integrity test
      
      * cap validator count increment to max winners
      
      * dont panic
      
      * add test for bad data provider
      
      * Update frame/staking/src/pallet/impls.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix namespace conflict and add test for onchain max winners less than desired targets
      
      * defensive unwrap
      
      * early convert to bounded vec
      
      * fix syntax
      
      * fmt
      
      * fix doc
      
      * fix rustdoc
      
      * fmt
      
      * fix maxwinner count for benchmarking
      
      * add instant election for noelection
      
      * fmt
      
      * fix compile
      
      * pr feedbacks
      
      * always error at validator count exceeding max winners
      
      * add useful error message
      
      * pr comments
      
      * import fix
      
      * add checked_desired_targets
      
      * fmt
      
      * fmt
      
      * fix rust doc
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarkianenigma <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      657d9920
  4. Nov 08, 2022
  5. Oct 29, 2022
  6. Sep 29, 2022
    • Keith Yeung's avatar
      Properly set the max proof size weight on defaults and tests (#12383) · a4fb1d70
      Keith Yeung authored
      * Properly set the max proof size weight on defaults and tests
      
      * cargo fmt
      
      * Set proper max proof size for contracts pallet tests
      
      * Properly set max proof size for node
      
      * Properly set max proof size for frame system mock
      
      * Update test expectations
      
      * Update test expectations
      
      * Properly set max proof size for balances mock
      
      * Update test expectations
      
      * Update test expectations
      
      * Properly set max proof size for democracy mock
      
      * Properly set max proof size for scheduler mock
      
      * Properly set max proof size for fast unstake mock
      
      * Properly set max proof size for tx payment mock
      
      * Properly set max proof size for elections phragmen mock
      
      * Properly set max proof size for node template
      a4fb1d70
  7. Sep 28, 2022
    • Ankan's avatar
      bounding staking: `BoundedElectionProvider` trait (#12362) · 6137c870
      Ankan authored
      * add a bounded election provider trait
      
      * extract common trait election provider base
      
      * fmt
      
      * only bound the outer support vector
      
      * fix tests
      
      * docs
      
      * fix rust docs
      
      * fmt
      
      * fix rustdocs
      
      * docs
      
      * improve docs
      
      * small doc change
      6137c870
  8. Sep 27, 2022
    • Roman Useinov's avatar
      [Feature] Add deposit to fast-unstake (#12366) · 1f687256
      Roman Useinov authored
      
      
      * [Feature] Add deposit to fast-unstake
      
      * disable on ErasToCheckPerBlock == 0
      
      * removed signed ext
      
      * remove obsolete import
      
      * remove some obsolete stuff
      
      * fix some comments
      
      * fixed all the comments
      
      * remove obsolete imports
      
      * fix some tests
      
      * CallNotAllowed tests
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix tests
      
      * fix deregister + tests
      
      * more fixes
      
      * make sure we go above existential deposit
      
      * fixed the last test
      
      * some nit fixes
      
      * fix node
      
      * fix bench
      
      * last bench fix
      
      * Update frame/fast-unstake/src/lib.rs
      
      * ".git/.scripts/fmt.sh" 1
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      1f687256
  9. Sep 26, 2022
  10. Sep 23, 2022
    • Kian Paimani's avatar
      Fast Unstake Pallet (#12129) · b56c0e4c
      Kian Paimani authored
      * add failing test for itamar
      
      * an ugly example of fast unstake
      
      * Revert "add failing test for itamar"
      
      This reverts commit 16c4d8015698a0684c090c54fce8b470a2d2feb2.
      
      * fast unstake wip
      
      * clean it up a bit
      
      * some comments
      
      * on_idle logic
      
      * fix
      
      * comment
      
      * new working version, checks all pass, looking good
      
      * some notes
      
      * add mock boilerplate
      
      * more boilerplate
      
      * simplify the weight stuff
      
      * ExtBuilder for pools
      
      * fmt
      
      * rm bags-list, simplify setup_works
      
      * mock + tests boilerplate
      
      * make some benchmarks work
      
      * mock boilerplate
      
      * tests boilerplate
      
      * run_to_block works
      
      * add Error enums
      
      * add test
      
      * note
      
      * make UnstakeRequest fields pub
      
      * some tests
      
      * fix origin
      
      * fmt
      
      * add fast_unstake_events_since_last_call
      
      * text
      
      * rewrite some benchmes and fix them -- the outcome is still strange
      
      * Fix weights
      
      * cleanup
      
      * Update frame/election-provider-support/solution-type/src/single_page.rs
      
      * fix build
      
      * Fix pools tests
      
      * iterate teset + mock
      
      * test unfinished
      
      * cleanup and add some tests
      
      * add test successful_multi_queue
      
      * comment
      
      * rm Head check
      
      * add TODO
      
      * complete successful_multi_queue
      
      * + test early_exit
      
      * fix a lot of things above the beautiful atlantic ocean 🌊
      
      
      
      * seemingly it is finished now
      
      * Fix build
      
      * ".git/.scripts/fmt.sh" 1
      
      * Fix slashing amount as well
      
      * better docs
      
      * abstract types
      
      * rm use
      
      * import
      
      * Update frame/nomination-pools/benchmarking/src/lib.rs
      
      Co-authored-by: default avatarNitwit <[email protected]>
      
      * Update frame/fast-unstake/src/types.rs
      
      Co-authored-by: default avatarNitwit <[email protected]>
      
      * Fix build
      
      * fmt
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * make bounded
      
      * feedback from code review with Ankan
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/lib.rs
      
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      
      * Update frame/fast-unstake/src/mock.rs
      
      * update to master
      
      * some final review comments
      
      * fmt
      
      * fix clippy
      
      * remove unused
      
      * ".git/.scripts/fmt.sh" 1
      
      * make it all build again
      
      * fmt
      
      * undo fishy change
      
      Co-authored-by: default avatarRoss Bulat <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarNitwit <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarRoman Useinov <[email protected]>
      b56c0e4c