1. Aug 14, 2023
  2. 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
  3. 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
  4. Jun 14, 2023
  5. 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
  6. 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
  7. Apr 27, 2023
  8. 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
  9. Apr 21, 2023
  10. Apr 17, 2023
  11. Apr 11, 2023
  12. Apr 01, 2023
  13. Mar 24, 2023
  14. 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
  15. 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
  16. 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
  17. Feb 14, 2023
  18. Jan 10, 2023
  19. Dec 12, 2022
  20. Dec 09, 2022
  21. Dec 08, 2022
    • Anthony Alaribe's avatar
      Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798) · 9a014d1e
      Anthony Alaribe authored
      
      
      * WIP move LockableCurrency to fungibles
      
      * rename Lockable and LockIdentifier to funginbles::*
      
      * fix imports further
      
      * change Lockable from fungible to fungibles
      
      * reintroduce LockableCurrency but marked as deprecated
      
      * fix imports
      
      * fix imports
      
      * cargo fmt
      
      * add allow deprecated warnings
      
      * remove unused benchmark import
      
      * fix some of the docs
      
      * fix failing doctest check
      
      * reexport LockIdentifier and LockableCurrency from support/traits
      
      * reexport LockIdentifier and LockableCurrency from support/traits
      
      * allow using deprecated re-export
      
      * replace LockableCurrency and LockIdentifier with a module alias
      
      * Update frame/support/src/traits/tokens/fungibles/lockable.rs
      
      * Update frame/staking/src/pallet/mod.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/support/src/traits.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * REVERT removing fungibles::Lockable import
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarSquirrel <[email protected]>
      9a014d1e
  22. Dec 05, 2022
    • Bastian Köcher's avatar
      pallet-balances: Fix inactive funds migration (#12840) · 4be3ddaa
      Bastian Köcher authored
      * pallet-balances: Fix inactive funds migration
      
      Fixes the inactive funds migration. It was missing to set the `storage_version` attribute for the
      `Pallet` struct. Besides that it also removes the old `StorageVersion` representation and adds support
      for instances of pallet-balances.
      
      * Fix test
      4be3ddaa
  23. Dec 03, 2022
  24. Nov 10, 2022
  25. Nov 02, 2022
  26. Sep 21, 2022
  27. Sep 16, 2022
    • Sam Johnson's avatar
      Add special tag to exclude runtime storage items from benchmarking (#12205) · c0e007b5
      Sam Johnson authored
      * initial setup
      
      * add WhitelistedStorageKeys trait
      
      * add (A, B) tuple implementation for whitelisted_storage_keys()
      
      * fix formatting
      
      * implement WhitelistedStorageKeys for all tuple combinations
      
      * impl_for_tuples up to 128 for WhitelistedStorageKeys
      
      * refactor to #[benchmarking(cached)]
      
      * tweak error message and mark BlockNumber as cached
      
      * add benchmarking(cached) to the other default types
      
      * add docs for benchmarking(cached)
      
      * properly parse storage type declaration
      
      * make storage_alias structs public so we can use them in this macro
      
      * use BTreeMap since TrackedStorageKey missing Ord outside of std
      
      * make WhitelistedStorageKeys accessible
      
      * basic detection of benchmarking(cached) 💥
      
      * proper parsing of #[benchmarking(cached)] from pallet parse macro
      
      * store presence of #[benchmarking(cached)] macro on StorageDef
      
      * will be used for later expansion
      
      * compiling blank impl for WhitelistedStorageKeys
      
      * move impl to expand_pallet_struct
      
      * use frame_support::sp_std::vec::Vec properly
      
      * successfully compiling with storage info loaded into a variable 💥
      
      * plausible implementation for whitelisted_storage_keys()
      
      * depends on the assumption that storage_info.encode() can be loaded
        into TrackedStorageKey::new(..)
      
      * use Pallet::whitelisted_storage_keys() instead of hard-coded list
      
      * AllPallets::whitelisted_storage_keys() properly working 💥
      
      * collect storage names
      
      * whitelisted_storage_keys() impl working 💥
      
      
      
      * clean up
      
      * fix compiler error
      
      * just one compiler error
      
      * fix doc compiler error
      
      * use better import path
      
      * fix comment
      
      * whoops
      
      * whoops again
      
      * fix macro import issue
      
      * cargo fmt
      
      * mark example as ignore
      
      * use keyword tokens instead of string parsing
      
      * fix keyword-based parsing of benchmarking(cached)
      
      * preliminary spec for check_whitelist()
      
      * add additional test for benchmarking whitelist
      
      * add TODO note
      
      * remove irrelevant line from example
      
      * use filter_map instead of filter and map
      
      * simplify syntax
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * clean up
      
      * fix test
      
      * fix tests
      
      * use keyword parsing instead of string parsing
      
      * use collect() instead of a for loop
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * fix compiler error
      
      * clean up benchmarking(cached) marking code
      
      * use cloned()
      
      * refactor to not use panic! and remove need for pub types in storage_alias
      
      * remove unneeded use
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * remove unneeded visibility changes
      
      * don't manually hard code hash for treasury account as hex
      
      * proper Ord, PartialOrd, and Hash impls for TrackedStorageKey
      
      * now based just on key, and available in no-std
      
      * use BTreeSet instead of BTreeMap
      
      * fix comments
      
      * cargo fmt
      
      * switch to pallet::whitelist and re-do it basti's way :D
      
      * make PartialOrd for TrackedStorageKey consistent with Ord
      
      * more correct implementation of hash-related traits for TrackedStorageKey
      
      * fix integration test
      
      * update TODO
      
      * remove unused keyword
      
      * remove more unused keywords
      
      * use into_iter()
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update frame/support/procedural/src/pallet/parse/mod.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * add docs for whitelisted
      
      * fix comment
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      c0e007b5
  28. Sep 12, 2022
    • Sergej Sakac's avatar
      BREAKING: Rename Call & Event (#11981) · 6e8795af
      Sergej Sakac authored
      
      
      * rename Event to RuntimeEvent
      
      * rename Call
      
      * rename in runtimes
      
      * small fix
      
      * rename Event
      
      * small fix & rename RuntimeCall back to Call for now
      
      * small fixes
      
      * more renaming
      
      * a bit more renaming
      
      * fmt
      
      * small fix
      
      * commit
      
      * prep for renaming associated types
      
      * fix
      
      * rename associated Event type
      
      * rename to RuntimeEvent
      
      * commit
      
      * merge conflict fixes & fmt
      
      * additional renaming
      
      * fix.
      
      * fix decl_event
      
      * rename in tests
      
      * remove warnings
      
      * remove accidental rename
      
      * .
      
      * commit
      
      * update .stderr
      
      * fix in test
      
      * update .stderr
      
      * TRYBUILD=overwrite
      
      * docs
      
      * fmt
      
      * small change in docs
      
      * rename PalletEvent to Event
      
      * rename Call to RuntimeCall
      
      * renamed at wrong places :P
      
      * rename Call
      
      * rename
      
      * rename associated type
      
      * fix
      
      * fix & fmt
      
      * commit
      
      * frame-support-test
      
      * passing tests
      
      * update docs
      
      * rustdoc fix
      
      * update .stderr
      
      * wrong code in docs
      
      * merge fix
      
      * fix in error message
      
      * update .stderr
      
      * docs & error message
      
      * .
      
      * merge fix
      
      * merge fix
      
      * fmt
      
      * fmt
      
      * merge fix
      
      * more fixing
      
      * fmt
      
      * remove unused
      
      * fmt
      
      * fix
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      6e8795af
  29. Aug 29, 2022
  30. Aug 18, 2022
  31. Jun 16, 2022
  32. Jun 11, 2022
  33. Apr 30, 2022
  34. Apr 29, 2022
  35. Apr 25, 2022
    • Bastian Köcher's avatar
      pallet-asset: Fix transfer of a large amount of an asset (#11241) · 2541efdb
      Bastian Köcher authored
      
      
      * pallet-asset: Fix transfer of a large amount of an asset
      
      Before this pr transferring a large amount of an asset would check that transferring the asset would
      not overflow the supply of the asset. However, it doesn't make sense to check for asset supply
      overflow when we just transfer from one account to another account and don't increase the supply in
      any way. It also required to extend the `can_deposit` method of `fungible` and `fungibles` with a
      `mint` parameter. If this parameter is set to `true`, it means we want to mint the amount of an
      asset before transferring it into an account. For `can_withdraw` we don't need to add an extra
      parameter, because withdrawing should never be able to underflow the supply. If that would happen,
      it would mean that somewhere the supply wasn't increased while increasing the balance of an account.
      
      * Update frame/assets/src/functions.rs
      
      * Update frame/assets/src/functions.rs
      
      * Update frame/assets/src/functions.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * FMT
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      2541efdb
  36. Feb 10, 2022
  37. Feb 06, 2022
    • Gavin Wood's avatar
      Referenda and Conviction Voting pallets (#10195) · a6891951
      Gavin Wood authored
      * Initial draft of new referendum state machine.
      
      * Docs
      
      * Fixes
      
      * Fixes
      
      * Add conviction-voting pallet
      
      * Basic build
      
      * Building
      
      * Some TODOs
      
      * Tests building
      
      * Add missing file
      
      * Basic lifecycle test
      
      * Add couple of tests
      
      * Another test
      
      * More tests
      
      * Fixes
      
      * Fixes
      
      * Formatting
      
      * Fixes
      
      * Tests
      
      * Fixes
      
      * Fixes
      
      * More tests
      
      * Formatting
      
      * First few benchmarks
      
      * First few benchmarks
      
      * Defered queue servicing
      
      * More testing
      
      * Benchmarks
      
      * Fiddly benchmark
      
      * Final nudge benchmarks
      
      * Formatting
      
      * Formatting
      
      * Finished up benchmarks
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_referenda --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/referenda/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Events finished
      
      * Missing file
      
      * No GenesisConfig for Referenda
      
      * Formatting
      
      * Docs
      
      * Docs
      
      * Docs
      
      * Per-class conviction voting
      
      * New test & mock utils
      
      * More tests
      
      * Tests
      
      * Tests finished 🎉
      
      
      
      * Benchmarking stuff
      
      * Fixes
      
      * Test harness
      
      * Test harness
      
      * Benchmarks for Conviction=Voting
      
      * Benchmarking pipeline complete
      
      * Docs
      
      * Formatting
      
      * Remove unneeded warning
      
      * Fix UI tests
      
      * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_conviction_voting --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/conviction-voting/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Docs
      
      * Update frame/conviction-voting/src/vote.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * update sp-runtime version
      
      * MEL Fixes for Referenda and Conviction Voting (#10725)
      
      * free maxencodedlen
      
      * more maxencodedlen
      
      * more MEL
      
      * more mel
      
      * disable storage info
      
      * More Referenda Patches (#10760)
      
      * basic fixes
      
      * fix benchmarking
      
      * fix license
      
      * prevent panic in curve math
      
      * fmt
      
      * bump crate versions
      
      * Update mock.rs
      
      Co-authored-by: default avatarParity Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      a6891951
  38. Jan 25, 2022