1. Apr 27, 2023
  2. Apr 25, 2023
  3. Apr 21, 2023
    • Liam Aharon's avatar
      try-runtime: dynamic storage query sizes (#13923) · bc1a5992
      Liam Aharon authored
      
      
      * improve batch rpc error message
      
      * wip aimd storage data fetch
      
      * complete aimd function refactor
      
      * make batch_request function async
      
      * improve function name
      
      * fix load_child_remote issue
      
      * slight efficiency improvement
      
      * improve logs and variable name
      
      * remove redundant comment
      
      * improve comment
      
      * address pr comments
      
      * Update utils/frame/remote-externalities/src/lib.rs
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * simplify client handling
      
      * fix type issue
      
      * fix clippy issue
      
      * try to trigger ci
      
      * try to trigger ci
      
      ---------
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      bc1a5992
  4. Apr 13, 2023
  5. Apr 12, 2023
  6. Apr 09, 2023
    • yjh's avatar
      refactor(sc-executor): use wasm executor builder instead of old apis (#13740) · d5e460b3
      yjh authored
      * refactor: use builder api for all executors
      
      * improve a lot
      
      * remove unused args
      
      * cleanup deps
      
      * fix inconsistency about heap alloc
      
      * add `heap_pages` back to try-runtime
      
      * fix
      
      * chore: reduce duplicated code for sc-service-test
      
      * cleanup code
      
      * fmt
      
      * improve test executor
      
      * improve
      
      * use #[deprecated]
      
      * set runtime_cache_size: 4
      
      * fix and improve
      
      * refactor builder
      
      * fix
      
      * fix bench
      
      * fix tests
      
      * fix warnings
      
      * fix warnings
      
      * fix
      
      * fix
      
      * update by suggestions
      
      * update name
      d5e460b3
  7. Apr 06, 2023
  8. Apr 05, 2023
  9. Apr 04, 2023
    • Bastian Köcher's avatar
      Remove deprecated batch verification (#13799) · 846ec8cd
      Bastian Köcher authored
      This removes the deprecated batch verification. This was actually never really activated.
      Nevertheless, we need to keep the host functions around to support old runtimes which may import
      these host functions. However, we do not give access to these functions anymore. This means that any new
      runtime can not call them anymore. The host function implementations we keep will not do batch verification and will
      instead fall back to the always existing option of directly verifying the passed signature.
      `finish_batch_verification` will return the combined result of all the batch verify calls.
      
      This removes the `TaskExecutorExt` which only existed to support the batch verification. So, any
      code that used this extension can just remove the registration of them. It also removes
      `SignatureBatching` that was used by `frame-executive` to control the batch verification.
      However, there wasn't any `Verify` implementation that called the batch verification functions.
      846ec8cd
  10. Mar 24, 2023
  11. Mar 22, 2023
  12. Mar 20, 2023
    • Davide Galassi's avatar
      Keystore overhaul (iter 2) (#13634) · 480396fe
      Davide Galassi authored
      * Remove bloat about remote keystore
      
      * Update docs and remove unused 'KeystoreRef' trait
      
      * Use wherever possible, MemoryKeystore for testing
      
      * Remove unrequired fully qualified method syntax for Keystore
      480396fe
    • Mira Ressel's avatar
      address clippy & rustdoc warnings · faaa0c28
      Mira Ressel authored
      The comment was out of date anyway, State::Live no longer takes a
      snapshot_path argument.
      faaa0c28
  13. Mar 17, 2023
    • Davide Galassi's avatar
      Keystore overhaul (#13615) · f110941b
      Davide Galassi authored
      * Remove 'supported_keys' 'sign_with_any' and 'sign_with_all' from keystore trait
      
      * Remove the aync keystore
      
      * Renaming:
      - SyncCryptoStore -> Keystore
      - SyncCryptoStorePtr -> KeystorePtr
      - KeyStore -> MemoryKeystore
      
      * Fix authority discovery worker and tests
      
      * Rename 'insert_unknown' to 'insert'
      
      * Remove leftover
      f110941b
  14. Mar 14, 2023
  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. Mar 02, 2023
  17. Mar 01, 2023
    • Koute's avatar
      Speed up storage iteration from within the runtime (#13479) · 55263fa2
      Koute authored
      * Speed up storage iteration from within the runtime
      
      * Move the cached iterator into an `Option`
      
      * Use `RefCell` in no_std
      
      * Simplify the code slightly
      
      * Use `Option::replace`
      
      * Update doc comment for `next_storage_key_slow`
      55263fa2
  18. Feb 28, 2023
  19. Feb 24, 2023
    • Bastian Köcher's avatar
      wasm-executor: Support growing the memory (#12520) · 941288c6
      Bastian Köcher authored
      
      
      * As always, start with something :P
      
      * Add support for max_heap_pages
      
      * Add support for wasmtime
      
      * Make it compile
      
      * Fix compilation
      
      * Copy wrongly merged code
      
      * Fix compilation
      
      * Some fixes
      
      * Fix
      
      * Get stuff working
      
      * More work
      
      * More fixes
      
      * ...
      
      * More
      
      * FIXEs
      
      * Switch wasmi to use `RuntimeBlob` like wasmtime
      
      * Removed unused stuff
      
      * Cleanup
      
      * More cleanups
      
      * Introduce `CallContext`
      
      * Fixes
      
      * More fixes
      
      * Add builder for creating the `WasmExecutor`
      
      * Adds some docs
      
      * FMT
      
      * First round of feedback.
      
      * Review feedback round 2
      
      * More fixes
      
      * Fix try-runtime
      
      * Update client/executor/wasmtime/src/instance_wrapper.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/executor/common/src/wasm_runtime.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/executor/common/src/runtime_blob/runtime_blob.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/executor/common/src/wasm_runtime.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/allocator/src/freeing_bump.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Update client/allocator/src/freeing_bump.rs
      
      Co-authored-by: default avatarKoute <[email protected]>
      
      * Feedback round 3
      
      * FMT
      
      * Review comments
      
      ---------
      
      Co-authored-by: default avatarKoute <[email protected]>
      941288c6
  20. Feb 23, 2023
    • Gonçalo Pestana's avatar
    • Gonçalo Pestana's avatar
      Abstracts elections-phragmen pallet to use NposSolver (#12588) · b793666c
      Gonçalo Pestana authored
      
      
      * Abstracts elections-phragmen pallet to use NposSolver
      
      * Update frame/elections-phragmen/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/elections-phragmen/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * changes the name of the pallet; adds changelog
      
      * update changelog
      
      * Adds weight testing
      
      * Adds log macro_rules
      
      * renames elections-phragment dir to elections
      
      * weights rename
      
      * fixes typo in cargo toml
      
      * pre/post solve weight scafolding
      
      * refactor do_post_election
      
      * refactors into pre and post election solve for independent benchmarking
      
      * deconstructs PreElectionResults struct
      
      * updates benchmarking pre and post election solve; mock weights
      
      * Update frame/elections/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/elections/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * addresses PR comments
      
      * adds pre_solve and post_sove weights
      
      * Adds comments on election pallet id param name change
      
      * ".git/.scripts/bench-bot.sh" pallet dev pallet_elections
      
      * Finishes pre-post solve weights
      
      * Update frame/elections/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/elections/src/lib.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Addresses PR comments: no panic in on_init path; nits
      
      * Fixes node build
      
      * Implements approval voting to use as a `NposSolver` (#13367)
      
      * Implements the approval voting methods in sp_npos_elections
      
      * fmt
      
      * remove unecessary file
      
      * comment clarification
      
      * re-run weights
      
      * fix typo
      
      * updates MaxVoters in tests for integrity_tests to pass
      
      * Refactors election provider support benchmarks outside its own crate (#13431)
      
      * Refactors election provider support benchmarks outside its own crate
      ---------
      
      Co-authored-by: command-bot <>
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarRoss Bulat <[email protected]>
      b793666c
  21. Feb 22, 2023
    • Koute's avatar
      Rework storage iterators (#13284) · f8e3bdad
      Koute authored
      * Rework storage iterators
      
      * Make sure storage iteration is also accounted for when benchmarking
      
      * Use `trie-db` from crates.io
      
      * Appease clippy
      
      * Bump `trie-bench` to 0.35.0
      
      * Fix tests' compilation
      
      * Update comment to clarify how `IterArgs::start_at` works
      
      * Add extra tests
      
      * Fix iterators on `Client` so that they behave as before
      
      * Add extra `unwrap`s in tests
      
      * More clippy fixes
      
      * Come on clippy, give me a break already
      
      * Rename `allow_missing` to `stop_on_incomplete_database`
      
      * Add `#[inline]` to `with_recorder_and_cache`
      
      * Use `with_recorder_and_cache` in `with_trie_db`; add doc comment
      
      * Simplify code: use `with_trie_db` in `next_storage_key_from_root`
      
      * Remove `expect`s in the benchmarking CLI
      
      * Add extra doc comments
      
      * Move `RawIter` before `TrieBackendEssence` (no code changes; just cut-paste)
      
      * Remove a TODO in tests
      
      * Update comment for `StorageIterator::was_complete`
      
      * Update `trie-db` to 0.25.1
      f8e3bdad
  22. 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
  23. Feb 20, 2023
    • Michal Kucharczyk's avatar
      `BlockId` removal: `runtime-api` refactor (#13255) · 7a101541
      Michal Kucharczyk authored
      
      
      * BlockId removal: refactor of runtime API
      
      It changes the arguments of:
      - `ApiExt` methods:  `has_api`, `has_api_with`, `api_version`
      - `CallApiAt` method: `runtime_version_at`
      from: `BlockId<Block>` to: `Block::Hash`
      
      It also changes the first argument of all generated runtime API calls from: `BlockId<Block>` to: `Block::Hash`
      
      This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
      
      * BlockId removal: refactor of runtime API - tests
      
      - tests adjusted to new runtime API,
      - some tests migrated from block number to block hash
      
      * benchmarking-cli: BlockId(0) migrated to info().genesis_hash
      
      `runtime_api.call()` now requires the block hash instead of BlockId::Number.
      To access the genesis hash widely used in benchmarking engine the Client
      was constrained to satisfy `sp_blockchain::HeaderBackend<Block>` trait
      which provides `info().genesis_hash`.
      
      * trivial: api.call(BlockId) -> api.call(Hash)
      
      - Migrated all `runtime_api.calls` to use Hash
      - Noteworthy (?):
      -- `validate_transaction_blocking` in transaction pool,
      
      * CallApiAtParams::at changed to Block::Hash
      
      * missed doc updated
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * BlockId removal: Benchmark::consumed_weight
      
      Little refactor around `Benchmark::consumed_weight`: `BlockId` removed.
      
      * at_hash renamed
      
      * wrong merge fixed
      
      * beefy worker: merged with master
      
      * beefy: tests: missing block problem fixed
      
      * Apply review suggestion
      
      * fix
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: command-bot <>
      7a101541
  24. Feb 17, 2023
    • Piotr Mikołajczyk's avatar
      `try-runtime::fast-forward` (#12896) · 3595d871
      Piotr Mikołajczyk authored
      * try-runtime::fast-forward
      
      * Revert un`pub`ing command's fields
      
      * Handle storage change failure
      
      * Adjust Substrate node
      
      * Feature-gated imports
      
      * doc link
      
      * Feature-gated imports in node-template
      
      * Move trait, blanket implementation and auxiliary functions to a new module
      
      * Distinguish between plain babe+timestamp and substrate enhanced info
      
      * Remove uncles inherents
      
      * Missing argument
      
      * Add doc comment about `blocktime_millis`
      
      * Add licenses
      3595d871
  25. Feb 12, 2023
  26. Jan 26, 2023
  27. Jan 25, 2023
  28. Jan 20, 2023
  29. Jan 19, 2023
  30. Jan 11, 2023
  31. Jan 04, 2023
  32. Jan 02, 2023
  33. Dec 30, 2022
  34. Dec 20, 2022
    • Michal Kucharczyk's avatar
      `BlockId` removal: refactor: `HeaderBackend::header` (#12874) · 548955a7
      Michal Kucharczyk authored
      * BlockId removal: refactor: HeaderBackend::header
      
      It changes the arguments of:
      - `HeaderBackend::header`,
      - `Client::header`,
      - `PeersClient::header`
      - `ChainApi::block_header`
      
      methods from: `BlockId<Block>` to: `Block::Hash`
      
      This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
      
      * non-trivial usages of haeder(block_id) refactored
      
      This may required introduction of dedicated function:
      header_for_block_num
      
      * fmt
      
      * fix
      
      * doc fixed
      
      * ".git/.scripts/fmt.sh"
      
      * BlockId removal: refactor: HeaderBackend::expect_header
      
      It changes the arguments of `HeaderBackend::expect_header` method from: `BlockId<Block>` to: `Block::Hash`
      
      * ".git/.scripts/fmt.sh"
      
      * readme updated
      
      * ".git/.scripts/fmt.sh"
      
      * fix
      
      Co-authored-by: parity-processbot <>
      548955a7
  35. Dec 19, 2022
    • Qinxuan Chen's avatar
      *: update `rand` to v0.8.5 (#12962) · 40c04cf1
      Qinxuan Chen authored
      * *: update rand to v0.8.5
      
      * *: remove useless deps from Cargo.toml
      
      * fix pallet-session-benchmarking
      
      * fix pallet-election-provider-support test
      
      * remove useless rand from dev-dependencies
      40c04cf1