Skip to content
  1. Oct 26, 2022
  2. Oct 25, 2022
  3. Oct 24, 2022
  4. Oct 22, 2022
    • Aaro Altonen's avatar
      Make `NetworkService` callable for `ChainSync` (#12542) · a877b0cc
      Aaro Altonen authored
      Introduce a middleware called `NetworkServiceProvider` which the
      `ChainSync` can use to communicate with `NetworkService`. `ChainSync` is
      given a `NetworkServiceHandle` which it uses to call `NetworkServiceProvider`
      which then dispatches the calls to `NetworkService` on behalf of `ChainSync`.
      
      This change will allow `ChainSync` to disconnect and report peers and
      in the future it'll be possible to send requests and notifications
      through the `NetworkServiceProvider`.
      
      `NetworkServiceProvider` is needed only until the `ChainSync` object
      has been removed from `Protocol`. After that, a normal `NetworkService`
      handle can be passed onto `ChainSync` and these changes can be
      deprecated.
      
      Co-authored-by: parity-processbot <>
      a877b0cc
  5. Oct 21, 2022
    • Shawn Tabrizi's avatar
      use headers on templates (#12546) · 932e1a33
      Shawn Tabrizi authored
      932e1a33
    • Michal Kucharczyk's avatar
      BlockId removal: refactor: Backend::begin_state_operation (#12541) · c0e8abe1
      Michal Kucharczyk authored
      It changes the arguments of `Backend::begin_state_operation`
      from: block: `BlockId<Block>` to: hash: `&Block::Hash`
      
      This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
      c0e8abe1
    • Nazar Mokrynskyi's avatar
      Actually fix major sync detection (#12114) · bf57a2e9
      Nazar Mokrynskyi authored
      * Actually fix major sync detection
      
      * Introduce `SyncState::Importing` state
      
      * Add target to SyncState enum variants and add `is_major_syncing` method on it
      
      * Remove unnecessary duplicated `best_seen_block` from `SyncState` struct
      
      * Revert "Remove unnecessary duplicated `best_seen_block` from `SyncState` struct"
      
      This reverts commit bb8abd458c939881c049f69d59f3acba47c97c5c.
      
      * Add missing `websocket` feature to `libp2p`
      
      Co-authored-by: parity-processbot <>
      bf57a2e9
    • Aaro Altonen's avatar
      Refactor service tests in `sc-network` (#12517) · 7f8aab84
      Aaro Altonen authored
      
      
      * Refactor service tests in `sc-network`
      
      Create a separate directory for the tests and move common network
      instantion related code to `mod.rs` from where it can be used by both
      service and chainsync tests.
      
      Use the builder pattern when creating the `TestNetwork` object to reduce
      code duplication between the test files.
      
      * Update client/network/src/service/tests/mod.rs
      
      Co-authored-by: default avatarDmitrii Markin <[email protected]>
      
      Co-authored-by: default avatarDmitrii Markin <[email protected]>
      Co-authored-by: parity-processbot <>
      7f8aab84
  6. Oct 20, 2022
  7. Oct 19, 2022
  8. Oct 18, 2022
  9. Oct 17, 2022
    • Ankan's avatar
      Execute try-state at end of each test to ensure pallet data integrity (#12453) · ca15fe7e
      Ankan authored
      * execute try-state at end of tests
      
      * run post condition only with try runtime
      
      * Revert "run post condition only with try runtime"
      
      This reverts commit 7db0ecf7eaa2ee5afa5a995487b73d023ba3bcd9.
      
      * voterlist contains validators as well
      
      * fmt
      
      * simplify
      
      * fmt
      
      Co-authored-by: parity-processbot <>
      ca15fe7e
    • Dmitry Markin's avatar
      Upgrade libp2p to 0.49.0 (#12256) · bb175f03
      Dmitry Markin authored
      
      
      * cargo upgrade libp2p
      
      * Get rid of `NetworkBehaviourEventProcess` in handling of `CustomMessageOutcome`
      
      * Get rid of `NetworkBehaviourEventProcess` in handling of `request_responses::Event`
      
      * Get rid of `NetworkBehaviourEventProcess` in handling of `peer_info::PeerInfoEvent`
      
      * Get rid of `NetworkBehaviourEventProcess` in handling of `DiscoveryOut`
      
      * Get rid of `poll()` method in `Bahaviour`
      
      * minor: comments
      
      * Upgrade libp2p to 0.49.0 (unreleased)
      
      * Support multiple Kad protocol names
      
      * Make borrow checker happy
      
      * minor: wording
      
      * Make substrate build with libp2p-0.49.0
      
      * rustfmt
      
      * Get rid of MdnsWrapper
      
      * Resolve deprecation warnings
      
      * Fix documentation
      
      * Apply suggestions from code review: fix typos
      
      Co-authored-by: default avatarAaro Altonen <[email protected]>
      
      * Apply suggestion: simplify kad protocol name matching
      
      Co-authored-by: default avatarAaro Altonen <[email protected]>
      bb175f03
    • omahs's avatar
      Fix: typo (#12505) · 882023f5
      omahs authored
      Fix: typo
      882023f5
    • Adrian Catangiu's avatar
      pallet-mmr: fix offchain db for sync from zero (#12498) · 4ae0d9a8
      Adrian Catangiu authored
      
      
      * pallet-mmr: cosmetic improvements
      
      * pallet-mmr: fix offchain storage for initial sync
      
      * address review comments
      
      * pallet-mmr: change offchain fork-resistant key to `(prefix, pos, parent_hash)`
      
      Do this so that both canon and fork-resitant keys have the same
      `(prefix, pos).encode()` prefix. Might be useful in the future if we'd
      be able to to "get" offchain db entries using key prefixes as well.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      Signed-off-by: default avataracatangiu <[email protected]>
      4ae0d9a8
    • Bastian Köcher's avatar
      sp-api: Remove invalid unsafe trait bounds (#12502) · 37538f04
      Bastian Köcher authored
      The runtime api implementation contained invalid unsafe trait bounds. `Sync` was never correct there
      and `Send` should have not been "force implemented".
      37538f04
    • Aaro Altonen's avatar
      Introduce `ChainSyncInterface` (#12489) · ce4cad8b
      Aaro Altonen authored
      * Introduce `ChainSyncInterface`
      
      `ChainSyncInterface` provides an asynchronous interface for other
      subsystems to submit calls to `ChainSync`. This allows `NetworkService`
      to delegate calls to `ChainSync` while still providing the same API
      for other subsystems (for now). This makes it possible to move the
      syncing code in piecemeal fashion out of `protocol.rs` as the calls
      are just forwarded to `ChainSync`.
      
      * Apply review comments
      
      * Fix tests
      ce4cad8b
    • Kevin Wang's avatar
      Export fn code_hash (#12479) · 68e25132
      Kevin Wang authored
      Co-authored-by: parity-processbot <>
      68e25132
  10. Oct 14, 2022