Skip to content
  1. Nov 08, 2023
    • Sebastian Kunert's avatar
      Add prospective-parachain subsystem to minimal-relay-node + QoL improvements (#2223) · 69494ea7
      Sebastian Kunert authored
      This PR contains some fixes and cleanups for parachain nodes:
      
      1. When using async backing, node no longer complains about being unable
      to reach the prospective-parachain subsystem.
      2. Parachain warp sync now informs users that the finalized para block
      has been retrieved.
      ```
      2023-11-08 13:24:42 [Parachain] 🎉 Received finalized parachain header #5747719 (0xa0aa…674b) from the relay chain.
      ```
      3. When a user supplied an invalid `--relay-chain-rpc-url`, we were
      crashing with a very verbose message. Removed the `expect` and improved
      the error message.
      ```
      2023-11-08 13:57:56 [Parachain] No valid RPC url found. Stopping RPC worker.
      2023-11-08 13:57:56 [Parachain] Essential task `relay-chain-rpc-worker` failed. Shutting down service.
      Error: Service(Application(WorkerCommunicationError("RPC worker channel closed. This can hint and connectivity issues with the supplied RPC endpoints. Message: oneshot canceled")))
      ```
      69494ea7
    • Michal Kucharczyk's avatar
      integrations-test: `build_genesis_storage` name fix (#2232) · eabf9fb8
      Michal Kucharczyk authored
      Some legacy tests were mistakenly merged in #1256 for `emulated-integration-tests-common` crate.
      This PR fixes the function name `build_genesis_storage` (no need to use `legacy` suffix, even though the genesis is built from `RuntimeGenesisConfig`).
      eabf9fb8
    • Michal Kucharczyk's avatar
      `sc-chain-spec`: add support for custom host functions (#2190) · b8acc57c
      Michal Kucharczyk authored
      
      
      Genesis building in runtime may involve calling some custom host
      functions. This PR allows to pass `HostFunctions` into the `ChainSpec`
      struct, which in turn are passed to `WasmExecutor`. The `ChainSpec` now
      has extended host functions type parameter:
      ```
      pub struct ChainSpec<G, E = NoExtension, EHF = ()>
      ```
      which will be combined with the default set
      (`sp_io::SubstrateHostFunctions`) in an instance of `WasmExecutor` used
      to build the genesis config.
      
      Fix for #2188
      
      ---------
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      b8acc57c
    • Ignacio Palacios's avatar
      [xcm-emulator] Chains generic over Network & Integration tests restructure (#2092) · ffa0e30e
      Ignacio Palacios authored
      Closes:
      - #1383 
      - Declared chains can be now be imported and reused in a different
      crate.
      - Chain declaration are now generic over a generic type `N` (the
      Network)
      - #1389
      - Solved #1383, chains and networks declarations can be restructure to
      avoid having to compile all chains when running integrations tests where
      are not needed.
      - Chains are now declared on its own crate (removed from
      `integration-tests-common`)
      - Networks are now declared on its own crate (removed from
      `integration-tests-common`)
          - Integration tests will import only the relevant Network crate
      - `integration-tests-common` is renamed to
      `emulated-integration-tests-common`
      
      All this is necessary to be able to implement what is described here:
      https://github.com/paritytech/roadmap/issues/56#issuecomment-1777010553
      
      ---------
      
      Co-authored-by: command-bot <>
      ffa0e30e
    • s0me0ne-unkn0wn's avatar
      50390950
    • Bastian Köcher's avatar
      validate-block: Fix `TrieCache` implementation (#2214) · 1bc08858
      Bastian Köcher authored
      The trie cache implementation was ignoring the `storage_root` when
      setting up the value cache. The problem with this is that the value
      cache works using `storage_keys` and these keys are not unique across
      different tries. A block can actually have different tries (main trie
      and multiple child tries). This pull request fixes the issue by not
      ignoring the `storage_root` and returning an unique `value_cache` per
      `storage_root`. It also adds a test for the seen bug and improves
      documentation that this doesn't happen again.
      1bc08858
    • Yuri Volkov's avatar
      Adding gitspiegel-trigger workflow (#2135) · 9673fbfa
      Yuri Volkov authored
      GitHub has a setting that requires manual click for executing GHA on the
      branch, for the first-time contributors:
      https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks.
      
      After this PR, gitspiegel will respect that setting. So, for PRs from
      first-time contributors, gitspiegel won't do mirroring until the button
      in PR is clicked. More info:
      https://github.com/paritytech/gitspiegel/issues/169
      9673fbfa
    • Oliver Tale-Yazdi's avatar
      Add `sudo::remove_key` (#2165) · 9adb46c8
      Oliver Tale-Yazdi authored
      
      
      Changes:
      - Adds a new call `remove_key` to the sudo pallet to permanently remove
      the sudo key.
      - Remove some clones and general maintenance
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: command-bot <>
      9adb46c8
    • benluelo's avatar
    • Adrian Catangiu's avatar
      [testnets][xcm-emulator] add bridge-hub-westend and hook it up to emulator (#2204) · 2e2a75ff
      Adrian Catangiu authored
      
      
      `bridge-hub-westend-runtime` was added to cumulus/parachains, but wasn't
      hooked up to xcm-emulator to run tests against it.
      
      This commit addresses that ^.
      
      Signed-off-by: default avatarAdrian Catangiu <[email protected]>
      2e2a75ff
    • Francisco Aguirre's avatar
      XCM builder pattern (#2107) · 0524aa51
      Francisco Aguirre authored
      
      
      Added a proc macro to be able to write XCMs using the builder pattern.
      This means we go from having to do this:
      
      ```rust
      let message: Xcm<()> = Xcm(vec![
        WithdrawAsset(assets),
        BuyExecution { fees: asset, weight_limit: Unlimited },
        DepositAsset { assets, beneficiary },
      ]);
      ```
      
      to this:
      
      ```rust
      let message: Xcm<()> = Xcm::builder()
        .withdraw_asset(assets)
        .buy_execution(asset, Unlimited),
        .deposit_asset(assets, beneficiary)
        .build();
      ```
      
      ---------
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: command-bot <>
      0524aa51
  2. Nov 07, 2023
    • Sebastian Kunert's avatar
      Disable incoming light-client connections for minimal relay node (#2202) · 8ebb5c33
      Sebastian Kunert authored
      When running with `--relay-chain-rpc-url` we received multiple reports
      of high traffic that disappears when `--in-peers-light 0` is set. Indeed
      it does not make much sense for light clients to connect to the minimal
      node since it is not running the block announce protocol and the
      request/response protocol for light clients.
      
      This is intended to alleviate the traffic issues for now.
      
      closes #1896
      probably related https://github.com/paritytech/cumulus/issues/2563
      8ebb5c33
    • Bill Laboon's avatar
      Fix "slashaed" typo (#2205) · 44c7a5eb
      Bill Laboon authored
      # Description
      
      This merely fixes a typo in the documentation, replacing the typo
      "slashaed" with "slashed". Since external entities use the comments for
      explanations of events, this will then be shown externally. I noticed
      this when reviewing [this
      event](https://polkadot.subscan.io/extrinsic/0xb6bc1e3abde0c2ed9c500c74cfc64cdb8179e5d9af97f4bf53242ce4cdd15a1d?event=18064194-6)
      on Subscan.
      
      This is not related to any other issues or PRs.
      44c7a5eb
    • vuittont60's avatar
      docs: fix typos (#2193) · 4caa3d8d
      vuittont60 authored
      4caa3d8d
    • Xiliang Chen's avatar
      mark pallet-asset-rate optional in polkadot-runtime-common (#2187) · 295a8483
      Xiliang Chen authored
      Part of #2186
      
      The only usage of pallet-asset-rate is guarded by `runtime-benchmarks`
      feature. I don't want ORML to be forced to include this pallet in deps
      for no good reason.
      295a8483
    • Alexandru Gheorghe's avatar
      zombienet_tests: Fix genesis error in 0006-parachains-max-tranche0.toml (#2191) · f5e9827f
      Alexandru Gheorghe authored
      
      
      There was a race in merging between
      https://github.com/paritytech/polkadot-sdk/pull/1256 and
      https://github.com/paritytech/polkadot-sdk/pull/1178, so this newly
      added tests wasn't updated with the new path for the configuration, so
      fix that.
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      f5e9827f
    • Liam Aharon's avatar
      Initialise on-chain `StorageVersion` for pallets added after genesis (#1297) · c4211b65
      Liam Aharon authored
      
      
      Original PR https://github.com/paritytech/substrate/pull/14641
      
      ---
      
      Closes https://github.com/paritytech/polkadot-sdk/issues/109
      
      ### Problem
      Quoting from the above issue:
      
      > When adding a pallet to chain after genesis we currently don't set the
      StorageVersion. So, when calling on_chain_storage_version it returns 0
      while the pallet is maybe already at storage version 9 when it was added
      to the chain. This could lead to issues when running migrations.
      
      ### Solution
      
      - Create a new trait `BeforeAllRuntimeMigrations` with a single method
      `fn before_all_runtime_migrations() -> Weight` trait with a noop default
      implementation
      - Modify `Executive` to call
      `BeforeAllRuntimeMigrations::before_all_runtime_migrations` for all
      pallets before running any other hooks
      - Implement `BeforeAllRuntimeMigrations` in the pallet proc macro to
      initialize the on-chain version to the current pallet version if the
      pallet has no storage set (indicating it has been recently added to the
      runtime and needs to have its version initialised).
      
      ### Other changes in this PR
      
      - Abstracted repeated boilerplate to access the `pallet_name` in the
      pallet expand proc macro.
      
      ### FAQ
      
      #### Why create a new hook instead of adding this logic to the pallet
      `pre_upgrade`?
      
      `Executive` currently runs `COnRuntimeUpgrade` (custom migrations)
      before `AllPalletsWithSystem` migrations. We need versions to be
      initialized before the `COnRuntimeUpgrade` migrations are run, because
      `COnRuntimeUpgrade` migrations may use the on-chain version for critical
      logic. e.g. `VersionedRuntimeUpgrade` uses it to decide whether or not
      to execute.
      
      We cannot reorder `COnRuntimeUpgrade` and `AllPalletsWithSystem` so
      `AllPalletsWithSystem` runs first, because `AllPalletsWithSystem` have
      some logic in their `post_upgrade` hooks to verify that the on-chain
      version and current pallet version match. A common use case of
      `COnRuntimeUpgrade` migrations is to perform a migration which will
      result in the versions matching, so if they were reordered these
      `post_upgrade` checks would fail.
      
      #### Why init the on-chain version for pallets without a current storage
      version?
      
      We must init the on-chain version for pallets even if they don't have a
      defined storage version so if there is a future version bump, the
      on-chain version is not automatically set to that new version without a
      proper migration.
      
      e.g. bad scenario:
      
      1. A pallet with no 'current version' is added to the runtime
      2. Later, the pallet is upgraded with the 'current version' getting set
      to 1 and a migration is added to Executive Migrations to migrate the
      storage from 0 to 1
          a. Runtime upgrade occurs
          b. `before_all` hook initializes the on-chain version to 1
      c. `on_runtime_upgrade` of the migration executes, and sees the on-chain
      version is already 1 therefore think storage is already migrated and
      does not execute the storage migration
      Now, on-chain version is 1 but storage is still at version 0.
      
      By always initializing the on-chain version when the pallet is added to
      the runtime we avoid that scenario.
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      c4211b65
  3. Nov 06, 2023
    • Piet's avatar
      TryDecodeEntireState check for storage types and pallets (#1805) · 32a97408
      Piet authored
      ### This PR is a port of this [PR for
      substrate](https://github.com/paritytech/substrate/pull/13013) by
      @Kianenigma
      
      
      
      Add infrastructure needed to have a Pallet::decode_entire_state(), which
      makes sure all "typed" storage items defined in the pallet are
      decode-able.
      
      This is not enforced in any way at the moment. Teams who wish to
      integrate/use this in the try-runtime feature flag should add
      frame_support::storage::migration::EnsureStateDecodes as the LAST ITEM
      of the runtime's custom migrations, and pass it to frame-executive. This
      will make it usable in try-runtime on-runtime-upgrade.
      
      This now catches cases like
      https://github.com/paritytech/polkadot-sdk/pull/1969:
      ```pre
      ERROR runtime::executive] failed to decode the value at key: Failed to decode value at key: 0x94eadf0156a8ad5156507773d0471e4ab8ebad86f546c7e0b135a4212aace339. Storage info StorageInfo { pallet_name: Ok("ParaScheduler"), storage_name: Ok("AvailabilityCores"), prefix: Err(Utf8Error { valid_up_to: 0, error_len: Some(1) }), max_values: Some(1), max_size: None }. Raw value: Some("0x0c010101010101")
      ```
      
      ... or:
      
      ![image](https://github.com/paritytech/polkadot-sdk/assets/10380170/73052d4f-4da5-4b21-a8dd-b17004e5965e)
      
      Closes #241
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      32a97408
    • Alin Dima's avatar
      minor: overseer availability-distribution message declaration update (#2179) · 15df7f54
      Alin Dima authored
      availability-distribution subsystem is not sending availability-recovery
      messages. Update the overseer declaration to reflect this
      15df7f54
    • Andrei Sandu's avatar
      approval-voting improvement: include all tranche0 assignments in one certificate (#1178) · 0570b6fa
      Andrei Sandu authored
      
      
      **_PR migrated from https://github.com/paritytech/polkadot/pull/6782_** 
      
      This PR will upgrade the network protocol to version 3 -> VStaging which
      will later be renamed to V3. This version introduces a new kind of
      assignment certificate that will be used for tranche0 assignments.
      Instead of issuing/importing one tranche0 assignment per candidate,
      there will be just one certificate per relay chain block per validator.
      However, we will not be sending out the new assignment certificates,
      yet. So everything should work exactly as before. Once the majority of
      the validators have been upgraded to the new protocol version we will
      enable the new certificates (starting at a specific relay chain block)
      with a new client update.
      
      There are still a few things that need to be done:
      
      - [x] Use bitfield instead of Vec<CandidateIndex>:
      https://github.com/paritytech/polkadot/pull/6802
        - [x] Fix existing approval-distribution and approval-voting tests
        - [x] Fix bitfield-distribution and statement-distribution tests
        - [x] Fix network bridge tests
        - [x] Implement todos in the code
        - [x] Add tests to cover new code
        - [x] Update metrics
        - [x] Remove the approval distribution aggression levels: TBD PR
        - [x] Parachains DB migration 
        - [x] Test network protocol upgrade on Versi
        - [x] Versi Load test
        - [x] Add Zombienet test
        - [x] Documentation updates
      - [x] Fix for sending DistributeAssignment for each candidate claimed by
      a v2 assignment (warning: Importing locally an already known assignment)
       - [x]  Fix AcceptedDuplicate
       - [x] Fix DB migration so that we can still keep old data.
       - [x] Final Versi burn in
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      Co-authored-by: default avatarAlexandru Gheorghe <[email protected]>
      0570b6fa
    • Richard Melkonian's avatar
      rename benchmark (#2173) · 4ac9c4a3
      Richard Melkonian authored
      A quick fix where a benchmark test was wrongly renamed in this PR
      https://github.com/paritytech/polkadot-sdk/pull/1868
      4ac9c4a3
    • Richard Melkonian's avatar
      Add force remove vesting (#1982) · 318e5969
      Richard Melkonian authored
      
      
      This PR exposes a `force_remove_vesting` through a ROOT call. 
      See linked
      [issue](https://github.com/paritytech/polkadot-sdk/issues/269)
      
      ---------
      
      Co-authored-by: default avatargeorgepisaltu <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDónal Murray <[email protected]>
      318e5969
    • Alexandru Gheorghe's avatar
      Add warning when peer_id is not available when building topology (#2140) · fb2dc6df
      Alexandru Gheorghe authored
      
      
      ... see https://github.com/paritytech/polkadot-sdk/issues/2138 for why
      is not good, until we fix it let's add a warning to understand if this
      is happening in the wild.
      
      ---------
      
      Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      fb2dc6df
    • Michal Kucharczyk's avatar
      `serde_json`: bumped to 1.0.108 (#2168) · 305aefc4
      Michal Kucharczyk authored
      This PR updates the version of `serde_json` to `1.0.108` throughout the
      codebase.
      305aefc4
    • Dmitry Markin's avatar
      Get rid of `NetworkService` in `ChainSync` (#2143) · 7b06e634
      Dmitry Markin authored
      Move peer banning from `ChainSync` to `SyncingEngine`.
      7b06e634
  4. Nov 05, 2023
    • Oliver Tale-Yazdi's avatar
      [CI] Update deps (#2159) · f6ee4781
      Oliver Tale-Yazdi authored
      
      
      Otherwise the return code is not correctly propagated (ref
      https://github.com/ggwpez/zepter/pull/48).
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      f6ee4781
    • Oliver Tale-Yazdi's avatar
      Fix update-ui-tests.sh (#2161) · 15beef20
      Oliver Tale-Yazdi authored
      
      
      Related https://github.com/paritytech/polkadot-sdk/issues/2013
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      15beef20
    • Michal Kucharczyk's avatar
      `chain-spec`: getting ready for native-runtime-free world (#1256) · 8ba7a6ab
      Michal Kucharczyk authored
      
      
      This PR prepares chains specs for _native-runtime-free_  world.
      
      This PR has following changes:
      - `substrate`:
        - adds support for:
      - JSON based `GenesisConfig` to `ChainSpec` allowing interaction with
      runtime `GenesisBuilder` API.
      - interacting with arbitrary runtime wasm blob to[
      `chain-spec-builder`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/bin/utils/chain-spec-builder/src/lib.rs#L46)
      command line util,
      - removes
      [`code`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/frame/system/src/lib.rs#L660)
      from `system_pallet`
        - adds `code` to the `ChainSpec`
      - deprecates
      [`ChainSpec::from_genesis`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/client/chain-spec/src/chain_spec.rs#L263),
      but also changes the signature of this method extending it with `code`
      argument.
      [`ChainSpec::builder()`](https://github.com/paritytech/substrate/blob/20bee680ed098be7239cf7a6b804cd4de267983e/client/chain-spec/src/chain_spec.rs#L507)
      should be used instead.
      - `polkadot`:
      - all references to `RuntimeGenesisConfig` in `node/service` are
      removed,
      - all
      `(kusama|polkadot|versi|rococo|wococo)_(staging|dev)_genesis_config`
      functions now return the JSON patch for default runtime `GenesisConfig`,
        - `ChainSpecBuilder` is used, `ChainSpec::from_genesis` is removed,
      
      - `cumulus`:
        - `ChainSpecBuilder` is used, `ChainSpec::from_genesis` is removed,
      - _JSON_ patch configuration used instead of `RuntimeGenesisConfig
      struct` in all chain specs.
        
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      Co-authored-by: default avatarKevin Krone <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      8ba7a6ab
    • s0me0ne-unkn0wn's avatar
    • Bulat Saifullin's avatar
      Update bootnode lists (#2150) · 0c39cf04
      Bulat Saifullin authored
      # Description
      
      Update the bootnode of kusama parachains before decommissioning the
      nodes. This will avoid connecting to non-existing bootnodes.
      0c39cf04
  5. Nov 04, 2023
    • Ankan's avatar
      Speed up nominator state checks in staking pallet (#2153) · f84b8971
      Ankan authored
      Should help https://github.com/paritytech/polkadot-sdk/issues/234.
      Related to https://github.com/paritytech/polkadot-sdk/issues/2020 and
      https://github.com/paritytech/polkadot-sdk/issues/2108.
      
      Refactors and improves running time for try runtime checks for staking
      pallet.
      
      Tested on westend on my M2 pro: running time drops from 90 seconds to 7
      seconds.
      f84b8971
    • Ankan's avatar
      Speed up try runtime checks for pallet-bags-list (#2151) · 8d4ae362
      Ankan authored
      closes https://github.com/paritytech/polkadot-sdk/issues/2020.
      
      This improves running time for pallet-bags-list try runtime checks on
      westend from ~90 minutes to 6 seconds on M2 pro.
      8d4ae362
    • Michal Kucharczyk's avatar
      cumulus test runtime: remove `GenesisExt` (#2147) · 1c0b4373
      Michal Kucharczyk authored
      
      
      This PR removes the `GenesisExt` wrapper over the `GenesisRuntimeConfig`
      in `cumulus-test-service`. Initialization of values that were performed
      by `GenesisExt::BuildStorage` was moved into `test_pallet` genesis.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      1c0b4373
  6. Nov 03, 2023
    • georgepisaltu's avatar
      Identity pallet improvements (#2048) · 21fbc00d
      georgepisaltu authored
      
      
      This PR is a follow up to #1661 
      
      - [x] rename the `simple` module to `legacy`
      - [x] fix benchmarks to disregard the number of additional fields
      - [x] change the storage deposits to charge per encoded byte of the
      identity information instance, removing the need for `fn
      additional(&self) -> usize` in `IdentityInformationProvider`
      - [x] ~add an extrinsic to rejig deposits to account for the change
      above~
      - [ ] ~ensure through proper configuration that the new byte-based
      deposit is always lower than whatever is reserved now~
      - [x] remove `IdentityFields` from the `set_fields` extrinsic signature,
      as per [this
      discussion](https://github.com/paritytech/polkadot-sdk/pull/1661#discussion_r1371703403)
      
      > ensure through proper configuration that the new byte-based deposit is
      always lower than whatever is reserved now
      
      Not sure this is needed anymore. If the new deposits are higher than
      what is currently on chain and users don't have enough funds to reserve
      what is needed, the extrinisc fails and they're basically grandfathered
      and frozen until they add more funds and/or make a change to their
      identity. This behavior seems fine to me. Original idea
      [here](https://github.com/paritytech/polkadot-sdk/pull/1661#issuecomment-1779606319).
      
      > add an extrinsic to rejig deposits to account for the change above
      
      This was initially implemented but now removed from this PR in favor of
      the implementation detailed
      [here](https://github.com/paritytech/polkadot-sdk/pull/2088).
      
      ---------
      
      Signed-off-by: default avatargeorgepisaltu <[email protected]>
      Co-authored-by: default avatarjoepetrowski <[email protected]>
      21fbc00d
    • Bastian Köcher's avatar
      `sc-block-builder`: Remove `BlockBuilderProvider` (#2099) · ca5f1056
      Bastian Köcher authored
      The `BlockBuilderProvider` was a trait that was defined in
      `sc-block-builder`. The trait was implemented for `Client`. This
      basically meant that you needed to import `sc-block-builder` any way to
      have access to the block builder. So, this trait was not providing any
      real value. This pull request is removing the said trait. Instead of the
      trait it introduces a builder for creating a `BlockBuilder`. The builder
      currently has the quite fabulous name `BlockBuilderBuilder` (I'm open to
      any better name 😅
      
      ). The rest of the pull request is about
      replacing the old trait with the new builder.
      
      # Downstream code changes
      
      If you used `new_block` or `new_block_at` before you now need to switch
      it over to the new `BlockBuilderBuilder` pattern:
      
      ```rust
      // `new` requires a type that implements `CallApiAt`. 
      let mut block_builder = BlockBuilderBuilder::new(client)
                      // Then you need to specify the hash of the parent block the block will be build on top of
      		.on_parent_block(at)
                      // The block builder also needs the block number of the parent block. 
                      // Here it is fetched from the given `client` using the `HeaderBackend`
                      // However, there also exists `with_parent_block_number` for directly passing the number
      		.fetch_parent_block_number(client)
      		.unwrap()
                      // Enable proof recording if required. This call is optional.
      		.enable_proof_recording()
                      // Pass the digests. This call is optional.
                      .with_inherent_digests(digests)
      		.build()
      		.expect("Creates new block builder");
      ```
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      Co-authored-by: command-bot <>
      ca5f1056
    • s0me0ne-unkn0wn's avatar
      cd2d5d25
    • juangirini's avatar
      Add deprecation checklist document for Substrate (#1583) · 8cfbee70
      juangirini authored
      fixes https://github.com/paritytech/polkadot-sdk/issues/182
      
      This PR adds a document with recommendations of how deprecations should
      be handled. Initiated within FRAME, this checklist could be extended to
      the rest of the repo.
      
      I want to quote here a comment from @Kianenigma
      
       that summarizes the
      spirit of this new document:
      > I would see it as a guideline of "what an extensive deprecation
      process looks like". As the author of a PR, you should match this
      against your "common sense" and see if it is needed or not. Someone else
      can nudge you to "hey, this is an important PR, you should go through
      the deprecation process".
      > 
      > For some trivial things, all the steps might be an overkill.
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      8cfbee70
    • Dmitry Markin's avatar
    • Dmitry Markin's avatar
      Do not request blocks below the common number when syncing (#2045) · 8dc41ba4
      Dmitry Markin authored
      This changes `BlockCollection` logic so we don't download block ranges
      from peers with which we have these ranges already in sync.
      
      Improves situation with
      https://github.com/paritytech/polkadot-sdk/issues/1915.
      8dc41ba4
    • Anthony Lazam's avatar
      Update Kusama Parachains Bootnode (#2148) · f6f4c5aa
      Anthony Lazam authored
      # Description
      
      Update the bootnode of kusama parachains before decommissioning the
      nodes. This will avoid connecting to non-existing bootnodes.
      f6f4c5aa