1. Apr 26, 2024
  2. Apr 20, 2024
    • Ankan's avatar
      Allow privileged virtual bond in Staking pallet (#3889) · e504c41a
      Ankan authored
      This is the first PR in preparation for
      https://github.com/paritytech/polkadot-sdk/issues/454.
      
      ## Follow ups:
      - https://github.com/paritytech/polkadot-sdk/pull/3904.
      - https://github.com/paritytech/polkadot-sdk/pull/3905.
      
      Overall changes are documented here (lot more visual 😍):
      https://hackmd.io/@ak0n/454-np-governance
      
      [Maybe followup](https://github.com/paritytech/polkadot-sdk/issues/4217)
      with migration of storage item `VirtualStakers` as a bool or enum in
      `Ledger`.
      
      ## Context
      We want to achieve a way for a user (`Delegator`) to delegate their
      funds to another account (`Agent`). Delegate implies the funds are
      locked in delegator account itself. Agent can act on behalf of delegator
      to stake directly on Staking pallet.
      
      The delegation feature is added to Staking via another pallet
      `delegated-staking` worked on
      [here](https://github.com/paritytech/polkadot-sdk/pull/3904).
      
      ## Introduces:
      ### StakingUnchecked Trait
      As the name implies, this trait allows unchecked (non-locked) mutation
      of staking ledger. These apis are only meant to be used by other pallets
      in the runtime and should not be exposed directly to user code path.
      Also related: https://github.com/paritytech/polkadot-sdk/issues/3888.
      
      ### Virtual Bond
      Allows other pallets to stake via staking pallet while managing the
      locks on these accounts themselves. Introduces another storage
      `VirtualStakers` that whitelist these accounts.
      
      We also restrict virtual stakers to set reward account as themselves.
      Since the account has no locks, we cannot support compounding of
      rewards. Conservatively, we require them to set a separate account
      different from the staker. Since these are code managed, it should be
      easy for another pallet to redistribute reward and rebond them.
      
      ### Slashes
      Since there is no actual lock maintained by staking-pallet for virtual
      stakers, this pallet does not apply any slashes. It is then important
      for pallets managing virtual stakers to listen to slashing events and
      apply necessary slashes.
      e504c41a
  3. Nov 24, 2023
  4. Oct 15, 2023
    • Gonçalo Pestana's avatar
      Refactor staking ledger (#1484) · 8ee4042c
      Gonçalo Pestana authored
      This PR refactors the staking ledger logic to encapsulate all reads and
      mutations of `Ledger`, `Bonded`, `Payee` and stake locks within the
      `StakingLedger` struct implementation.
      
      With these changes, all the reads and mutations to the `Ledger`, `Payee`
      and `Bonded` storage map should be done through the methods exposed by
      StakingLedger to ensure the data and lock consistency of the operations.
      The new introduced methods that mutate and read Ledger are:
      
      - `ledger.update()`: inserts/updates a staking ledger in storage;
      updates staking locks accordingly (and ledger.bond(), which is synthatic
      sugar for ledger.update())
      - `ledger.kill()`: removes all Bonded and StakingLedger related data for
      a given ledger; updates staking locks accordingly;
      `StakingLedger::get(account)`: queries both the `Bonded` and `Ledger`
      storages and returns a `Option<StakingLedger>`. The pallet impl exposes
      fn ledger(account) as synthatic sugar for `StakingLedger::get(account)`.
      
      Retrieving a ledger with `StakingLedger::get()` can be done by providing
      either a stash or controller account. The input must be wrapped in a
      `StakingAccount` variant (Stash or Controller) which is treated
      accordingly. This simplifies the caller API but will eventually be
      deprecated once we completely get rid of the controller account in
      staking. However, this refactor will help with the work necessary when
      completely removing the controller.
      
      Other goals:
      
      - No logical changes have been introduced in this PR;
      - No breaking changes or updates in wallets required;
      - No new storage items or need to perform storage migrations;
      - Centralise the changes to bonds and ledger updates to simplify the
      OnStakingUpdate updates to the target list (related to
      https://github.com/paritytech/polkadot-sdk/issues/443)
      
      Note: it would be great to prevent or at least raise a warning if
      `Ledger<T>`, `Payee<T>` and `Bonded<T>` storage types are accessed
      outside the `StakingLedger` implementation. This PR should not get
      blocked by that feature, but there's a tracking issue here
      https://github.com/paritytech/polkadot-sdk/issues/149
      
      Related and step towards
      https://github.com/paritytech/polkadot-sdk/issues/443
      8ee4042c
  5. Mar 13, 2023
    • Vivek Pandya's avatar
      Remove use of trait Store from all pallets and deprecate it. (#13535) · 2009821c
      Vivek Pandya authored
      * Remove use of trait Store from staking pallet
      
      * Remove use of trait Store from bounties pallet
      
      * Remove use of trait Store from collective pallet
      
      * Remove use of trait Store from babe pallet
      
      * Remove use of trait Store from assets pallet
      
      * Remove use of trait Store from grandpa pallet
      
      * Remove use of trait Store from balances pallet
      
      * Remove use of trait Store from authorship pallet
      
      * Remove use of trait Store from authority-discovery pallet
      
      * Remove use of trait Store from atomic-swap pallet
      
      * Remove use of trait Store from sudo pallet
      
      * Remove use of trait Store from scheduler pallet
      
      * Remove use of trait Store from scored-pool pallet
      
      * Remove use of trait Store from society pallet
      
      * Remove use of trait Store from lottery pallet
      
      * Remove use of trait Store from executive pallet
      
      * Remove use of trait Store from democracy pallet
      
      * Remove use of trait Store from elections-phragmen pallet
      
      * Remove use of trait Store from indices pallet
      
      * Remove use of trait Store from identity pallet
      
      * Remove use of trait Store from multisig pallet
      
      * Remove use of trait Store from merkle-mountain-range pallet
      
      * Remove use of trait Store from im-online pallet
      
      * Remove use of trait Store from membership pallet
      
      * Remove use of trait Store from nicks pallet
      
      * Remove use of trait Store from session pallet
      
      * Remove use of trait Store from transaction-payment pallet
      
      * Remove use of trait Store from utility pallet
      
      * Remove use of trait Store from child-bounties pallet
      
      * Remove use of trait Store from nis pallet
      
      * Remove use of trait Store from nfts pallet
      
      * Remove use of trait Store from conviction-voting pallet
      
      * Remove use of trait Store from treasury pallet
      
      * Remove use of trait Store from vesting pallet
      
      * Remove use of trait Store from preimage pallet
      
      * Remove use of trait Store from uniques pallet
      
      * Remove use of trait Store from ranked-collective pallet
      
      * Remove use of trait Store from beefy-mmr pallet
      
      * Remove use of trait Store from referenda pallet
      
      * Remove use of trait Store from whitelist pallet
      
      * Remove use of trait Store from alliance pallet
      
      * Remove use of trait Store from nomination-pools pallet
      
      * Remove use of trait Store from state-trie-migration pallet
      
      * Remove use of trait Store from message-queue pallet
      
      * Remove use of trait Store from root-offences pallet
      
      * Remove use of trait Store from root-testing pallet
      
      * Remove use of trait Store from timestamps pallet
      
      * Remove use of trait Store from system pallet
      
      * Remove use of trait Store from offences pallet
      
      * Remove use of trait Store from recovery pallet
      
      * Remove use of trait Store from node-authorization pallet
      
      * Remove use of trait Store from proxy pallet
      
      * Remove use of trait Store from benchmarking pallet
      
      * Remove use of trait Store from bags-list pallet
      
      * Add deprecated warning in store_trait
      
      * Change warning message
      
      * Run cargo fmt
      
      * Fix warning and update tests
      
      * Remove unnecessary allow deprecated
      
      * Remove use of trait Store
      
      * Fix mismatch in expected output
      
      * Minor update to warning message for deprecation of generate_store with Store trait attribute
      
      * Fixes as per review comments
      
      * Fixes as per review suggestions
      
      * Remove use of Store trait from core-fellowship pallet
      
      * Fix type in store_trait.rs
      
      * Fixes as pre review comment
      2009821c
  6. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  7. Dec 12, 2022
  8. Sep 27, 2022
  9. Sep 21, 2022
    • 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
  10. May 29, 2022
    • Gavin Wood's avatar
      Safe and sane multi-item storage removal (#11490) · ecbd65fb
      Gavin Wood authored
      * Fix overlay prefix removal result
      
      * Second part of the overlay prefix removal fix.
      
      * Report only items deleted from storage in clear_prefix
      
      * Fix kill_prefix
      
      * Formatting
      
      * Remove unused code
      
      * Fixes
      
      * Fixes
      
      * Introduce clear_prefix host function v3
      
      * Formatting
      
      * Use v2 for now
      
      * Fixes
      
      * Formatting
      
      * Docs
      
      * Child prefix removal should also hide v3 for now
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * apply_to_keys_whle takes start_at
      
      * apply_to_keys_whle takes start_at
      
      * apply_to_keys_whle takes start_at
      
      * Cursor API; force limits
      
      * Use unsafe deprecated functions
      
      * Formatting
      
      * Fixes
      
      * Grumbles
      
      * Fixes
      
      * Docs
      
      * Some nitpicks 🙈
      
      
      
      * Update primitives/externalities/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Formatting
      
      * Fixes
      
      * cargo fmt
      
      * Fixes
      
      * Update primitives/io/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Formatting
      
      * Fixes
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      ecbd65fb
  11. May 06, 2022
  12. Apr 30, 2022
  13. Apr 21, 2022
    • Zeke Mostov's avatar
      staking: Proportional ledger slashing (#10982) · e0bf4f36
      Zeke Mostov authored
      
      
      * staking: Proportional ledger slashing
      
      * Some comment cleanup
      
      * Update frame/staking/src/pallet/mod.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix benchmarks
      
      * FMT
      
      * Try fill in all staking configs
      
      * round of feedback and imp from kian
      
      * demonstrate per_thing usage
      
      * Update some tests
      
      * FMT
      
      * Test that era offset works correctly
      
      * Update mocks
      
      * Remove unnescary docs
      
      * Remove unlock_era
      
      * Update frame/staking/src/lib.rs
      
      * Adjust tests to account for only remove when < ED
      
      * Remove stale TODOs
      
      * Remove dupe test
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarkianenigma <[email protected]>
      e0bf4f36
  14. Jan 17, 2022
  15. Jan 03, 2022
  16. Nov 26, 2021
  17. Nov 17, 2021
  18. Nov 16, 2021
    • David Salami's avatar
      Add field names to pallet Event variants (#9993) · 120894fd
      David Salami authored
      * convert pallet-assets events to struct types
      
      * updated events of a couple pallets
      
      * updated pallet event field names
      
      * update pallet event field names
      
      * updated events in test files
      
      * cargo fmt
      
      * minorfixes
      
      * fix assertion error
      
      * minor fix
      
      * formatting fix
      
      * fmt
      120894fd
  19. Oct 06, 2021
  20. Sep 15, 2021
    • Andrew Jones's avatar
      Enrich metadata with type information (#8615) · 49b6dfd2
      Andrew Jones authored
      
      
      * Cargo.lock after merge
      
      * Restore scale-info feature
      
      * Fully qualify TypeInfo derive
      
      * Skip PendingSwap T
      
      * Add missing skip_type_params attr
      
      * metadata docs features
      
      * Reduce pallet event attribute to struct
      
      * Cargo.lock
      
      * Update frame/balances/src/tests_composite.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Line widths check
      
      * Cargo.lock
      
      * Add scale-info/std
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Use `skip_type_params` to remove `TypeInfo` requirements on checks
      
      * Revert "Remove unused Call metadata stuff"
      
      This reverts commit 41311f85
      
      * Skip BalanceSwapAction type parameter
      
      * Remove unused event metadata macro
      
      * Update frame-metadata
      
      * Update primitives/npos-elections/compact/src/codec.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Manual TypeInfo for Header
      
      * Remove TypeInfo requirement for consts in BoundedVec etc.
      
      * Another TypeInfo bound removed
      
      * review: fix indentation
      
      * TypeInfo impls for Identity types
      
      * Add some todos to add custom TypeInfo impls
      
      * Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Add some todos to add custom TypeInfo impls
      
      * Add a test for manual Data TypeInfo impl
      
      * Add custom TypeInfo impl for Vote
      
      * Era custom TypeInfo crimes
      
      * Revert finality-grandpa version to 0.14.z
      
      * review: renamed module to pallet_constants_metadata
      
      * New line at end of file
      
      * Add missing scale-info/std
      
      * Update frame/support/src/storage/types/mod.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Remove StorageEntryType::Map unused flag
      
      * Add missing scale-info dependency after merge
      
      * SignedExtension::AdditionalSigned metadata
      
      * Update frame-metadata, use abbreviated docs and args fields
      
      * Update frame/example/Cargo.toml
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Add scale_info/std and remove unused scale-info dependency
      
      * Remove scale-info dependency
      
      * Remove treasury pallet::metadata
      
      * Remove redundant Event test
      
      * Add back scale-info as dev dependency
      
      * fix error metadata when no error defined in decl_module
      
      * Add Module3 to tests
      
      * Fix metadata test
      
      * Add docs feature to frame-support test
      
      * WIP fixing pallet metadata test
      
      * Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20
      
      * Use main branch of frame-metadata
      
      * Use patch of scale-info for latest changes
      
      * Use latest patched scale-info
      
      * Manual TypeInfo for DigestItem
      
      * Manual TypeInfo for DigestItem
      
      * Update scale-info
      
      * Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117
      
      
      
      * Named fields for FRAME v2 pallet Call variants
      
      * Named fields for FRAME v1 pallet Call variants
      
      * Add missing scale-info dependency
      
      * WIP expand benchmark call variant
      
      * fix benchmark with new function
      
      create a new function for each variant of a pallet call.
      This function is called by benchmarking macro in order not to break call
      creation with unnamed argument
      
      * fix tests
      
      * more fix
      
      * Fix staking tests
      
      * Fix offchain workers calls
      
      * Cherry pick rustfmt.toml from master
      
      * cargo +nightly-2021-06-22 fmt --all
      
      * Update to new call variant structs
      
      * More call variant struct updates
      
      * Remove unused import
      
      * More call variant structs
      
      * More call variant structs
      
      * Even more call variant structs
      
      * Mooar variant structs
      
      * Evermore variant structs
      
      * Call variant structs ad infinitum
      
      * Fmt
      
      * More call variants
      
      * Last call variant
      
      * Call variants all done?
      
      * Fix SS58Prefix type
      
      * Potential workaround for BitFlags<IdentityFields> TypeInfo
      
      * Enable docs capturing for Call, Event, and Error types
      
      * Fix IdentityFields TypeInfo
      
      * Remove metadata-docs feature
      
      * Add capture_docs = true for legacy Call, Event and Error types
      
      * Fmt
      
      * Fix metadata test type
      
      * Update benchmarks with call struct variants
      
      * Fmt
      
      * More test fixes
      
      * Fmt
      
      * Fix benches
      
      * Use latest capture_docs attr
      
      * Latest scale_info
      
      * Fmt
      
      * review: change &Vec to &[]
      
      * Remove pallet metadata attr
      
      * review: remove commented out test code
      
      * review: skip_type_params trailing comma suggestion
      
      * Update to scale-info 0.10.0
      
      * Update construct_runtime ui tests, different because of metadata TypeInfo impls
      
      * Add some TypeInfo derives for UI tests
      
      * Update storage ensure span ui stderrs
      
      * Update call argument bound ui tests
      
      Possibly changed because change from tuple to struct variants?
      
      * Add scale-info dev dependency
      
      * Update to latest finality-grandpa release
      
      * review: missing newline
      
      * review: missing scale-info/std
      
      * review: remove duplicate scale-info/std
      
      * review: remove fully qualified TypeInfo
      
      * review: add missing scale-info/std
      
      * review: remove unnecessary imports.
      
      * Fmt
      
      * Use crates.io RC version of frame-metadata
      
      * Remove scale-info/std because it is a dev dependency
      
      * Add missing scale_info dev-dependency for test
      
      * Delete empty metadata folder
      
      * Fix sp_std import
      
      * review: improve manual UncheckedExtrinsic TypeInfo impl
      
      * review: use full scale-info for dev-dependency
      
      * Remove DefaultByteGetter impl
      
      * review: derive TypeInfo for generic header
      
      * Fmt
      
      * Update primitives/runtime/src/generic/unchecked_extrinsic.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update primitives/runtime/src/generic/unchecked_extrinsic.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update bin/node/executor/Cargo.toml
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/identity/src/types.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/support/src/dispatch.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Remove redundant derive
      
      * Simplify scale-info dependency
      
      * Strip underscore prefix from call variant struct names
      
      * Another underscore field
      
      * More underscore fields
      
      * Another underscore field
      
      * Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
      
      * Fmt
      
      * Revert weights formatting
      
      * Fix up some tests
      
      * Fix up some tests for StorageEntryTypeMetadata
      
      * scale-info dev dependency
      
      * Fix test error
      
      * Add missing TypeInfo derives
      
      * Add back missing scale-info dependency
      
      * Add back missing scale-info dependency
      
      * Fix npos compact impls
      
      * Cargo.lock
      
      * Fmt
      
      * Fix errors
      
      * Fmt
      
      * Fix renamed raw_solution field
      
      * Fix error
      
      * Fmt
      
      * Fix some benchmarks
      
      * Fmt
      
      * Stray R
      
      * Fix
      
      * Add missing TypeInfos
      
      * ui test fix
      
      * Fix line widths
      
      * Revert "ui test fix"
      
      This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.
      
      * Upgrade to scale-info 0.11.0
      
      * Revert "Upgrade to scale-info 0.11.0"
      
      This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.
      
      * Add Runtime type
      
      * Update to scale-info 0.12
      
      * Update to scale-info 1.0
      
      * Update frame-metadata to version 14.0.0
      
      * Patch finality-grandpa until release available
      
      * Fix metadata tests
      
      * Fix metadata tests
      
      * Fmt
      
      * Remove patched finality-grandpa
      
      * Fix tests, use scale_info imports
      
      * Fix pallet tests
      
      * Add BlockNumber TypeInfo bound
      
      * ui test fix
      
      * Cargo.lock
      
      * Remove pallet metadata
      
      * Cargo.lock
      
      * Add missing scale-info dependency
      
      * Remove pallet event metadata
      
      * Fix error
      
      * Fix collective errors
      
      * Semicolol
      
      * Fmt
      
      * Remove another metadata attribute
      
      * Add new variant to custom digest TypeInfo
      
      * Fmt
      
      * Cargo.lock from master
      
      * Remove comma lol
      
      * Fix example call error
      
      * Fix example call error properly
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      49b6dfd2
  21. Jul 29, 2021
  22. Jul 27, 2021
  23. Jul 21, 2021
    • Bastian Köcher's avatar
      Run cargo fmt on the whole code base (#9394) · 7b56ab15
      Bastian Köcher authored
      * Run cargo fmt on the whole code base
      
      * Second run
      
      * Add CI check
      
      * Fix compilation
      
      * More unnecessary braces
      
      * Handle weights
      
      * Use --all
      
      * Use correct attributes...
      
      * Fix UI tests
      
      * AHHHHHHHHH
      
      * 🤦
      
      * Docs
      
      * Fix compilation
      
      * 🤷
      
      * Please stop
      
      * 🤦
      
       x 2
      
      * More
      
      * make rustfmt.toml consistent with polkadot
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      7b56ab15
  24. Jun 15, 2021
  25. Jun 12, 2021
  26. Apr 28, 2021
  27. Jan 04, 2021
    • Bastian Köcher's avatar
      Happy new year (#7814) · e3e651f7
      Bastian Köcher authored
      * Happy new year
      
      Updates the copyright years and fixes wrong license headers.
      
      * Fix the template
      
      * Split HEADER into HEADER-APACHE & HEADER-GPL
      e3e651f7
  28. Dec 10, 2020
  29. Nov 30, 2020
  30. Jul 21, 2020
  31. May 15, 2020
  32. Mar 27, 2020
  33. Mar 26, 2020
    • Kian Paimani's avatar
      Offchain Phragmén BREAKING. (#4517) · 970c5f94
      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]>
      970c5f94
  34. Mar 17, 2020
    • Shawn Tabrizi's avatar
      Benchmark Staking and Session Pallet (#5183) · 9c06d8c6
      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]>
      9c06d8c6
  35. Feb 13, 2020
    • Kian Paimani's avatar
      Per-things trait. (#4904) · c871eaac
      Kian Paimani authored
      * Give perthigns the trait it always deserved.
      
      * Make staking and phragmen work with the new generic per_thing
      
      * Make everything work together 🔨
      
      * a bit of cleanup
      
      * Clean usage
      
      * Bump.
      
      * Fix name
      
      * fix grumbles
      
      * hopefully fix the ui test
      
      * Some grumbles
      
      * revamp traits again
      
      * Better naming again.
      c871eaac
  36. Jan 20, 2020
  37. Jan 14, 2020
  38. Jan 07, 2020
  39. Jan 05, 2020