1. Aug 25, 2023
    • gupnik's avatar
      Adds ability to provide defaults for types provided by `construct_runtime` (#14682) · 83ae0180
      gupnik authored
      
      
      * Adds ability to use defaults for verbatim types
      
      * Adds RuntimeOrigin and PalletInfo in DefaultConfig
      
      * Adds RuntimeEvent in DefaultConfig
      
      * Adds RuntimeEvent in DefaultConfig
      
      * Minor fix
      
      * Minor fix
      
      * Everything in frame_system can now have a default
      
      * Adds docs
      
      * Adds UI Test for no_bounds
      
      * Updates docs
      
      * Adds UI tests for verbatim
      
      * Minor update
      
      * Minor updates
      
      * Minor updates
      
      * Addresses review comments
      
      * Fixes test
      
      * Update frame/support/procedural/src/derive_impl.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Minor fix
      
      * Minor
      
      * Fixes build
      
      * Uses runtime_type
      
      * Fixes comment
      
      * Fixes comment
      
      * Fixes test
      
      * Uses no_aggregated_types as an option in derive_impl
      
      * Uses specific imports
      
      * Fmt
      
      * Updates doc
      
      * Update frame/support/procedural/src/derive_impl.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/support/procedural/src/derive_impl.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Addresses review comment
      
      * Addresses review comment
      
      * fmt
      
      * Renames test files
      
      * Adds docs using docify
      
      * Fixes test
      
      * Fixes UI tests
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      83ae0180
  2. Aug 23, 2023
    • juangirini's avatar
      Restructure `frame_support` macro related exports (#14745) · 878c562c
      juangirini authored
      
      
      * make reexports private
      
      * make reexports private 2
      
      * make reexports private for runtime-benchmarking
      
      * make reexports private for try-runtime
      
      * fix for try-runtime
      
      * make reexports private for tests
      
      * fmt
      
      * make reexports private for tests
      
      * make reexports private for experimental
      
      * fix beefy
      
      * fix ui test
      
      * fix ui test
      
      * fix benches
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * fix contracts use
      
      * wip
      
      * wip
      
      * do not reexport sp_api::metadata_ir
      
      * fix CI checks
      
      * fix support tests
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Update frame/support/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * import codec directly
      
      * fmt
      
      * fix node-cli tests
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      878c562c
  3. Aug 14, 2023
  4. Jul 14, 2023
  5. Jul 13, 2023
    • gupnik's avatar
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes... · 5e7b27e9
      gupnik authored
      
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#14437)
      
      * Initial setup
      
      * Adds node block
      
      * Uses UncheckedExtrinsic and removes Where section
      
      * Updates frame_system to use Block
      
      * Adds deprecation warning
      
      * Fixes pallet-timestamp
      
      * Removes Header and BlockNumber
      
      * Addresses review comments
      
      * Addresses review comments
      
      * Adds comment about compiler bug
      
      * Removes where clause
      
      * Refactors code
      
      * Fixes errors in cargo check
      
      * Fixes errors in cargo check
      
      * Fixes warnings in cargo check
      
      * Formatting
      
      * Fixes construct_runtime tests
      
      * Uses import instead of full path for BlockNumber
      
      * Uses import instead of full path for Header
      
      * Formatting
      
      * Fixes construct_runtime tests
      
      * Fixes imports in benchmarks
      
      * Formatting
      
      * Fixes construct_runtime tests
      
      * Formatting
      
      * Minor updates
      
      * Fixes construct_runtime ui tests
      
      * Fixes construct_runtime ui tests with 1.70
      
      * Fixes docs
      
      * Fixes docs
      
      * Adds u128 mock block type
      
      * Fixes split example
      
      * fixes for cumulus
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Updates new tests
      
      * Fixes fully-qualified path in few places
      
      * Formatting
      
      * Update frame/examples/default-config/src/lib.rs
      
      Co-authored-by: default avatarJuan <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarJuan <[email protected]>
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Addresses some review comments
      
      * Fixes build
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Update frame/democracy/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/democracy/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/support/procedural/src/construct_runtime/mod.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Addresses review comments
      
      * Updates trait bounds
      
      * Minor fix
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Removes unnecessary bound
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Updates test
      
      * Fixes build
      
      * Adds a bound for header
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Removes where block
      
      * Minor fix
      
      * Minor fix
      
      * Fixes tests
      
      * ".git/.scripts/commands/update-ui/update-ui.sh" 1.70
      
      * Updates test
      
      * Update primitives/runtime/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/runtime/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Updates doc
      
      * Updates doc
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarJuan <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      5e7b27e9
  6. Jul 12, 2023
    • Michal Kucharczyk's avatar
      `GenesisBuild<T,I>` deprecated. `BuildGenesisConfig` added. (#14306) · 87d41d0a
      Michal Kucharczyk authored
      
      
      * frame::support: GenesisConfig types for Runtime enabled
      
      * frame::support: macro generating GenesisBuild::build for RuntimeGenesisConfig
      
      * frame: ambiguity BuildStorage vs GenesisBuild fixed
      
      * fix
      
      * RuntimeGenesisBuild added
      
      * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
      
      This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
      
      * Revert "fix"
      
      This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
      
      * Revert "RuntimeGenesisBuild added"
      
      This reverts commit 3c131b618138ced29c01ab8d15d8c6410c9e128b.
      
      * Revert "Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed""
      
      This reverts commit 2b1ecd467231eddec69f8d328039ba48a380da3d.
      
      * Revert "Revert "fix""
      
      This reverts commit fd7fa629adf579d83e30e6ae9fd162637fc45e30.
      
      * Code review suggestions
      
      * frame: BuildGenesisConfig added, BuildGenesis deprecated
      
      * frame: some pallets updated with BuildGenesisConfig
      
      * constuct_runtime: support for BuildGenesisConfig
      
      * frame::support: genesis_build macro supports BuildGenesisConfig
      
      * frame: BuildGenesisConfig added, BuildGenesis deprecated
      
      * Cargo.lock update
      
      * test-runtime: fixes
      
      * Revert "fix"
      
      This reverts commit a2f76dd24e9a16cf9230d45825ed28787211118b.
      
      * Revert "frame: ambiguity BuildStorage vs GenesisBuild fixed"
      
      This reverts commit 950f3d019d0e21c55a739c44cc19cdabd3ff0293.
      
      * self review
      
      * doc fixed
      
      * ui tests fixed
      
      * fmt
      
      * tests fixed
      
      * genesis_build macrto fixed for non-generic GenesisConfig
      
      * BuildGenesisConfig constraints added
      
      * warning fixed
      
      * some duplication removed
      
      * fmt
      
      * fix
      
      * doc tests fix
      
      * doc fix
      
      * cleanup: remove BuildModuleGenesisStorage
      
      * self review comments
      
      * fix
      
      * Update frame/treasury/src/tests.rs
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * Update frame/support/src/traits/hooks.rs
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * doc fix: GenesisBuild exposed
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * frame: more serde(skip) + cleanup
      
      * Update frame/support/src/traits/hooks.rs
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      
      * frame: phantom fields moved to the end of structs
      
      * chain-spec: Default::default cleanup
      
      * test-runtime: phantom at the end
      
      * merge master fixes
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix (facepalm)
      
      * Update frame/support/procedural/src/pallet/expand/genesis_build.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * fmt
      
      * fix
      
      * fix
      
      ---------
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      87d41d0a
    • PG Herveou's avatar
      quick updates (#14557) · 49150ee5
      PG Herveou authored
      49150ee5
  7. Jul 07, 2023
  8. Jun 19, 2023
  9. Jun 14, 2023
  10. Jun 02, 2023
  11. May 24, 2023
    • Bastian Köcher's avatar
      HoldReason: Improve usage (#13869) · 05da6d8e
      Bastian Köcher authored
      
      
      * HoldReason: Improve usage
      
      `HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
      from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
      variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
      from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
      type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
      pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
      
      * Update frame/nis/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Review comment
      
      * Fixes
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      05da6d8e
  12. May 23, 2023
  13. May 20, 2023
    • Michal Kucharczyk's avatar
      frame: Enable GenesisConfig in no_std (#14108) · 613420a0
      Michal Kucharczyk authored
      * frame: Default for GenesisConfig in no_std
      
      `Default` for `GenesisConfig` will be required for no_std in no native
      runtime world. It must be possible to instantiate default GenesisConfig
      for pallets and runtime.
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * hash69 in no_std reverted
      
      * derive(DefaultNoBound) for GenesisConfig used when possible
      
      * treasury: derive(Default)
      
      * Cargo.lock update
      
      * genesis_config: compiler error improved
      
      When std feature is not enabled for pallet, the GenesisConfig will be
      defined, but serde::{Serialize,Deserialize} traits will not be
      implemented.
      
      The compiler error indicates the reason of latter errors.
      
      This is temporary and serde traits will be enabled with together with
      `serde` support in frame.
      
      ---------
      
      Co-authored-by: command-bot <>
      613420a0
  14. May 17, 2023
  15. May 04, 2023
    • Liam Aharon's avatar
      fungible conformance tests: Inspect and Mutate (#13852) · 9c53fd72
      Liam Aharon authored
      
      
      * typo
      
      * - create test files for each fungile trait
      - begin implementing tests for the Inspect trait
      
      * wrap inspect tests in a macro
      
      * first run of mutate tests
      
      * move test implementation out of ballances
      
      * make tests more generic
      
      * transfer tests
      
      * combine inspect and mutate tests
      
      * set balance failing tests
      
      * can_deposit tests
      
      * can_withdraw tests
      
      * test reducible_balance
      
      * remove balanced stub
      
      * revert set_balance return val fix
      
      * typo
      
      * macro and dust trap tests
      
      * disable test when it doesn't make sense
      
      * remove debug comment
      
      * reduce macro boilerplate
      
      * improved var naming
      
      * improve variable naming
      
      * remove redundant comment
      
      * remove placeholder tests
      
      * remove placeholder tests
      
      * simplify macro
      
      * Update frame/balances/src/tests/fungible_conformance_tests.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * use Balance from T
      
      * fix copyright
      
      * add test doc comments
      
      * improve test naming
      
      * clippy
      
      * fix rustdoc errors
      
      * fix rustdoc
      
      * improve macro
      
      * improve variable naming
      
      * remove redundant comment
      
      * use path
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      9c53fd72
  16. Apr 27, 2023
  17. Apr 26, 2023
    • Gavin Wood's avatar
      Various minor fixes (#13945) · 781ea7cb
      Gavin Wood authored
      
      
      * Fix: Incorrect implementation of can_reserve check
      
      * Fix: Incorrect migration of consumer counting for existing accounts with frozen amounts
      
      * Fix: Inconsistent implementation between assets can_deposit and new_account
      
      * Fixes
      
      * Fixes
      
      * Another fix
      
      * Update tests.rs
      
      * Update fungible_tests.rs
      
      * Use `can_accrue_consumers` in the body of `can_inc_consumer`
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: parity-processbot <>
      781ea7cb
  18. Apr 21, 2023
  19. Apr 17, 2023
  20. Apr 13, 2023
  21. Apr 11, 2023
  22. Apr 01, 2023
  23. Mar 24, 2023
  24. Mar 18, 2023
    • Gavin Wood's avatar
      Deprecate `Currency`; introduce holds and freezing into `fungible` traits (#12951) · 5d81f23f
      Gavin Wood authored
      
      
      * First reworking of fungibles API
      
      * New API and docs
      
      * More fungible::* API improvements
      
      * New ref-counting logic for old API
      
      * Missing files
      
      * Fixes
      
      * Use the new transfer logic
      
      * Use fungibles for the dispatchables
      
      * Use shelve/restore names
      
      * Locking works with total balance.
      
      * repotting and removal
      
      * Separate Holds from Reserves
      
      * Introduce freezes
      
      * Missing files
      
      * Tests for freezing
      
      * Fix hold+freeze combo
      
      * More tests
      
      * Fee-free dispatchable for upgrading accounts
      
      * Benchmarks and a few fixes
      
      * Another test
      
      * Docs and refactor to avoid blanket impls
      
      * Repot
      
      * Fit out ItemOf fully
      
      * Add events to Balanced traits
      
      * Introduced events into Hold traits
      
      * Fix Assets pallet tests
      
      * Assets benchmarks pass
      
      * Missing files and fixes
      
      * Fixes
      
      * Fixes
      
      * Benchmarks fixes
      
      * Fix balance benchmarks
      
      * Formatting
      
      * Expose fungible sub modules
      
      * Move NIS to fungible API
      
      * Fix broken impl and add test
      
      * Fix tests
      
      * API for `transfer_and_hold`
      
      * Use composite APIs
      
      * Formatting
      
      * Upgraded event
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Repot tests and some fixed
      
      * Fix some bits
      
      * Fix dust tests
      
      * Rename `set_balance`
      
      - `Balances::set_balance` becomes `Balances::force_set_balance`
      - `Unbalanced::set_balance` becomes `Unbalances::write_balance`
      
      * becomes
      
      * Move dust handling to fungibles API
      
      * Formatting
      
      * Fixes and more refactoring
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Use reducible_balance for better correctness on fees
      
      * Reducing hold to zero should remove entry.
      
      * Add test
      
      * Docs
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/regular.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Fix NIS benchmarks
      
      * Doc comment
      
      * Remove post_mutation
      
      * Fix some tests
      
      * Fix some grumbles
      
      * Enumify bool args to fungible(s) functions
      
      * Fix up assets and balances
      
      * Formatting
      
      * Fix contracts
      
      * Fix tests & benchmarks build
      
      * Typify minted boolean arg
      
      * Typify on_hold boolean arg; renames
      
      * Fix numerous tests
      
      * Fix dependency issue
      
      * Privatize dangerous API mutate_account
      
      * Fix contracts (@alext - please check this commit)
      
      * Remove println
      
      * Fix tests for contracts
      
      * Fix broken rename
      
      * Fix broken rename
      
      * Fix broken rename
      
      * Docs
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * remove from_ref_time
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/executive/src/lib.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Reenable test
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/currency.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/lottery/src/tests.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/mod.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/freeze.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungible/regular.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/hold.rs
      
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      
      * Rename UnwantedRemoval to UnwantedAccountRemoval
      
      * Docs
      
      * Formatting
      
      * Update frame/balances/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update primitives/runtime/src/lib.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * handle_raw_dust oes nothing
      
      * Formatting
      
      * Fixes
      
      * Grumble
      
      * Fixes
      
      * Add test
      
      * Add test
      
      * Tests for reducible_balance
      
      * Fixes
      
      * Fix Salary
      
      * Fixes
      
      * Disable broken test
      
      * Disable nicely
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Rename some events
      
      * Fix nomination pools breakage
      
      * Add compatibility stub for transfer tx
      
      * Reinstate a safely compatible version of Balances set_balance
      
      * Fixes
      
      * Grumble
      
      * Update frame/nis/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
      
      * disable flakey tests
      
      * Update frame/balances/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Grumbles
      
      * Grumble
      
      ---------
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarAnthony Alaribe <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      5d81f23f
    • PG Herveou's avatar
      c699876a
  25. Mar 16, 2023
  26. 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
  27. Mar 02, 2023
  28. Feb 28, 2023
  29. Feb 22, 2023
    • Sam Johnson's avatar
      generation of real benchmark functions for benchmarking v2 (#13224) · 55ff791d
      Sam Johnson authored
      
      
      * function generation with _name working, need to modify signature
      
      * WIP
      
      * support custom BenchmarkResult<T> type
      
      * full support for BenchmarkResult<T> on benchmark function defs
      
      * support () return type for benchmark function defs that don't use ?
      
      * uncomment
      
      * fix where clause handling
      
      * fix benchmark function call bodies
      
      * proper parsing of return type
      
      * add UI tests for bad return type
      
      * fix detection of missing last_stmt with defined return type
      
      * UI tests covering missing last_stmt
      
      * properly detect and complain about empty benchmark function defs
      
      * fix missing Comma in Result<T, BenchmarkError> parsing + test
      
      * add additional UI test
      
      * allow complex path for BenchmarkResult and BenchmarkError in fn defs
      
      * add UI tests covering complex path for BenchmarkResult, BenchmarkError
      
      * retain doc comments and attributes
      
      * also add attributes to struct
      
      * add docs for benchmark function definition support
      
      * fix imports on benchmark example
      
      * fix issue with unused variables in extrinsic call fn def
      
      * fix up docs
      
      * remove support for v2::BenchmarkResult because it was confusing
      
      * fix typo
      
      * remove ability to use custom T for Result<T, BenchmarkError> in v2
      
      * use missing call error instead of empty_fn()
      
      * remove unneeded match statement
      
      * Add a proper QED
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * fix other QED
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * cargo fmt
      
      * add an explicit error for non TypePath as return type
      
      * tweak error warning and add a UI test for non TypePath return
      
      * remove comment
      
      * add docs about T and I generic params
      
      * improve docs referring to section "below"
      
      * pull out return type checking logic into its own function
      
      * pull out params parsing into its own function
      
      * pull out call_def parsing into its own function
      
      * add doc comment for missing_call()
      
      * replace spaces with tabs
      
      * add a result-based example to the benchmarking examples
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      55ff791d
  30. 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
  31. Feb 14, 2023
  32. Jan 27, 2023
  33. Jan 26, 2023
  34. Jan 23, 2023
    • Sam Johnson's avatar
      new proc-macro-based benchmarking syntax (#12924) · 42e5c27c
      Sam Johnson authored
      * add stub for new benchmark macro
      
      * benchmark syntax
      
      * add #[extrinsic call] separator
      
      * parse #[benchmark] item as a function
      
      * proper emission of error when #[extrinsic_call] annotation is missing
      
      * clean up
      
      * enclosing module via benchmarks! { } working
      
      * use an attribute macro on the module instead of benchmarks! { }
      
      * cargo fmt
      
      * working component implementation
      
      * WIP
      
      * working
      
      * add syntax for Linear<A, B>
      
      * parsing of param ranges (still need to build tuple though)
      
      * params parsing WIP
      
      * clean up (don't need extrinsic call name)
      
      * use proper Result syntax for BenchmarkDef parsing
      
      * proper parsing of Linear<0, 1> style args
      
      * successfully parse and make use of linear component ranges 💥
      
      * rename support variable => home because eventually will be moved
      
      * compile-time check that param range types implement ParamRange
      
      * switch to using balances as example, failing on instance pallet
      
      * successfully set up __origin and __call with balances 💥
      
      * clean up
      
      * use a module
      
      * don't need a variable for transfer
      
      * rename benchmark_transfer -> transfer because no longer conflicts
      
      * clean up
      
      * working with transfer_increasing_users as well 💥
      
      * re-add BareBlock
      
      * add comments for undocumented structs+functions+traits
      
      * refactor in preparation for removing module requirements
      
      * switch to a block instead of a module
      
      * use the outer macro pattern to to enable #[benchmarks] aggregation
      
      * successfully generate SelectedBenchmark 💥
      
      * implement components for SelectedBenchmark
      
      * implement instance for SelectedBenchmark
      
      * properly track #[extra]
      
      * working impl for fn benchmarks()
      
      * run_benchmarks WIP
      
      * finish run_benchmark! impl 💥
      
      * import balances transfer_best_case benchmark
      
      * import transfer_keep_alive balances pallet benchmark
      
      * import set_balance_creating balances pallet benchmark
      
      * import set_balance_killing balances pallet benchmark
      
      * import force_transfer balances pallet benchmark
      
      * add #[extra] annotation and docs to transfer_increasing_users
      
      * import transfer_all balances pallet benchmark
      
      * import force_unreserve balances pallet benchmark
      
      * prepare to implement impl_benchmark_test_suite!
      
      * ensure tests cover #[extra] before and after #[benchmark] tag
      
      * refactor
      
      * clean up
      
      * fix
      
      * move to outer
      
      * switch to benchmarks/instance_benchmarks
      
      * test impl almost done, strange compiler error
      
      * benchmark test suites working 💥
      
      * clean up
      
      * add stub and basic parsing for where_clause
      
      * working except where clause and extrinsic calls containing method chains
      
      * assume option (2) for now wrt https://github.com/paritytech/substrate/pull/12924#issuecomment-1372938718
      
      * clean up
      
      * switch to attribute-style
      
      * properly handle where clauses
      
      * fix subtle missing where clause, now just MessageQueue issues
      
      * fix block formatting in message-queue pallet
      
      * switch to block vs non-block parsing of extrinsic call
      
      * working now but some benchmark tests failing
      
      * message-queue tests working (run order issue fixed) 🎉
      
      
      
      * add comments and internal docs for fame_support_procedural::benchmark
      
      * fix license years
      
      * docs for lib.rs
      
      * add docs to new support procedural macros
      
      * don't allow #[benchmark] outside of benchmarking module
      
      * add docs
      
      * use benchmark(extra, skip_meta) style args
      
      * update docs accordingly
      
      * appease clippy
      
      * bump ci
      
      * add notes about `extra` and `skip_meta`
      
      * fix doc tests
      
      * re-run CI
      
      * use `ignore` instead of `no_run` on doc examples
      
      * bump CI
      
      * replace some if-lets with if-elses
      
      * more refactoring of if-let statements
      
      * fix remaining if-lets in BenchmarkDef::from()
      
      * fix if-lets in benchmarks()
      
      * fix remaining if-lets, use nested find_map for extrinsic call
      
      * switch to use #[extrinsic_call] or #[block] situationally
      
      * refactor ExtrinsicCallDef => BenchmarkCallDef
      
      * update docs with info about #[block]
      
      * add macro stub for #[extrinsic_call]
      
      * fix docs and add stub for #[block] as well
      
      * remove unused extern crate line
      
      * fix clippy nits
      
      * Use V2 bench syntax in pallet-example-basic
      
      Just testing the dev-ex...
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * carry over comment
      
      * use curly-brace style for impl_benchmark_test_suite!
      
      * remove unneeded parenthesis
      
      * proper handling of _() extrinsic call style
      
      * add docs for _() syntax
      
      * fix crate access
      
      * simplify keyword access
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * simplify module content destructuring
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * fix crate access "frame_benchmarking" => "frame-benchmarking", compiles
      
      * use _() extrinsic call syntax where possible in balances
      
      * simplify attr.path.segments.last()
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * fix compile error being suppressed
      
      * simplify extrinsic call keyword parsing
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * use ? operator instead of return None
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * rename generics => type_use_generics
      rename full_generics => type_impl_generics
      
      * simplify extrinsic call extraction with transpose
      
      * bump CI
      
      * nit
      
      * proper handling of too many + too few block/extrinsic call annotations
      
      * change to B >= A
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * remove unneeded ignore
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * remove another ignore
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add ui tests
      
      * use _() style extrinsic call on accumulate_dummy
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * add range check to ParamRange
      
      * ui test for bad param ranges
      
      * fix failing example
      
      * add ignore back to other failing example
      
      * tweak expr_call span
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * fix typo
      
      * eliminate a match
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * change pub fn benchmarks to return Result<TokenStream>
      
      * fix origin error span
      
      * more informative error for invalid benchmark parameter name
      
      * fix spans on a few benchmark errors
      
      * remove unneeded clone
      
      * refactor inner loop of benchmark function parsing
      
      * preserve mod attributes
      
      * refactor outer loop of benchmark def parsing code, greatly simplified
      
      * simplify to use a ? operator when parsing benchmark attr path
      
      * fix another ? operator
      
      * further simplify benchmark function attr parsing with more ? ops
      
      * refactor extrinsic call handling to use if let rather than match
      
      * replace is_ok => is_err
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * re-use name during expansion of benchmark def
      
      * remove unneeded clone
      
      * fix span for origin missing error
      
      * fix missing semi
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: parity-processbot <>
      42e5c27c
  35. Jan 10, 2023