1. 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
    • PG Herveou's avatar
      Contracts rename v9 to v09 (#14533) · 1818bb13
      PG Herveou authored
      1818bb13
  2. Jul 11, 2023
    • Bastian Köcher's avatar
      Removal of execution strategies (#14387) · 5eb816d7
      Bastian Köcher authored
      
      
      * Start
      
      * More work!
      
      * Moar
      
      * More changes
      
      * More fixes
      
      * More worrk
      
      * More fixes
      
      * More fixes to make it compile
      
      * Adds `NoOffchainStorage`
      
      * Pass the extensions
      
      * Small basti making small progress
      
      * Fix merge errors and remove `ExecutionContext`
      
      * Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension`
      
      Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
      `ExecutionExtension` which provides the default extensions.
      
      * Fix compilation
      
      * Register the global extensions inside runtime api instance
      
      * Fixes
      
      * Fix `generate_initial_session_keys` by passing the keystore extension
      
      * Fix the grandpa tests
      
      * Fix more tests
      
      * Fix more tests
      
      * Don't set any heap pages if there isn't an override
      
      * Fix small fallout
      
      * FMT
      
      * Fix tests
      
      * More tests
      
      * Offchain worker custom extensions
      
      * More fixes
      
      * Make offchain tx pool creation reusable
      
      Introduces an `OffchainTransactionPoolFactory` for creating offchain transactions pools that can be
      registered in the runtime externalities context. This factory will be required for a later pr to
      make the creation of offchain transaction pools easier.
      
      * Fixes
      
      * Fixes
      
      * Set offchain transaction pool in BABE before using it in the runtime
      
      * Add the `offchain_tx_pool` to Grandpa as well
      
      * Fix the nodes
      
      * Print some error when using the old warnings
      
      * Fix merge issues
      
      * Fix compilation
      
      * Rename `babe_link`
      
      * Rename to `offchain_tx_pool_factory`
      
      * Cleanup
      
      * FMT
      
      * Fix benchmark name
      
      * Fix `try-runtime`
      
      * Remove `--execution` CLI args
      
      * Make clippy happy
      
      * Forward bls functions
      
      * Fix docs
      
      * Update UI tests
      
      * Update client/api/src/execution_extensions.rs
      
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/cli/src/params/import_params.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/api/src/execution_extensions.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Pass the offchain storage to the MMR RPC
      
      * Update client/api/src/execution_extensions.rs
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      
      * Review comments
      
      * Fixes
      
      ---------
      
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      Co-authored-by: default avatarKoute <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      5eb816d7
  3. Jul 10, 2023
  4. Jul 09, 2023
  5. Jul 07, 2023
  6. Jul 06, 2023
  7. Jul 05, 2023
  8. Jul 04, 2023
    • Sasha Gryaznov's avatar
      contracts: switch from `parity-wasm`-based to `wasmi`-based module validation (#14449) · f83fdeab
      Sasha Gryaznov authored
      * upgrade to wasmi 0.29
      
      * prepare cleanup
      
      * sync ref_time w engine from the stack frame
      
      * proc_macro: sync gas in host funcs
      
      save: compiles, only gas pushing left to macro
      
      WIP proc macro
      
      proc macro: done
      
      * clean benchmarks & schedule: w_base = w_i64const
      
      * scale gas values btw engine and gas meter
      
      * (re)instrumentation & code_cache removed
      
      * remove gas() host fn, continue clean-up
      
      save
      
      * address review comments
      
      * move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob
      
      * refactor: no reftime_limit&schedule passes, no CodeStorage
      
      * bugs fixing
      
      * fix tests: expected deposit amount
      
      * fix prepare::tests
      
      * update tests and fix bugs
      
      tests::run_out_of_gas_engine, need 2 more
      
      save: 2 bugs with gas syncs: 1 of 2 tests done
      
      gas_syncs_no_overcharge bug fixed, test passes!
      
      cleaned out debug prints
      
      second bug is not a bug
      
      disabled_chain_extension test fix (err msg)
      
      tests run_out_of_fuel_host, chain_extension pass
      
      all tests pass
      
      * update docs
      
      * bump wasmi 0.30.0
      
      * benchmarks updated, tests pass
      
      * refactoring
      
      * s/OwnerInfo/CodeInfo/g;
      
      * migration: draft, compiles
      
      * migration: draft, runs
      
      * migration: draft, runs (fixing)
      
      * deposits repaid non pro rata
      
      * deposits repaid pro rata
      
      * better try-runtime output
      
      * even better try-runtime output
      
      * benchmark migration
      
      * fix merge leftover
      
      * add forgotten fixtures, fix docs
      
      * address review comments
      
      * ci fixes
      
      * cleanup
      
      * benchmarks::prepare to return DispatchError
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * store memory limits to CodeInfo
      
      * ci: roll back weights
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
      
      * drive-by: update Readme and pallet rustdoc
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * use wasmi 0.29
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * use wasmi 0.30 again
      
      * query memory limits from wasmi
      
      * save: scan_exports ported, compiles
      
      * save (wip, not compiles)
      
      * query memory limits from wasmi
      
      * better migration types
      
      * ci: pull weights from master
      
      * refactoring
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
      
      * scan_imports ported
      
      * scan_export ported, other checks removed
      
      * tests fixed
      
      tests fixed
      
      * drop wasmparser and parity-wasm dependencies
      
      * typo fix
      
      * addressing review comments
      
      * refactor
      
      * address review comments
      
      * optimize migration
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * another review round comments addressed
      
      * ci fix one
      
      * clippy fix
      
      * ci fix two
      
      * allow stored modules to have no memory imports
      
      * rollback: allow stored modules to have no memory imports
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * address review comments
      
      ---------
      
      Co-authored-by: command-bot <>
      f83fdeab
  9. Jul 03, 2023
    • Bastian Köcher's avatar
      Revert k256 removal (#14499) · 79f600db
      Bastian Köcher authored
      * Revert "Remove k256 crate from frame-support dependencies (#14452)"
      
      This reverts commit 4d426214.
      
      * Keep the test
      79f600db
    • Ross Bulat's avatar
      Nomination pools: disallow setting above global max commission (#14496) · fc36e04d
      Ross Bulat authored
      * add CommissionExceedsGlobalMaximum
      
      * rename test
      
      * amend set_commission_max_works_with_error_tests
      
      * fmt
      fc36e04d
    • Hugo Trentesaux's avatar
      Fix typo (#14479) (#14480) · 7a2a1b93
      Hugo Trentesaux authored
      7a2a1b93
    • Sasha Gryaznov's avatar
      contracts: switch to wasmi gas metering (#14084) · fda86dd5
      Sasha Gryaznov authored
      * upgrade to wasmi 0.29
      
      * prepare cleanup
      
      * sync ref_time w engine from the stack frame
      
      * proc_macro: sync gas in host funcs
      
      save: compiles, only gas pushing left to macro
      
      WIP proc macro
      
      proc macro: done
      
      * clean benchmarks & schedule: w_base = w_i64const
      
      * scale gas values btw engine and gas meter
      
      * (re)instrumentation & code_cache removed
      
      * remove gas() host fn, continue clean-up
      
      save
      
      * address review comments
      
      * move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob
      
      * refactor: no reftime_limit&schedule passes, no CodeStorage
      
      * bugs fixing
      
      * fix tests: expected deposit amount
      
      * fix prepare::tests
      
      * update tests and fix bugs
      
      tests::run_out_of_gas_engine, need 2 more
      
      save: 2 bugs with gas syncs: 1 of 2 tests done
      
      gas_syncs_no_overcharge bug fixed, test passes!
      
      cleaned out debug prints
      
      second bug is not a bug
      
      disabled_chain_extension test fix (err msg)
      
      tests run_out_of_fuel_host, chain_extension pass
      
      all tests pass
      
      * update docs
      
      * bump wasmi 0.30.0
      
      * benchmarks updated, tests pass
      
      * refactoring
      
      * s/OwnerInfo/CodeInfo/g;
      
      * migration: draft, compiles
      
      * migration: draft, runs
      
      * migration: draft, runs (fixing)
      
      * deposits repaid non pro rata
      
      * deposits repaid pro rata
      
      * better try-runtime output
      
      * even better try-runtime output
      
      * benchmark migration
      
      * fix merge leftover
      
      * add forgotten fixtures, fix docs
      
      * address review comments
      
      * ci fixes
      
      * cleanup
      
      * benchmarks::prepare to return DispatchError
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * store memory limits to CodeInfo
      
      * ci: roll back weights
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
      
      * drive-by: update Readme and pallet rustdoc
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * use wasmi 0.29
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * use wasmi 0.30 again
      
      * query memory limits from wasmi
      
      * better migration types
      
      * ci: pull weights from master
      
      * refactoring
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contracts
      
      * addressing review comments
      
      * refactor
      
      * address review comments
      
      * optimize migration
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
      
      * another review round comments addressed
      
      * ci fix one
      
      * clippy fix
      
      * ci fix two
      
      ---------
      
      Co-authored-by: command-bot <>
      fda86dd5
    • gupnik's avatar
      Removes `pallet::call_index` from `dev_mode` example (#14492) · e42768ea
      gupnik authored
      
      
      * Removes call_index
      
      * Adds UI test and updates doc
      
      * Update frame/examples/dev-mode/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update frame/examples/dev-mode/src/lib.rs
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      e42768ea
    • Bastian Köcher's avatar
      sp-api: Put `frame-metadata` behind some feature (#14398) · 698a6d1a
      Bastian Köcher authored
      * sp-api: Put `frame-metadata` behind some feature
      
      Closes: https://github.com/paritytech/substrate/issues/14296
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Review feedback
      
      ---------
      
      Co-authored-by: command-bot <>
      698a6d1a
    • Cyrill Leutwiler's avatar
      6005d199
  10. Jul 02, 2023
  11. Jul 01, 2023
  12. Jun 30, 2023
  13. Jun 29, 2023
  14. Jun 28, 2023
  15. Jun 27, 2023
    • gupnik's avatar
      [FRAME Core] Adds ability to split a pallet across multiple files (#13950) · 5d877401
      gupnik authored
      
      
      * Initial setup
      
      * Updates macro_magic version and refactors accordingly
      
      * Removes unwrap from macro
      
      * Splits into multiple sections
      
      * Uses call_site to fix macro hygiene issue
      
      * Initial setup
      
      * Removes unnecessary changes
      
      * Moves template palet back
      
      * Updates cargo.lock
      
      * Moves BagsList inside mod
      
      * Comments access to internal functions for now
      
      * Updates tests
      
      * Uncomments code
      
      * Fixes test
      
      * Moves bags-list to separate crate
      
      * Initial setup
      
      * Removes bags-list changes
      
      * Fix structure
      
      * Minor update
      
      * Addresses review comment
      
      * Adds a couple of UI tests. More to be added
      
      * Adds err files
      
      * Adds test for no pallet
      
      * Adds doc
      
      * Updates versions
      
      * Adds benchmarking
      
      * Updates doc link
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Minor update
      
      * Adds missing changes
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Update frame/support/procedural/src/lib.rs
      
      Co-authored-by: default avatarSam Johnson <[email protected]>
      
      * Addresses review comments
      
      * Addresses review comments
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Update frame/support/procedural/src/lib.rs
      
      Co-authored-by: default avatarSam Johnson <[email protected]>
      
      * Update frame/support/procedural/src/lib.rs
      
      Co-authored-by: default avatarSam Johnson <[email protected]>
      
      * Update frame/support/procedural/src/lib.rs
      
      Co-authored-by: default avatarSam Johnson <[email protected]>
      
      * Adds UI test for disambiguation
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Makes clippy happy
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Fixes frame support test
      
      * Fixes frame support test
      
      * Split items other than storage
      
      * Updates versions
      
      * Fixes some review comments
      
      * Addresses review comments
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Updates docs
      
      * Adds experimental disclaimer
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Update frame/support/test/tests/split_ui/no_section_found.rs
      
      Co-authored-by: default avatarSam Johnson <[email protected]>
      
      * Addresses review comments
      
      * Fixes test
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarcommand-bot <[email protected]>
      Co-authored-by: default avatarSam Johnson <[email protected]>
      5d877401
  16. Jun 25, 2023
  17. Jun 24, 2023
  18. Jun 23, 2023
    • Jegor Sidorenko's avatar
      Pay tx fee with assets by using the asset conversion pallet (#14340) · be7c654c
      Jegor Sidorenko authored
      
      
      * Pay tx by swapping the assets
      
      * Change liquidity structure
      
      * Uncomment the event
      
      * Update frame/transaction-payment/asset-tx-payment/src/payment.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * New approach
      
      * Fix bounds
      
      * Clearer version
      
      * Change IsType with Into and From
      
      * Enable event
      
      * Check ED + fix the logic
      
      * Add temp comments
      
      * Rework the refund
      
      * Clean up
      
      * Improve readability
      
      * Getting closer
      
      * fix
      
      * Use fungible instead of Currency
      
      * Test account without ed
      
      * Final push
      
      * Fixed
      
      * Rename to pallet-asset-conversion-tx-payment
      
      * Bring back the old pallet
      
      * Update versions
      
      * Update docs
      
      * Update readme
      
      * Wrong readme updated
      
      * Revert back doc change
      
      * Fix import
      
      * Fix kitchensink
      
      * Fix
      
      * One more time..
      
      * Wait pls
      
      * Update frame/asset-conversion/src/lib.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * Update frame/support/src/traits/tokens/fungibles/regular.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update docs/comments
      
      * Docs improvement
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/lib.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Payed -> paid
      
      * Docs
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/README.md
      
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      
      * Rewrite docs
      
      * Try to clean the deps
      
      * Add debug assert
      
      * Return back frame-benchmarking
      
      * Update cargo
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/mock.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Rename
      
      * clearer error message
      
      * Docs for Pay by Swap (#14445)
      
      * docs
      
      * better error name
      
      * more comments
      
      * more docs on swap trait
      
      * Fix compile errors
      
      * Another fix
      
      * Refactoring
      
      * Update frame/transaction-payment/asset-conversion-tx-payment/src/payment.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Emit an error if we fail to swap the refund back
      
      * Add integrity_test
      
      * Update frame/asset-conversion/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fmt
      
      * Use defensive_ok_or
      
      * child PR: Tidy swap event (#14441)
      
      * Dedup raising swap event
      
      * use expect rather than unwrap
      
      * Additional checks for future defence.
      
      * cargo fmt
      
      * Update frame/asset-conversion/src/lib.rs
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      
      ---------
      
      Co-authored-by: default avatarJegor Sidorenko <[email protected]>
      
      ---------
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: default avatarMuharem Ismailov <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      be7c654c
    • Branislav Kontur's avatar
      Adds ability to prepare/initialize before running `set_code` benchmark (#14435) · 3e2c73df
      Branislav Kontur authored
      * Adds ability to prepare/initialize before running `set_code` benchmark
      
      * Fix
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system
      
      * Replaced BenchmarkHelper with function
      
      * Fix
      
      * Introduced `set_code_data` for benchmark with default value
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system
      
      * (Hope) Final adjustment (because system parachains generates ValidationFunctionStored instead of CodeUpdated)
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev frame-system
      
      ---------
      
      Co-authored-by: command-bot <>
      3e2c73df
  19. Jun 22, 2023
  20. Jun 21, 2023