Skip to content
  1. Mar 03, 2023
  2. Mar 02, 2023
  3. Mar 01, 2023
  4. Feb 28, 2023
  5. Feb 27, 2023
    • Michal Kucharczyk's avatar
      b5e7fbfb
    • Arsenii Lyashenko's avatar
      Add Windows support for storage monitor (#13466) · a1c546e9
      Arsenii Lyashenko authored
      * Add Windows support for storage monitor
      
      * Apply suggested changes
      a1c546e9
    • Bastian Köcher's avatar
      `pallet-treasury`: Ensure we respect `max_amount` for spend across batch calls (#13468) · 6aa4127a
      Bastian Köcher authored
      * `pallet-treasury`: Ensure we respect `max_amount` for spend across batch calls
      
      When calling `spend` the origin defines the `max_amount` of tokens it is allowed to spend. The
      problem is that someone can send a `batch(spend, spend)` to circumvent this restriction as we don't
      check across different calls that the `max_amount` is respected. This pull request fixes this
      behavior by introducing a so-called dispatch context. This dispatch context is created once per
      outer most `dispatch` call. For more information see the docs in this pr. The treasury then uses
      this dispatch context to attach information about already spent funds per `max_amount` (we assume
      that each origin has a different `max_amount` configured). So, a `batch(spend, spend)` is now
      checked to stay inside the allowed spending bounds.
      
      Fixes: https://github.com/paritytech/substrate/issues/13167
      
      * Import `Box` for wasm
      
      * FMT
      6aa4127a
    • Muharem Ismailov's avatar
      constructor for MemberRecord (#13473) · 85a5a5db
      Muharem Ismailov authored
      85a5a5db
    • Davide Galassi's avatar
      Move grandpa crates to consensus folder (#13458) · 40c36c0c
      Davide Galassi authored
      * Move grandpa under consensus dir
      * Rename grandpa folder
      * Finish grandpa renaming
      * Minor tweaks
      * Cargo fmt
      * Adjust path to chain spec
      40c36c0c
    • Koute's avatar
      Further storage iterator refactoring (#13445) · 91c595bc
      Koute authored
      * Remove `Backend::apply_to_key_values_while`
      
      * Add `IterArgs::start_at_exclusive`
      
      * Use `start_at_exclusive` in functions which used `Backend::apply_to_key_values_while`
      
      * Remove `Backend::apply_to_keys_while`
      
      * Remove `for_keys_with_prefix`, `for_key_values_with_prefix` and `for_child_keys_with_prefix`
      
      * Remove unnecessary `to_vec` calls
      
      * Fix unused method warning in no_std
      
      * Remove unnecessary import
      
      * Also check proof sizes in the test
      
      * Iterate over both keys and values in `prove_range_read_with_size` and add a test
      91c595bc
    • Anton's avatar
      [client/network] Remove unused argument (#13444) · bb00b262
      Anton authored
      * improve error message
      
      * removed unused argument
      
      * docs: disconnect_peer_inner no longer accepts `ban`
      
      * remove redundant trace message
      
      ```
      sync: Too many full nodes, rejecting 12D3KooWSQAP2fh4qBkLXBW4mvCtbAiK8sqMnExWHHTZtVAxZ8bQ
      sync: 12D3KooWSQAP2fh4qBkLXBW4mvCtbAiK8sqMnExWHHTZtVAxZ8bQ disconnected
      ```
      
      is enough to understand that we've refused to connect to the given peer
      
      * Revert "removed unused argument"
      
      This reverts commit c87f755b1fd03494fb446b604fe25c2418da7c87.
      
      * ban peer for 10s after disconnect
      
      * do not accept incoming conns if peer was banned
      
      * Revert "do not accept incoming conns if peer was banned"
      
      This reverts commit 7e59d05975765f2547468e9dcfd1361516c41e06.
      
      * Revert "ban peer for 10s after disconnect"
      
      This reverts commit 3859201ced42a5b2d18c0600e29efd20962a7289.
      
      * Revert "Revert "removed unused argument""
      
      This reverts commit f1dc623646dc5a69e1822c35f428e90dffe34d95.
      
      * format code
      
      * Revert "remove redundant trace message"
      
      This reverts commit a87e65f08553dbe69027e9aa4f7ca4779ccaa7f2.
      bb00b262
    • Liu-Cheng Xu's avatar
      Support the subscription of every imported block (#13372) · 1d5ea509
      Liu-Cheng Xu authored
      * Support the subscription of every import block
      
      Close #13315
      
      * Clean up any closed block import notification sinks
      
      * Apply review suggestions
      
      * Nit
      
      * `every_block_import_notification_sinks` -> `every_import_notification_sinks`
      
      * Apply review suggestions
      1d5ea509
  6. Feb 25, 2023
  7. Feb 24, 2023
    • Mira Ressel's avatar
      Automatically format ci pipeline specs with prettier (#13441) · 84638524
      Mira Ressel authored
      * [ci] Deduplicate variables: sections in pipeline specs
      
      The prettier yaml parser doesn't like these.
      
      * [ci] provide git clean filter to format pipeline specs
      
      * [ci] Reformat pipeline specs with prettier
      84638524
    • 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
  8. Feb 23, 2023
  9. 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
    • Jegor Sidorenko's avatar
      [NFTs] Update attributes with offchain signature (#13390) · af25310e
      Jegor Sidorenko authored
      
      
      * Allow to mint with the pre-signed signatures
      
      * Another try
      
      * WIP: test encoder
      
      * Fix the deposits
      
      * Refactoring + tests + benchmarks
      
      * Add sp-core/runtime-benchmarks
      
      * Remove sp-core from dev deps
      
      * Enable full_crypto for benchmarks
      
      * Typo
      
      * Fix
      
      * Update frame/nfts/src/mock.rs
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nfts
      
      * Add docs
      
      * Add attributes into the pre-signed object & track the deposit owner for attributes
      
      * Update docs
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nfts
      
      * Add the number of attributes provided to weights
      
      * Support pre-signed attributes
      
      * Update docs
      
      * Fix merge artifacts
      
      * Update docs
      
      * Add more tests
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nfts
      
      * Update frame/nfts/src/types.rs
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      
      * Update types.rs
      
      ---------
      
      Co-authored-by: default avatarSquirrel <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      af25310e
    • Doordashcon's avatar
      permissionless `bond_extra` in nomination pools (#12608) · 35a89957
      Doordashcon authored
      
      
      * create enum
      
      * logic check
      
      * add benchmarks
      
      * -enum
      
      * update
      
      * bond extra other
      
      * update
      
      * update
      
      * update
      
      * cargo fmt
      
      * Permissioned
      
      * update
      
      * cargo fmt
      
      * update
      
      * update index
      
      * doc update
      
      Co-authored-by: default avatarAnkan <[email protected]>
      
      * doc update
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * cargo fmt
      
      * bond_extra auto compound
      
      * bond_extra_other
      
      * Apply suggestions from code review
      
      * Fixes from kian
      
      * updates docs & test
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * Update frame/nomination-pools/src/lib.rs
      
      * Update frame/nomination-pools/src/tests.rs
      
      * fixes + fmt
      
      * expand ClaimPermissions + add benchmarks
      
      * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nomination_pools
      
      * tidy up claim payout benches
      
      * fix
      
      * + test: claim_payout_other_works
      
      * comments, rename to set_claim_permission
      
      * fix comment
      
      * remove ClaimPermission on leave pool
      
      * fix test
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * + test for ClaimPermissions::remove()
      
      * impl can_bond_extra & can_claim_payout
      
      ---------
      
      Co-authored-by: default avatarAnkan <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarkianenigma <[email protected]>
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarRoss Bulat <[email protected]>
      35a89957
    • 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
  10. Feb 21, 2023