1. Dec 04, 2023
  2. Dec 02, 2023
  3. Dec 01, 2023
  4. Nov 30, 2023
  5. Nov 29, 2023
    • PG Herveou's avatar
      Contracts: use compiled rust tests (#2347) · 2135fa87
      PG Herveou authored
      see #2189
      
      This PR does the following:
      - Bring the user api functions into a new pallet-contracts-uapi (They
      are currently defined in ink!
      [here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs
      
      )
      - Add older api versions and unstable to the user api trait.
      - Remove pallet-contracts-primitives and bring the types it defined in
      uapi / pallet-contracts
      - Add the infrastructure to build fixtures from Rust files and test it
      works by replacing `dummy.wat` and `call.wat`
      - Move all the doc from wasm/runtime.rs to pallet-contracts-uapi.
      
      This will be done in a follow up:
      - convert the rest of the test from .wat to rust
      - bring risc-v uapi up to date with wasm
      - finalize the uapi host fns, making sure everything is codegen from the
      source host fns in pallet-contracts
      
      ---------
      
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      2135fa87
    • Joshy Orndorff's avatar
      Parachain Template: Prune `AuxStore` bound and corresponding crate dependency (#2303) · f69069bd
      Joshy Orndorff authored
      
      
      This small PR removes an unnecessary trait bound to the `AuxStore` trait
      from the Parachain template's `rpc.rs` file.
      
      With that bound removed, the entire dependency on `sc-client-api` can
      also be removed.
      
      ---------
      
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      f69069bd
    • Michal Kucharczyk's avatar
      state-db: log_target usage fixed (#2547) · c68ce6e1
      Michal Kucharczyk authored
      Use `LOG_TARGET/LOG_TARGET_PIN` in logs.
      c68ce6e1
    • Alexandru Vasile's avatar
      chainHead: Backport error codes from spec (#2539) · ecdf3439
      Alexandru Vasile authored
      This PR backports the error codes from the spec.
      
      This relies on two specs for defining the error codes:
      - Our rpc-spec-v2 https://github.com/paritytech/json-rpc-interface-spec.
      - JSON-RPC spec https://www.jsonrpc.org/specification#error_object.
      
      To better describe the error codes, they are divided into two separate
      modules `rpc_spec_v2` and `json_rpc_spec` respectively.
      
      The `InvalidSubscriptionID` and `FetchBlockHeader` are merged into the
      JSON-RPC spec `INTERNAL_ERROR`.
      While the other error codes are adjusted from spec.
      
      Errors that are currently in use:
      - -32801 block hash not reported by chainHead_follow or block hash has
      been unpinned
      - -32802 chainHead_follow started with withRuntime == false
      - -32803 chainHead_follow did not generate an
      operationWaitingForContinue event
      
      The following are errors defined in the [JSON-RPC
      spec](https://www.jsonrpc.org/specification#error_object):
      - -32602 The provided parameter isn't one of the expected values, has
      different format or is missing
      - -32603 Internal server error
      
      Note: Error `-32801` must be introduced and generated by the outstanding
      https://github.com/paritytech/polkadot-sdk/issues/1505
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/2530
      
      
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      ecdf3439
    • Vladimir Istyufeev's avatar
    • Bastian Köcher's avatar
      sp-api: Sprinkle some `automatically_derived` attributes · 08f29af6
      Bastian Köcher authored
      This attribute is informing tooling that the code is automatically
      derived and thus, should not enable any linting.
      08f29af6
    • Will | Paradox | ParaNodes.io's avatar
      Adding LuckyFriday's Bootnodes per IBP Application (#2538) · 2858cbc2
      Will | Paradox | ParaNodes.io authored
      Good day,
      
      This PR requests the inclusion of two bootnode entries for Polkadot,
      Kusama and Westend as part of LuckyFriday's IBP application. The nodes
      are hosted on self-owned hardware in a co-located facility. We've
      undertaken connectivity tests ourselves and also from members of the
      IBP.
      
      The test commands used are as follows:
      
      ```
      polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks
      
      polkadot --chain westend --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-westend.luckyfriday.io/tcp/30333/p2p/12D3KooWDg1YEytdwFFNWroFj6gio4YFsMB3miSbHKgdpJteUMB9" --no-hardware-benchmarks
      
      polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30334/wss/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks
      
      polkadot --chain kusama --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-kusama.luckyfriday.io/tcp/30333/p2p/12D3KooW9vu1GWHBuxyhm7rZgD3fhGZpNajPXFexadvhujWMgwfT" --no-hardware-benchmarks
      
      polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30334/wss/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks
      
      polkadot --chain polkadot --base-path /tmp/node --name "Boot" --reserved-only --reserved-nodes "/dns/ibp-boot-polkadot.luckyfriday.io/tcp/30333/p2p/12D3KooWEjk6QXrZJ26fLpaajisJGHiz6WiQsR8k7mkM9GmWKnRZ" --no-hardware-benchmarks
      ```
      
      All tests yielded syncing with 1 peer, a positive result. We have also
      backed up our node-key in the event that restoration is required.
      
      I hope that the aforementioned meets the requirement for inclusion and
      look forward to a speedy turnaround.
      
      Kind Regards,
      Will | Paradox
      2858cbc2
    • Bastian Köcher's avatar
      ParachainHost: No need to be generic over the block or hash type (#2537) · d3d301fa
      Bastian Köcher authored
      The `BlockNumber` and `Hash` are fixed types any way.
      d3d301fa
    • dependabot[bot]'s avatar
      Bump fs4 from 0.6.6 to 0.7.0 (#1844) · 8f03570a
      dependabot[bot] authored
      8f03570a
    • Tom Mi's avatar
      add Rotko common good parachain nodes (#2533) · 19f665f2
      Tom Mi authored
      rotko networks parachain bootnodes 
      ```
      # array of commands for testing
      parachains=(
        "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/33514/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/34514/ws/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-polkadot --reserved-only --reserved-nodes /dns/mint14.rotko.net/tcp/35514/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/33524/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/34524/ws/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-kusama --reserved-only --reserved-nodes /dns/mine14.rotko.net/tcp/35524/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/33534/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/34534/ws/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
        "./polkadot-parachain --chain asset-hub-westend --reserved-only --reserved-nodes /dns/wmint14.rotko.net/tcp/35534/wss/p2p/12D3KooWE4UDXqgtTcMCyUQ8S4uvaT8VMzzTBA6NWmKuYwTacWuN --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/33543/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/34543/ws/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-polkadot --reserved-only --reserved-nodes /dns/pbr13.rotko.net/tcp/35543/wss/p2p/12D3KooWMxZY7tDc2Rh454VaJJ7RexKAXVS6xSBEvTnXSGCnuGDw --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/33553/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/34553/ws/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-kusama --reserved-only --reserved-nodes /dns/kbr13.rotko.net/tcp/35553/wss/p2p/12D3KooWAmBp54mUEYtvsk2kxNEsDbAvdUMcaghxKXgUQxmPEQ66 --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/33563/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/34563/ws/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
        "./polkadot-parachain --chain bridge-hub-westend --reserved-only --reserved-nodes /dns/wbr13.rotko.net/tcp/35563/wss/p2p/12D3KooWJyeRHpxZZbfBCNEgeUFzmRC5AMSAs2tJhjJS1k5hULkD --no-hardware-benchmarks"
        "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/33573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
        "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/34573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
        "./polkadot-parachain --chain collectives-polkadot --reserved-only --reserved-nodes /dns/pch13.rotko.net/tcp/35573/wss/p2p/12D3KooWRXudHoazPZ9osMfdY38e8CBxQLD4RhrVeHpRSNNpcDtH --no-hardware-benchmarks"
        "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/33593/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
        "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/34593/ws/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
        "./polkadot-parachain --chain collectives-westend --reserved-only --reserved-nodes /dns/wch13.rotko.net/tcp/35593/wss/p2p/12D3KooWPG85zhuSRoyptjLkFD4iJFistjiBmc15JgQ96B4fdXYr --no-hardware-benchmarks"
      )
      ```
      19f665f2
    • yjh's avatar
      Improve `CodeExecutor` (#2358) · f2fe6a4c
      yjh authored
      
      
      Since `sp-state-machine` and `GenesisConfigBuilderRuntimeCaller` always
      set `use_native` to be false.
      We should remove this param and make `NativeElseWasmExecutor` behave
      like its name.
      It could make the above components use the correct execution strategy.
      
      Maybe polkadot do not need about `NativeElseWasmExecutor` anymore. But
      it is still needed by other chains and it's useful for debugging.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      f2fe6a4c
    • Dónal Murray's avatar
      Remove system parachains Polkadot and Kusama runtimes (#1737) · 63ac2471
      Dónal Murray authored
      Since the Polkadot and Kusama runtimes are no longer in the repo, the
      relevant systems parachains runtimes also need to be removed. More
      context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
      and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).
      
      Removes the following:
      - `asset-hub-kusama` and `asset-hub-polkadot`
      - `bridge-hub-kusama` and `bridge-hub-polkadot`
      - `collectives-polkadot`
      - `glutton-kusama`
      
      Partially solves #603 and adds to #1731.
      63ac2471
    • Michal Kucharczyk's avatar
      substrate-node: `NativeElseWasmExecutor` is no longer used (#2521) · 39d6c95c
      Michal Kucharczyk authored
      This PR removes `NativeElseWasmExecutor` usage from substrate node.
      Instead [`WasmExecutor<(sp_io::SubstrateHostFunctions,
      sp_statement_store::runtime_api::HostFunctions)>`](https://github.com/paritytech/polkadot-sdk/blob/49a41ab3bb3f630c20e5b24cec8d92382404631c/substrate/bin/node/executor/src/lib.rs#L26
      
      )
      is used.
      
      Related to #2358.
      
      ---------
      
      Co-authored-by: default avatarDavide Galassi <[email protected]>
      39d6c95c
    • Julian Eager's avatar
      Enable parallel key scraping (#1985) · 1d5d4a48
      Julian Eager authored
      
      
      closes #174
      
      ---------
      
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      1d5d4a48
    • Liam Aharon's avatar
      Remove `dmp_queue` pallet from Westend SP runtimes (#2516) · a9aa2d1f
      Liam Aharon authored
      Westend SP dmp queue pallet removal is complete.
      
      <img width="1499" alt="Screenshot 2023-11-28 at 08 31 27"
      src="https://github.com/paritytech/polkadot-sdk/assets/16665596/906246fb-3de9-4133-a827-431636a097ad">
      
      <img width="1499" alt="Screenshot 2023-11-28 at 08 32 08"
      src="https://github.com/paritytech/polkadot-sdk/assets/16665596/bde84891-b044-42c7-9a0b-59125cd24db1">
      
      <img width="1499" alt="Screenshot 2023-11-28 at 08 31 45"
      src="https://github.com/paritytech/polkadot-sdk/assets/16665596/38337484-0856-45c0-b9ff-8c785bc3c0e3">
      a9aa2d1f
  6. Nov 28, 2023
    • Sebastian Kunert's avatar
      Remove long deprecated `AllPalletsWithoutSystemReversed` (#2509) · 82017934
      Sebastian Kunert authored
      Remove deprecated `AllPalletsXY` types.
      
      They have been deprecated for nearly 1.5 years now, I think its fine to
      remove them.
      If anyone feels like we should first put a date on the deprecation as
      stated in the deprecation guideline, feel free to speak up. To me it
      looks like this has been forgotten and can be directly removed.
      82017934
    • Alexander Samusev's avatar
      [ci] Run gitspiegel trigger with merge conflicts (#2531) · aada961d
      Alexander Samusev authored
      Currently gitspiegel trigger won't run if there is merge conflict. This
      PR fixes it.
      
      close https://github.com/paritytech/gitspiegel/issues/183
      aada961d
    • Aaro Altonen's avatar
      Rework the event system of `sc-network` (#1370) · e71c484d
      Aaro Altonen authored
      This commit introduces a new concept called `NotificationService` which
      allows Polkadot protocols to communicate with the underlying
      notification protocol implementation directly, without routing events
      through `NetworkWorker`. This implies that each protocol has its own
      service which it uses to communicate with remote peers and that each
      `NotificationService` is unique with respect to the underlying
      notification protocol, meaning `NotificationService` for the transaction
      protocol can only be used to send and receive transaction-related
      notifications.
      
      The `NotificationService` concept introduces two additional benefits:
        * allow protocols to start using custom handshakes
        * allow protocols to accept/reject inbound peers
      
      Previously the validation of inbound connections was solely the
      responsibility of `ProtocolController`. This caused issues with light
      peers and `SyncingEngine` as `ProtocolController` would accept more
      peers than `SyncingEngine` could accept which caused peers to have
      differing views of their own states. `SyncingEngine` would reject excess
      peers but these rejections were not properly communicated to those peers
      causing them to assume that they were accepted.
      
      With `NotificationService`, the local handshake is not sent to remote
      peer if peer is rejected which allows it to detect that it was rejected.
      
      This commit also deprecates the use of `NetworkEventStream` for all
      notification-related events and going forward only DHT events are
      provided through `NetworkEventStream`. If protocols wish to follow each
      other's events, they must introduce additional abtractions, as is done
      for GRANDPA and transactions protocols by following the syncing protocol
      through `SyncEventStream`.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/512
      Fixes https://github.com/paritytech/polkadot-sdk/issues/514
      Fixes https://github.com/paritytech/polkadot-sdk/issues/515
      Fixes https://github.com/paritytech/polkadot-sdk/issues/554
      Fixes https://github.com/paritytech/polkadot-sdk/issues/556
      
      ---
      These changes are transferred from
      https://github.com/paritytech/substrate/pull/14197
      
       but there are no
      functional changes compared to that PR
      
      ---------
      
      Co-authored-by: default avatarDmitry Markin <[email protected]>
      Co-authored-by: default avatarAlexandru Vasile <[email protected]>
      e71c484d
    • Sebastian Kunert's avatar
      Remove pov-recovery race condition/Improve zombienet test (#2526) · ec3a61ed
      Sebastian Kunert authored
      The test was a bit flaky on CI. 
      
      There was a race condition in the pov-recovery system. If the timing is
      bad, it can happen that a block waits for a parent that is already
      queued for import. The check if a block has children waiting happens
      when we insert into the import queue. So we need to do an additional
      check once we receive the import notification for the parent block.
      
      Second issue is that `alice` was missing `--in-peers 0` and `--out-peers
      0`, so alice was sometimes still fetching block via sync and the
      assertion on the logs in zombienet would fail.
      
      There is another potential issue that I saw once locally. We have a
      failing pov-recovery queue that fails from time to time to check that
      the retry mechanism does what it should. We now make sure that the same
      candidate is never failed twice, so the tests become more predictable.
      ec3a61ed
    • André Silva's avatar
      polkadot: remove grandpa pause support (#2511) · b0b4451f
      André Silva authored
      This was never used and we probably don't need it anyway.
      b0b4451f