1. Apr 01, 2020
  2. Mar 31, 2020
  3. Mar 26, 2020
    • Kian Paimani's avatar
      Offchain Phragmén BREAKING. (#4517) · d1238423
      Kian Paimani authored
      * Initial skeleton for offchain phragmen
      
      * Basic compact encoding decoding for results
      
      * add compact files
      
      * Bring back Self::ensure_storage_upgraded();
      
      * Make staking use compact stuff.
      
      * First seemingly working version of reduce, full of todos
      
      * Everything phragmen related works again.
      
      * Signing made easier, still issues.
      
      * Signing from offchain compile fine 😎
      
      * make compact work with staked asssignment
      
      * Evaluation basics are in place.
      
      * Move reduce into crate. Document stuff
      
      * move reduce into no_std
      
      * Add files
      
      * Remove other std deps. Runtime compiles
      
      * Seemingly it is al stable; cycle implemented but not integrated.
      
      * Add fuzzing code.
      
      * Cleanup reduce a bit more.
      
      * a metric ton of tests for staking; wip 🔨
      
      * Implement a lot more of the tests.
      
      * wip getting the unsigned stuff to work
      
      * A bit gleanup for unsigned debug
      
      * Clean and finalize compact code.
      
      * Document reduce.
      
      * Still problems with signing
      
      * We officaly duct taped the transaction submission stuff. 🤓
      
      * Deadlock with keys again
      
      * Runtime builds
      
      * Unsigned test works 🙌
      
      * Some cleanups
      
      * Make all the tests compile and stuff
      
      * Minor cleanup
      
      * fix more merge stuff
      
      * Most tests work again.
      
      * a very nasty bug in reduce
      
      * Fix all integrations
      
      * Fix more todos
      
      * Revamp everything and everything
      
      * Remove bogus test
      
      * Some review grumbles.
      
      * Some fixes
      
      * Fix doc test
      
      * loop for submission
      
      * Fix cli, keyring etc.
      
      * some cleanup
      
      * Fix staking tests again
      
      * fix per-things; bring patches from benchmarking
      
      * better score prediction
      
      * Add fuzzer, more patches.
      
      * Some fixes
      
      * More docs
      
      * Remove unused generics
      
      * Remove max-nominator footgun
      
      * Better fuzzer
      
      * Disable it 
      
      
      
      * Bump.
      
      * Another round of self-review
      
      * Refactor a lot
      
      * More major fixes in perThing
      
      * Add new fuzz file
      
      * Update lock
      
      * fix fuzzing code.
      
      * Fix nominator retain test
      
      * Add slashing check
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarJoshy Orndorff <[email protected]>
      
      * Some formatting nits
      
      * Review comments.
      
      * Fix cargo file
      
      * Almost all tests work again
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Fix review comments
      
      * More review stuff
      
      * Some nits
      
      * Fix new staking / session / babe relation
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/compact/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Some doc updates to slashing
      
      * Fix derive
      
      * Remove imports
      
      * Remove unimplemented tests
      
      * nits
      
      * Remove dbg
      
      * Better fuzzing params
      
      * Remove unused pref map
      
      * Deferred Slashing/Offence for offchain Phragmen  (#5151)
      
      * Some boilerplate
      
      * Add test
      
      * One more test
      
      * Review comments
      
      * Fix build
      
      * review comments
      
      * fix more
      
      * fix build
      
      * Some cleanups and self-reviews
      
      * More minor self reviews
      
      * Final nits
      
      * Some merge fixes.
      
      * opt comment
      
      * Fix build
      
      * Fix build again.
      
      * Update frame/staking/fuzz/fuzz_targets/submit_solution.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/slashing.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/offchain_election.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Fix review comments
      
      * fix test
      
      * === 🔑
      
       Revamp without staking key.
      
      * final round of changes.
      
      * Fix cargo-deny
      
      * Update frame/staking/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      d1238423
    • Marcio Diaz's avatar
      Benchmark Democracy Pallet (#5257) · 2b89e83d
      Marcio Diaz authored
      
      
      * Add origin bounds to benchmark macro.
      
      * Add democracy benchmark.
      
      * Fix tests
      
      * Remove collective from frame/benchmarking, partially use EnsureOrigin.
      
      * Remove collective stuff.
      
      * Make previous benches compile again.
      
      * Remove comments.
      
      * Make prev bench to work again.
      
      * Add remove votes.
      
      * Add new proxy calls.
      
      * Add runtime-benchmarks guard to EnsureOrigin and implementations.
      
      * Refactor.
      
      * Add missing import.
      
      * Remove duplicated import
      
      * Fix features.
      
      * Add some missing features.
      
      * Update frame/collective/Cargo.toml
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/democracy/src/benchmarking.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/democracy/src/benchmarking.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Add referendums to state.
      
      * populate vecs before call
      
      * Update weight docs
      
      * More fixes and weight docs
      
      * More updates
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      2b89e83d
    • Kian Paimani's avatar
      Mandate weight annotation (#5357) · 9e197396
      Kian Paimani authored
      * Disallow default weight
      
      * Fix build and test
      
      * Fix tests
      
      * Fix another beloved ui test.
      
      * fix beloved trybuild tests
      
      * fix treasury?
      
      * Final test fix
      
      * Fix build
      
      * Fix another one
      
      * Fix
      
      * More doctest fix
      9e197396
    • thiolliere's avatar
      Make Staking pallet using a proper Time module. (#4662) · 43c716b2
      thiolliere authored
      
      
      * add new trait, still migration to make
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * implement migration
      
      * better naming
      
      * fix test
      
      * no longer require DeprecatedTime
      
      * add test
      
      * fix version
      
      * upgrade only from kusama
      
      * add test
      
      * fix test
      
      * Update frame/timestamp/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      43c716b2
  4. Mar 25, 2020
  5. Mar 24, 2020
  6. Mar 23, 2020
  7. Mar 21, 2020
    • Gavin Wood's avatar
      Redesign Democracy pallet (#5294) · 2eb9c260
      Gavin Wood authored
      * Repot a bit of democracy code
      
      * Basic logic is drafted
      
      * Lazy democracy builds.
      
      * Add non-locked split-voting and instant-scheduling.
      
      * Introduce delegation that works.
      
      * Builds again.
      
      * Indentation
      
      * Building.
      
      * Docs and migration
      
      * Fix half of the tests
      
      * Fix up & repot tests
      
      * Fix runtime build
      
      * Update docs
      
      * Docs
      
      * Nits.
      
      * Turnout counts full capital
      
      * Delegations could towards capital
      
      * proxy delegation & proxy unvoting
      
      * Fix
      
      * Tests for split-voting
      
      * Add missing file
      
      * Persistent locking.
      2eb9c260
  8. Mar 20, 2020
  9. Mar 19, 2020
  10. Mar 17, 2020
    • Shawn Tabrizi's avatar
      Benchmark Staking and Session Pallet (#5183) · e59f6920
      Shawn Tabrizi authored
      
      
      * starting bench
      
      * More
      
      * more
      
      * Payout Validator
      
      * Give each validator exactly n nominators
      
      * Update with test
      
      * Try to add accounts to chain spec
      
      * Undo changes to chainspec
      
      * Payout nominator
      
      * Rebond and Reap Stash
      
      * Set history depth
      
      * fix smelly code
      
      * cancel deferred slash
      
      * new_era bench
      
      * do_slash benchmark
      
      * Add features
      
      * undo extrinsic move
      
      * lower
      
      * Update new era
      
      * Update benchmarking.rs
      
      * whitespace
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * fixes
      
      * nit
      
      * Refactor tests, initial code
      
      * Move session benchmarks to avoid cyclic deps
      
      * Update lib.rs
      
      * Fix warnings
      
      * Move impl
      
      * Update to do random nominator allocation
      
      * add feature to benchmark pallet
      
      * Remove extra stuff
      
      * Update based on feedback
      
      * Less intrusive
      
      * Remove `transfer_idle_users`
      
      * remove again
      
      * unused dep
      
      * test feature flag
      
      * Update to latest substrate
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      e59f6920
  11. Mar 16, 2020
    • Gavin Wood's avatar
      Refactor away from opaque hashes (#5226) · dd97b147
      Gavin Wood authored
      
      
      * System.BlockHash
      
      * Fix hash
      
      * Introduce K/V iteration in all _concat maps
      
      Also move across:
      - System.Account (blake2_128_concat)
      - Balances.Locks (twox_64_concat)
      - ElectionsPhragmen.VotesOf (twox_64_concat)
      - ElectionsPhragmen.StakeOf (twox_64_concat)
      - Identity.IdentityOf (twox_64_concat)
      - Identity.SubsOf (twox_64_concat)
      - Society.Payouts (twox_64_concat)
      - Session.NextKeys (twox_64_concat)
      - Identity.SuperOf (blake2_128_concat)
      - Session.KeyOwner (blake2_128_concat)
      - Society.SuspendedCandidates (twox_64_concat)
      - Society.SuspendedMembers (twox_64_concat)
      - Society.Vouching (twox_64_concat)
      - Society.Strikes (twox_64_concat)
      - System.EventTopics
      - Balances.Account
      
      * Build fixes
      
      * Ensure migration happens in correct order
      
      * Staking.*
      
      * Vesting.* Offences.*
      
      * Democracy.*
      
      * Babe.* Collective.*
      
      * Grandpa.*
      
      * Assets.* Benchmark.* Contracts.* Elections.* Asset.* Nicks.*
      
      Also introduce real account list
      
      * ImOnline.*
      
      * Treasury.*
      
      * Recovery.*
      
      * Final bits.
      
      * Docs
      
      * Fix one test
      
      * Fix test
      
      * All passing except the UI tests
      
      * Remove linked_map part 1
      
      * Remove linked_map
      
      * Some iterator utils for double maps.
      
      * Remove old migrations
      
      * Introduce tombstone for LinkedMap type
      
      * Migration for genesis hash
      
      * Fix build
      
      * Fix hash
      
      * Rename Map is_linked -> unused, keeping backwards compat (#5256)
      
      * Update frame/balances/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/elections/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Remove old migration code.
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update bin/node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Fix hash
      
      * fix session migration
      
      * Fix watning
      
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      dd97b147
  12. Mar 14, 2020
  13. Mar 11, 2020
  14. Mar 10, 2020
  15. Mar 09, 2020
  16. Mar 06, 2020
  17. Mar 05, 2020
  18. Mar 03, 2020
    • Gavin Wood's avatar
      Lazy payouts (#4474) · 75116bd8
      Gavin Wood authored
      * TODOs
      
      * Remove superfluous:
      
      * partial implementation
      
      * full implementation
      
      * fix preferences
      
      * update comments
      
      * upgrade test WIP
      
      * fix more tests
      
      * fix cutoff
      
      * fix saturation
      
      * comment
      
      * upgrade mock
      
      * upgrade test
      
      * WIP migration
      
      * WIP migration
      
      * remove slot stake stuff
      
      * fix merge
      
      * migration of ledger
      
      * remove equalize from test
      
      * add test
      
      * fix
      
      * update doc
      
      * fix compilation
      
      * improve test readibility
      
      * improve doc
      
      * fix most todo
      
      * fix migration and test
      
      * remove println
      
      * WIP
      
      * add test and spec
      
      * weight
      
      * update doc
      
      * safer end_era
      
      * fix exposure of conversion
      
      * Revert "safer end_era"
      
      This reverts commit 72ff737d
      
      .
      
      * fix useless put
      
      * exposure clipped
      
      * doc
      
      * fix payout with clipped
      
      * fix node runtime
      
      * add doc
      
      * pluggable and generalized staking module
      
      * remove print
      
      * update doc
      
      * refactor
      
      * improve documentation and implementation
      
      * fix test
      
      * Fix test
      
      * fix test
      
      * fix test
      
      * fix remove lowest stake from exposure, not biggest.
      
      * nomination index arguments in nominator_payout
      
      * add test
      
      * try to fix offence
      
      * apply slashed and bond eras until active era
      
      * doc
      
      * update spec version
      
      * add test upgrade from previous test environment
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * nominators upgrade has been cleaned
      
      * dynamic history depth implementation
      
      * make current_era - history_depth included
      
      * Change equality check to start era to less than or equal
      
      * Use era specific validator prefs
      
      * Add print statement and comment about start era if <
      
      * fix next_reward overflow
      
      * make more check for bad era claim for zero cost
      
      * small refactor
      
      * code refactor + fix use of deprecated storage
      
      * fix wasm build
      
      * add comment
      
      * Fix tests
      
      * remove outdated comment
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * gather active era information into one storage
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      75116bd8
  19. Mar 02, 2020
  20. Feb 28, 2020
  21. Feb 26, 2020
    • Eric's avatar
      Fix/div by zero (#5041) · 5b415750
      Eric authored
      * Handle gas_price being zero separately
      
      * Bump spec_version
      
      * Add a unit & integration tests for gas price = 0
      5b415750