Skip to content
  1. Feb 28, 2023
  2. 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
    • 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
  3. 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
  4. Feb 23, 2023
  5. 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
  6. Feb 21, 2023
  7. 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
    • Adrian Catangiu's avatar
      client/beefy: drop justification on import if pallet not enabled (#13422) · bd8cb7ba
      Adrian Catangiu authored
      
      
      BEEFY pallet allows setting on-chain BEEFY genesis to some future
      block. Disregard any BEEFY justifications attached to imported blocks
      that predate configured BEEFY genesis.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      bd8cb7ba
    • Dmitry Markin's avatar
      Use async/await instead of manual polling of `NetworkWorker` (#13219) · 8d033b6d
      Dmitry Markin authored
      
      
      * Convert `NetworkWorker::poll()` into async `next_action()`
      
      * Use `NetworkWorker::next_action` instead of `poll` in `sc-network-test`
      
      * Revert "Use `NetworkWorker::next_action` instead of `poll` in `sc-network-test`"
      
      This reverts commit 4b5d851ec864f78f9d083a18a618fbe117c896d2.
      
      * Fix `sc-network-test` to poll `NetworkWorker::next_action`
      
      * Fix `sc_network::service` tests to poll `NetworkWorker::next_action`
      
      * Fix docs
      
      * kick CI
      
      * Factor out `next_worker_message()` & `next_swarm_event()`
      
      * Error handling: replace `futures::pending!()` with `expect()`
      
      * Simplify stream polling in `select!`
      
      * Replace `NetworkWorker::next_action()` with `run()`
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * minor: comment
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Print debug log when network future is shut down
      
      * Evaluate `NetworkWorker::run()` future once before the loop
      
      * Fix client code to match new `NetworkService` interfaces
      
      * Make clippy happy
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Revert "Apply suggestions from code review"
      
      This reverts commit 9fa646d0ed613e5f8623d3d37d1d59ec0a535850.
      
      * Make `NetworkWorker::run()` consume `self`
      
      * Terminate system RPC future if RPC rx stream has terminated.
      
      * Rewrite with let-else
      
      * Fix comments
      
      * Get `best_seen_block` and call `on_block_finalized` via `ChainSync` instead of `NetworkService`
      
      * rustfmt
      
      * make clippy happy
      
      * Tests: schedule wake if `next_action()` returned true
      
      * minor: comment
      
      * minor: fix `NetworkWorker` rustdoc
      
      * minor: amend the rustdoc
      
      * Fix bug that caused `on_demand_beefy_justification_sync` test to hang
      
      * rustfmt
      
      * Apply review suggestions
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      8d033b6d
  8. Feb 18, 2023
    • Bastian Köcher's avatar
      state-db: Print warning when using large pruning window on RocksDb (#13414) · fdd5203a
      Bastian Köcher authored
      * state-db: Print warning when using large pruning window on RocksDb
      
      This pr changes state-db to print a warning when using a large pruning window and running with a
      database that isn't supporting ref-counting like RocksDb. This makes the user aware of potential out
      of memory errors because this option together with RocksDb etc puts the entire pruning window into
      memory. Besides that the pr introduces `LOG_TARGET` for having the target declared central!
      
      * Review comments
      fdd5203a
  9. Feb 17, 2023
    • Dmitry Markin's avatar
      Revert "network: Detect early that `NotificationOutSubstream` was closed by... · 4d720a92
      Dmitry Markin authored
      Revert "network: Detect early that `NotificationOutSubstream` was closed by the remote (#13396)" (#13409)
      
      This reverts commit b7e58e7c.
      4d720a92
    • Dmitry Markin's avatar
    • Adrian Catangiu's avatar
      BEEFY: implement equivocations detection, reporting and slashing (#13121) · c21f292a
      Adrian Catangiu authored
      
      
      * client/beefy: simplify self_vote logic
      
      * client/beefy: migrate to new state version
      
      * client/beefy: detect equivocated votes
      
      * fix typos
      
      * sp-beefy: add equivocation primitives
      
      * client/beefy: refactor vote processing
      
      * fix version migration for new rounds struct
      
      * client/beefy: track equivocations and create proofs
      
      * client/beefy: adjust tests for new voting logic
      
      * sp-beefy: fix commitment ordering and equality
      
      * client/beefy: simplify handle_vote() a bit
      
      * client/beefy: add simple equivocation test
      
      * client/beefy: submit equivocation proof - WIP
      
      * frame/beefy: add equivocation report runtime api - part 1
      
      * frame/beefy: report equivocation logic - part 2
      
      * frame/beefy: add pluggable Equivocation handler - part 3
      
      * frame/beefy: impl ValidateUnsigned for equivocations reporting
      
      * client/beefy: submit report equivocation unsigned extrinsic
      
      * primitives/beefy: fix tests
      
      * frame/beefy: add default weights
      
      * frame/beefy: fix tests
      
      * client/beefy: fix tests
      
      * frame/beefy-mmr: fix tests
      
      * frame/beefy: cross-check session index with equivocation report
      
      * sp-beefy: make test Keyring useable in pallet
      
      * frame/beefy: add basic equivocation test
      
      * frame/beefy: test verify equivocation results in slashing
      
      * frame/beefy: test report_equivocation_old_set
      
      * frame/beefy: add more equivocation tests
      
      * sp-beefy: fix docs
      
      * beefy: simplify equivocations and fix tests
      
      * client/beefy: address review comments
      
      * frame/beefy: add ValidateUnsigned to test/mock runtime
      
      * client/beefy: fixes after merge master
      
      * fix missed merge damage
      
      * client/beefy: add test for reporting equivocations
      
      Also validated there's no unexpected equivocations reported in the
      other tests.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      * sp-beefy: move test utils to their own file
      
      * client/beefy: add negative test for equivocation reports
      
      * sp-beefy: move back MmrRootProvider - used in polkadot-service
      
      * impl review suggestions
      
      * client/beefy: add equivocation metrics
      
      ---------
      
      Signed-off-by: default avataracatangiu <[email protected]>
      Co-authored-by: parity-processbot <>
      c21f292a
  10. Feb 16, 2023
  11. Feb 15, 2023
  12. Feb 14, 2023
  13. Feb 13, 2023
  14. Feb 12, 2023
  15. Feb 11, 2023
  16. Feb 08, 2023
  17. Feb 07, 2023
  18. Feb 06, 2023
  19. Feb 03, 2023