Skip to content
  1. Oct 28, 2022
    • Bastian Köcher's avatar
      Aura: Adds some compatibility mode to support old chains (#12492) · 33b61f0e
      Bastian Köcher authored
      * Aura: Adds some compatibility mode to support old chains
      
      In https://github.com/paritytech/substrate/pull/9132
      
       we changed the way how we get the authorities
      from the runtime. Before this mentioned pr we would call `initialize_block` before calling the
      authorities runtime function. The problem with this was that when you have a block X that would
      switch the authority set, it would already be signed by an authority of the new set. This was wrong,
      as a block should only be signed by the current authority set. As this change is a hard fork, this
      pr brings back the possibility for users that have a chain running with this old logic to upgrade.
      
      They will need to use:
      ```
      CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future }
      ```
      
      Using this compatibility mode will make the node behave like the old nodes, aka calling
      `initialize_block` before doing the actual runtime call to `authorities`. Then when the given
      `until` block is being build/imported the node switches to the new behaviour of not calling
      `initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a
      point where all nodes in the network have upgraded.
      
      * Fixes
      
      * Make docs ready
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/aura/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * FMT
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      33b61f0e
    • Mrisho Lukamba's avatar
      replaced println with log Closes #12338 (#12348) · ca779b36
      Mrisho Lukamba authored
      
      
      * replaced println with log Closes #12338
      
      * fixed println
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update utils/frame/benchmarking-cli/src/pallet/command.rs
      
      * Apply suggestions from code review
      
      * ".git/.scripts/fmt.sh" 1
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: command-bot <>
      ca779b36
  2. Oct 27, 2022
  3. Oct 26, 2022
  4. Oct 25, 2022
  5. Oct 24, 2022
  6. 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
  7. 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
  8. Oct 20, 2022
  9. Oct 19, 2022
  10. Oct 18, 2022
  11. 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