1. Mar 05, 2024
  2. Mar 04, 2024
  3. Mar 03, 2024
  4. Mar 02, 2024
    • gupnik's avatar
      Remove `as frame_system::DefaultConfig` from the required syntax in `derive_impl` (#3505) · cdc8d197
      gupnik authored
      Step in https://github.com/paritytech/polkadot-sdk/issues/171
      
      This PR removes the need to specify `as [disambiguation_path]` for cases
      where the trait definition resides within the same scope as default impl
      path.
      
      For example, in the following macro invocation
      ```rust
      #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
      impl frame_system::Config for Runtime {
         ...
      }
      ```
      the trait `DefaultConfig` lies within the `frame_system` scope and
      `TestDefaultConfig` impls the `DefaultConfig` trait. Using this
      information, we can compute the disambiguation path internally, thus
      removing the need of an explicit specification.
      
      In cases where the trait lies outside this scope, we would still need to
      specify it explicitly, but this should take care of most (if not all)
      uses of `derive_impl` within FRAME's context.
      cdc8d197
  5. Mar 01, 2024
    • Alin Dima's avatar
      provisioner: allow multiple cores assigned to the same para (#3233) · 62b78a16
      Alin Dima authored
      https://github.com/paritytech/polkadot-sdk/issues/3130
      
      builds on top of https://github.com/paritytech/polkadot-sdk/pull/3160
      
      Processes the availability cores and builds a record of how many
      candidates it should request from prospective-parachains and their
      predecessors.
      Tries to supply as many candidates as the runtime can back. Note that
      the runtime changes to back multiple candidates per para are not yet
      done, but this paves the way for it.
      
      The following backing/inclusion policy is assumed:
      1. the runtime will never back candidates of the same para which don't
      form a chain with the already backed candidates. Even if the others are
      still pending availability. We're optimistic that they won't time out
      and we don't want to back parachain forks (as the complexity would be
      huge).
      2. if a candidate is timed out of the core before being included, all of
      its successors occupying a core will be evicted.
      3. only the candidates which are made available and form a chain
      starting from the on-chain para head may be included/enacted and cleared
      from the cores. In other words, if para head is at A and the cores are
      occupied by B->C->D, and B and D are made available, only B will be
      included and its core cleared. C and D will remain on the cores awaiting
      for C to be made available or timed out. As point (2) above already
      says, if C is timed out, D will also be dropped.
      4. The runtime will deduplicate candidates which form a cycle. For
      example if the provisioner supplies candidates A->B->A, the runtime will
      only back A (as the state output will be the same)
      
      Note that if a candidate is timed out, we don't guarantee that in the
      next relay chain block the block author will be able to fill all of the
      timed out cores of the para. That increases complexity by a lot.
      Instead, the provisioner will supply N candidates where N is the number
      of candidates timed out, but doesn't include their successors which will
      be also deleted by the runtime. This'll be backfilled in the next relay
      chain block.
      
      Adjacent changes:
      - Also fixes: https://github.com/paritytech/polkadot-sdk/issues/3141
      - For non prospective-parachains, don't supply multiple candidates per
      para (we can't have elastic scaling without prospective parachains
      enabled). paras_inherent should already sanitise this input but it's
      more efficient this way.
      
      Note: all of these changes are backwards-compatible with the
      non-elastic-scaling scenario (one core per para).
      62b78a16
    • Andrei Eres's avatar
      subsystem-bench: add regression tests for availability read and write (#3311) · f0e589d7
      Andrei Eres authored
      ### What's been done
      - `subsystem-bench` has been split into two parts: a cli benchmark
      runner and a library.
      - The cli runner is quite simple. It just allows us to run `.yaml` based
      test sequences. Now it should only be used to run benchmarks during
      development.
      - The library is used in the cli runner and in regression tests. Some
      code is changed to make the library independent of the runner.
      - Added first regression tests for availability read and write that
      replicate existing test sequences.
      
      ### How we run regression tests
      - Regression tests are simply rust integration tests without the
      harnesses.
      - They should only be compiled under the `subsystem-benchmarks` feature
      to prevent them from running with other tests.
      - This doesn't work when running tests with `nextest` in CI, so
      additional filters have been added to the `nextest` runs.
      - Each benchmark run takes a different time in the beginning, so we
      "warm up" the tests until their CPU usage differs by only 1%.
      - After the warm-up, we run the benchmarks a few more times and compare
      the average with the exception using a precision.
      
      ### What is still wrong?
      - I haven't managed to set up approval voting tests. The spread of their
      results is too large and can't be narrowed down in a reasonable amount
      of time in the warm-up phase.
      - The tests start an unconfigurable prometheus endpoint inside, which
      causes errors because they use the same 9999 port. I disable it with a
      flag, but I think it's better to extract the endpoint launching outside
      the test, as we already do with `valgrind` and `pyroscope`. But we still
      use `prometheus` inside the tests.
      
      ### Future work
      * https://github.com/paritytech/polkadot-sdk/issues/3528
      * https://github.com/paritytech/polkadot-sdk/issues/3529
      * https://github.com/paritytech/polkadot-sdk/issues/3530
      * https://github.com/paritytech/polkadot-sdk/issues/3531
      
      
      
      ---------
      
      Co-authored-by: default avatarAlexander Samusev <[email protected]>
      f0e589d7
    • Xiliang Chen's avatar
      make SelfParaId a metadata constant (#3517) · 6f81a4a0
      Xiliang Chen authored
      expose para id via metadata
      
      #2116 is blocked by this
      6f81a4a0
    • Dmitry Markin's avatar
    • Egor_P's avatar
      [Backport] Node version and spec_version bumps and ordering of the prdoc files from 1.8.0 (#3508) · 59b26614
      Egor_P authored
      This PR backports Node version and `spec_version` bumps to `1.8.0` from
      the latest release and orders prdoc files related to it.
      59b26614
    • Francisco Aguirre's avatar
      Add `claim_assets` extrinsic to `pallet-xcm` (#3403) · 65088668
      Francisco Aguirre authored
      If an XCM execution fails or ends with leftover assets, these will be
      trapped.
      In order to claim them, a custom XCM has to be executed, with the
      `ClaimAsset` instruction.
      However, arbitrary XCM execution is not allowed everywhere yet and XCM
      itself is still not easy enough to use for users out there with trapped
      assets.
      This new extrinsic in `pallet-xcm` will allow these users to easily
      claim their assets, without concerning themselves with writing arbitrary
      XCMs.
      
      Part of fixing https://github.com/paritytech/polkadot-sdk/issues/3495
      
      
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAdrian Catangiu <[email protected]>
      65088668
  6. Feb 29, 2024
  7. Feb 28, 2024
  8. Feb 27, 2024
    • Petr Mensik's avatar
      Add Polkadotters bootnoders per IBP application (#3423) · 0cc9b900
      Petr Mensik authored
      Hey everyone,
      
      this PR will replace existing Polkadotters bootnodes for Polkadot,
      Kusama and Westend and add Paseo bootnode to the relay chain suite. At
      the same time, it will add new bootnodes for all the system parachains,
      including People on Westend. This PR is a part of our membership in the
      IBP, meaning that all the bootnodes are hosted on our hardware housed in
      the data center in Christchurch, New Zealand.
      All the bootnodes were tested with an empty chain spec file with the
      following command yielding 1 peer.
      
      The test commands used are as follows:
      ```
      ./polkadot --base-path /tmp/node --reserved-only --chain paseo --reserved-nodes "/dns/paseo.bootnodes.polkadotters.com/tcp/30540/wss/p2p/12D3KooWPbbFy4TefEGTRF5eTYhq8LEzc4VAHdNUVCbY4nAnhqPP"
      ./polkadot --base-path /tmp/node --reserved-only --chain westend --reserved-nodes "/dns/westend.bootnodes.polkadotters.com/tcp/30310/wss/p2p/12D3KooWHPHb64jXMtSRJDrYFATWeLnvChL8NtWVttY67DCH1eC5"
      ./polkadot --base-path /tmp/node --reserved-only --chain kusama --reserved-nodes "/dns/kusama.bootnodes.polkadotters.com/tcp/30313/wss/p2p/12D3KooWHB5rTeNkQdXNJ9ynvGz8Lpnmsctt7Tvp7mrYv6bcwbPG"
      ./polkadot --base-path /tmp/node --no-hardware-benchmarks --reserved-only --chain polkadot --reserved-nodes "/dns/polkadot.bootnodes.polkadotters.com/tcp/30316/wss/p2p/12D3KooWPAVUgBaBk6n8SztLrMk8ESByncbAfRKUdxY1nygb9zG3"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain asset-hub-kusama --reserved-nodes "/dns/asset-hub-kusama.bootnodes.polkadotters.com/tcp/30513/wss/p2p/12D3KooWDpk7wVH7RgjErEvbvAZ2kY5VeaAwRJP5ojmn1e8b8UbU"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain asset-hub-polkadot --reserved-nodes "/dns/asset-hub-polkadot.bootnodes.polkadotters.com/tcp/30510/wss/p2p/12D3KooWKbfY9a9oywxMJKiALmt7yhrdQkjXMtvxhhDDN23vG93R"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain asset-hub-westend --reserved-nodes "/dns/asset-hub-westend.bootnodes.polkadotters.com/tcp/30516/wss/p2p/12D3KooWNFYysCqmojxqjjaTfD2VkWBNngfyUKWjcR4WFixfHNTk"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain bridge-hub-kusama --reserved-nodes "/dns/bridge-hub-kusama.bootnodes.polkadotters.com/tcp/30522/wss/p2p/12D3KooWH3pucezRRS5esoYyzZsUkKWcPSByQxEvmM819QL1HPLV"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain bridge-hub-kusama --reserved-nodes "/dns/bridge-hub-kusama.bootnodes.polkadotters.com/tcp/30522/wss/p2p/12D3KooWH3pucezRRS5esoYyzZsUkKWcPSByQxEvmM819QL1HPLV"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain bridge-hub-westend --reserved-nodes "/dns/bridge-hub-westend.bootnodes.polkadotters.com/tcp/30525/wss/p2p/12D3KooWPkwgJofp4GeeRwNgXqkp2aFwdLkCWv3qodpBJLwK43Jj"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain collectives-polkadot --reserved-nodes "/dns/collectives-polkadot.bootnodes.polkadotters.com/tcp/30528/wss/p2p/12D3KooWNohUjvJtGKUa8Vhy8C1ZBB5N8JATB6e7rdLVCioeb3ff"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain collectives-westend --reserved-nodes "/dns/collectives-westend.bootnodes.polkadotters.com/tcp/30531/wss/p2p/12D3KooWAFkXNSBfyPduZVgfS7pj5NuVpbU8Ee5gHeF8wvos7Yqn"
      ./polkadot-parachain --base-path /tmp/node --reserved-only --chain people-westend --reserved-nodes "/dns/identity-westend.bootnodes.polkadotters.com/tcp/30534/wss/p2p/12D3KooWKr9San6KTM7REJ95cBaDoiciGcWnW8TTftEJgxGF5Ehb"
      ```
      
      Best regards,
      
      Petr, Polkadotters
      0cc9b900
    • Kian Paimani's avatar
      Add documentation around FRAME Origin (#3362) · 29369a4e
      Kian Paimani authored
      Does the following: 
      
      - Add a reference doc page named `frame_runtime_types`, which explains
      what types like `RuntimeOrigin`, `RuntimeCall` etc are.
      - On top of it, it adds a reference doc page called `frame_origin` which
      explains a few important patterns that we use around origins
      - And finally brushes up `#[frame::origin]` docs. 
      - Updates the theme, sidebar and favicon to look like: 
      
      <img width="1728" alt="Screenshot 2024-02-20 at 12 16 00"
      src="https://github.com/paritytech/polkadot-sdk/assets/5588131/6d60a16b-2081-411b-8869-43b91920cca9">
      
      
      All of this was inspired by
      https://substrate.stackexchange.com/questions/10992/how-do-you-find-the-public-key-for-the-medium-spender-track-origin/10993
      
      closes https://github.com/paritytech/polkadot-sdk-docs/issues/45
      closes https://github.com/paritytech/polkadot-sdk-docs/issues/43
      contributes / overlaps with
      https://github.com/paritytech/polkadot-sdk/pull/2638 cc @liamaharon
      deprecation companion:
      https://github.com/substrate-developer-hub/substrate-docs/pull/2131
      pba-content companion:
      https://github.com/Polkadot-Blockchain-Academy/pba-content/pull/977
      
      
      
      ---------
      
      Co-authored-by: default avatarRadha <[email protected]>
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      Co-authored-by: default avatarGonçalo Pestana <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      29369a4e
    • Serban Iorga's avatar
    • Clara van Staden's avatar
      Snowbridge benchmark tests fix (#3424) · 94c54d50
      Clara van Staden authored
      When running `cargo test -p bridge-hub-rococo-runtime --features
      runtime-benchmarks`, two of the Snowbridge benchmark tests fails. The
      reason is that when the runtime-benchmarks feature is enabled, the
      `NoopMessageProcessor` message processor is used. The Snowbridge tests
      rely on the outbound messages to be processed using the message queue,
      so that we can check the expected nonce and block digest logs.
      
      This PR changes the conditional compilation to only use
      `NoopMessageProcessor` when compiling the executable to run benchmarks
      against, not when running tests.
      
      ---------
      
      Co-authored-by: claravanstaden <Cats 4 life!>
      94c54d50
    • Javier Viola's avatar
      fix(zombienet): increase timeout in download artifacts (#3376) · f5de090a
      Javier Viola authored
      Fix timeouts downloading the artifacts (e.g
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5246040
      
      )
      Thx!
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      f5de090a
  9. Feb 26, 2024