Skip to content
Snippets Groups Projects
  1. Nov 13, 2024
    • Kazunobu Ndong's avatar
      Get rid of `libp2p` dependency in `sc-authority-discovery` (#5842) · a84f2598
      Kazunobu Ndong authored
      
      ## Issue
      #4859 
      ## Description
      This PR removes `libp2p` types in authority-discovery, and replace them
      with network backend agnostic types from `sc-network-types`.
       The `sc-network` interface is therefore updated accordingly.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
      Co-authored-by: default avatarAlexandru Vasile <60601340+lexnv@users.noreply.github.com>
      a84f2598
    • Bastian Köcher's avatar
      frame-benchmarking: Use correct components for pallet instances (#6435) · ac2546b5
      Bastian Köcher authored
      
      When using multiple instances of the same pallet, each instance was
      executed with the components of all instances. While actually each
      instance should only be executed with the components generated for the
      particular instance. The problem here was that in the runtime only the
      pallet-name was used to determine if a certain pallet should be
      benchmarked. When using instances, the pallet name is the same for both
      of these instances. The solution is to also take the instance name into
      account.
      
      The fix requires to change the `Benchmark` runtime api to also take the
      `instance`. The node side is written in a backwards compatible way to
      also support runtimes which do not yet support the `instance` parameter.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarclangenb <37865735+clangenb@users.noreply.github.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      ac2546b5
    • Giuseppe Re's avatar
      Refactor pallet `society` (#6367) · e87bffce
      Giuseppe Re authored
      
      - [x] Removing `without_storage_info` and adding bounds on the stored
      types for pallet `society` - issue
      https://github.com/paritytech/polkadot-sdk/issues/6289
      - [x] Migrating to benchmarking V2 -
      https://github.com/paritytech/polkadot-sdk/issues/6202
      
      ---------
      
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
      Co-authored-by: default avatarMuharem <ismailov.m.h@gmail.com>
      e87bffce
    • Michał Gil's avatar
      remove pallet::getter from pallet-staking (#6184) · 95d98e6d
      Michał Gil authored
      
      # Description
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/3326
      Removes all pallet::getter occurrences from pallet-staking and replaces
      them with explicit implementations.
      Adds tests to verify that retrieval of affected entities works as
      expected so via storage::getter.
      
      ## Review Notes
      
      1. Traits added to the `derive` attribute are used in tests (either
      directly or indirectly).
      2. The getters had to be placed in a separate impl block since the other
      one is annotated with `#[pallet::call]` and that requires
      `#[pallet::call_index(0)]` annotation on each function in that block. So
      I thought it's better to separate them.
      
      ---------
      
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
      95d98e6d
    • thiolliere's avatar
      [Tx ext stage 2: 1/4] Add `TransactionSource` as argument in... · 8e3d9296
      thiolliere authored
      [Tx ext stage 2: 1/4] Add `TransactionSource` as argument in `TransactionExtension::validate` (#6323)
      
      ## Meta 
      
      This PR is part of 4 PR:
      * https://github.com/paritytech/polkadot-sdk/pull/6323
      * https://github.com/paritytech/polkadot-sdk/pull/6324
      * https://github.com/paritytech/polkadot-sdk/pull/6325
      * https://github.com/paritytech/polkadot-sdk/pull/6326
      
      ## Description
      
      One goal of transaction extension is to get rid or unsigned
      transactions.
      But unsigned transaction validation has access to the
      `TransactionSource`.
      
      The source is used for unsigned transactions that the node trust and
      don't want to pay upfront.
      Instead of using transaction source we could do: the transaction is
      valid if it is signed by the block author, conceptually it should work,
      but it doesn't look so easy.
      
      This PR add `TransactionSource` to the validate function for transaction
      extensions
      8e3d9296
    • Andrei Eres's avatar
      Remove debug message about pruning active leaves (#6440) · 5aeaa664
      Andrei Eres authored
      
      # Description
      
      The debug message was added to identify a potential memory leak.
      However, recent observations show that pruning works as expected.
      Therefore, it is best to remove this line, as it generates quite
      annoying logs.
      
      
      ## Integration
      
      Doesn't affect downstream projects.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      5aeaa664
  2. Nov 12, 2024
    • PG Herveou's avatar
      [pallet-revive] eth-rpc fixes (#6453) · 0156ca8f
      PG Herveou authored
      
      - Breaking down the integration-test into multiple tests
      - Fix tx hash to use expected keccak-256
      - Add option to ethers.js example to connect to westend and use a
      private key
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      0156ca8f
    • Niklas Adolfsson's avatar
      rpc server: fix host filter for localhost on ipv6 (#6454) · 0a0af0ec
      Niklas Adolfsson authored
      
      This PR fixes an issue that I discovered using connecting to the RPC via
      localhost using cURL, where cURL tries to connect to via ipv6 before
      ipv4 when querying `localhost` which messed up the http host filter
      whereas it would connect to the address `[::1]::9944 host_header:
      localhost:9944` but the ipv6 interface only whitelisted `[::1]:9944`
      which this fixes.
      
      So let's whitelist all localhost interfaces to avoid such weird
      edge-cases.
      
      ### Behavior before this PR
      
      ```bash
      $ polkadot --chain westend-dev &
      $ curl -v \
           -H 'Content-Type: application/json' \
           -d '{"jsonrpc":"2.0","id":"id","method":"system_name"}' \
           http://localhost:9944
      * Host localhost:9944 was resolved.
      * IPv6: ::1
      * IPv4: 127.0.0.1
      *   Trying [::1]:9944...
      * Connected to localhost (::1) port 9944
      > POST / HTTP/1.1
      > Host: localhost:9944
      > User-Agent: curl/8.5.0
      > Accept: */*
      > Content-Type: application/json
      > Content-Length: 50
      >
      < HTTP/1.1 403 Forbidden
      < content-type: text/plain
      < content-length: 41
      < date: Tue, 12 Nov 2024 13:03:49 GMT
      <
      Provided Host header is not whitelisted.
      * Connection #0 to host localhost left intact
      ```
      
      ### Behavior after this PR
      ```bash
      $ polkadot --chain westend-dev &
      ➜ wasm-tests (update-artifacts-1731284930) ✗ curl -v \
           -H 'Content-Type: application/json' \
           -d '{"jsonrpc":"2.0","id":"id","method":"system_name"}' \
           http://localhost:9944
      * Host localhost:9944 was resolved.
      * IPv6: ::1
      * IPv4: 127.0.0.1
      *   Trying [::1]:9944...
      * Connected to localhost (::1) port 9944
      > POST / HTTP/1.1
      > Host: localhost:9944
      > User-Agent: curl/8.5.0
      > Accept: */*
      > Content-Type: application/json
      > Content-Length: 50
      >
      < HTTP/1.1 200 OK
      < content-type: application/json; charset=utf-8
      < vary: origin, access-control-request-method, access-control-request-headers
      < content-length: 54
      < date: Tue, 12 Nov 2024 13:02:57 GMT
      <
      * Connection #0 to host localhost left intact
      {"jsonrpc":"2.0","id":"id","result":"Parity Polkadot"}%
      ```
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: command-bot <>
      0a0af0ec
    • Francisco Aguirre's avatar
      XCMv5: add ExecuteWithOrigin instruction (#6304) · 4c059c02
      Francisco Aguirre authored
      
      Added `ExecuteWithOrigin` instruction according to the old XCM RFC 38:
      https://github.com/polkadot-fellows/xcm-format/pull/38.
      
      This instruction allows you to descend or clear while going back again.
      
      ## TODO
      - [x] Implementation
      - [x] Unit tests
      - [x] Integration tests
      - [x] Benchmarks
      - [x] PRDoc
      
      ## Future work
      
      Modify `WithComputedOrigin` barrier to allow, for example, fees to be
      paid with a descendant origin using this instruction.
      
      ---------
      
      Signed-off-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarAndrii <ndk@parity.io>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: default avatarJoseph Zhao <65984904+programskillforverification@users.noreply.github.com>
      Co-authored-by: default avatarNazar Mokrynskyi <nazar@mokrynskyi.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarShawn Tabrizi <shawntabrizi@gmail.com>
      Co-authored-by: command-bot <>
      4c059c02
    • Egor_P's avatar
      [Release|CI/CD] Fix audiences changelog template (#6444) · 34d2ff85
      Egor_P authored
      This PR addresses an issue mentioned
      [here](https://github.com/paritytech/polkadot-sdk/issues/6424#issuecomment-2467042441).
      The problem was that when the prdoc file has two audiences, but only one
      description like in
      [prdoc_5660](https://github.com/paritytech/polkadot-sdk/blob/master/prdoc/1.16.0/pr_5660.prdoc)
      it was ignored by the template.
      34d2ff85
    • Nazar Mokrynskyi's avatar
      Use type alias for transactions (#6431) · a875f180
      Nazar Mokrynskyi authored
      Very tiny change that helps with debugging of transactions propagation
      by referring to the same type alias not only at receiving side, but also
      on the sending size for symmetry
      a875f180
    • Jeeyong Um's avatar
      Introduce `ConstUint` to make dependent types in `DefaultConfig` more adaptable (#6425) · 872d9491
      Jeeyong Um authored
      # Description
      
      Resolves #6193
      
      This PR introduces `ConstUint` as a replacement for existing constant
      getter types like `ConstU8`, `ConstU16`, etc., providing a more flexible
      and unified approach.
      
      ## Integration
      
      This update is backward compatible, so developers can choose to adopt
      `ConstUint` in new implementations or continue using the existing types
      as needed.
      
      ## Review Notes
      
      `ConstUint` is a convenient alternative to `ConstU8`, `ConstU16`, and
      similar types, particularly useful for configuring `DefaultConfig` in
      pallets. It enables configuring the underlying integer for a specific
      type without the need to update all dependent types, offering enhanced
      flexibility in type management.
      
      # Checklist
      
      * [x] My PR includes a detailed description as outlined in the
      "Description" and its two subsections above.
      * [ ] My PR follows the [labeling requirements](
      
      https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process
      ) of this project (at minimum one label for `T` required)
      * External contributors: ask maintainers to put the right label on your
      PR.
      * [ ] I have made corresponding changes to the documentation (if
      applicable)
      * [ ] I have added tests that prove my fix is effective or that my
      feature works (if applicable)
      872d9491
    • Xavier Lau's avatar
      Migrate pallet-child-bounties benchmark to v2 (#6310) · b570baf3
      Xavier Lau authored
      
      Part of:
      
      - #6202.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      b570baf3
    • Doordashcon's avatar
      NoOp Impl Polling Trait (#5311) · 9f603b1a
      Doordashcon authored
      
      Adds NoOp implementation for the `Polling` trait and updates benchmarks
      in `pallet-ranked-collective`.
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      9f603b1a
    • PG Herveou's avatar
      [pallet-revive] adjust fee dry-run calculation (#6393) · 9f8656ba
      PG Herveou authored
      
      - Fix bare_eth_transact so that it estimate more precisely the
      transaction fee
      - Add some context to the build.rs to make it easier to troubleshoot
      errors
      - Add TransactionBuilder for the RPC tests.
      - Improve error message, proxy rpc error from the node and handle
      reverted error message
      - Add logs in ReceiptInfo
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      9f8656ba
  3. Nov 11, 2024
    • clangenb's avatar
      migrate pallet-nft-fractionalization to benchmarking v2 syntax (#6301) · aff3a079
      clangenb authored
      
      Migrates pallet-nft-fractionalization to benchmarking v2 syntax.
      
      Part of:
      * #6202
      
      ---------
      
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      aff3a079
    • davidk-pt's avatar
      Use relay chain block number in the broker pallet instead of block number (#5656) · 1b0cbe99
      davidk-pt authored
      
      Based on https://github.com/paritytech/polkadot-sdk/pull/3331
      Related to https://github.com/paritytech/polkadot-sdk/issues/3268
      
      Implements migrations with customizable block number to relay height
      number translation function.
      
      Adds block to relay height migration code for rococo and westend.
      
      ---------
      
      Co-authored-by: default avatarDavidK <davidk@parity.io>
      Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
      1b0cbe99
    • jpserrat's avatar
      add FeeManager to pallet xcm (#5363) · dd9514f7
      jpserrat authored
      
      Closes #2082
      
      change send xcm to use `xcm::executor::FeeManager` to determine if the
      sender should be charged.
      
      I had to change the `FeeManager` of the penpal config to ensure the same
      test behaviour as before. For the other tests, I'm using the
      `FeeManager` from the `xcm::executor::FeeManager` as this one is used to
      check if the fee can be waived on the charge fees method.
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      dd9514f7
    • Bastian Köcher's avatar
      pallet-membership: Do not verify the `MembershipChanged` in bechmarks (#6439) · a5de3b14
      Bastian Köcher authored
      
      There is no need to verify in the `pallet-membership` benchmark that the
      `MemembershipChanged` implementation works as the pallet thinks it
      should work. If you for example set it to `()`, `get_prime()` will
      always return `None`.
      
      TLDR: Remove the checks of `MembershipChanged` in the benchmarks to
      support any kind of implementation.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      a5de3b14
    • Michal Kucharczyk's avatar
      `fatxpool`: size limits implemented (#6262) · ace62f12
      Michal Kucharczyk authored
      This PR adds size-limits to the fork-aware transaction pool.
      
      **Review Notes**
      - Existing
      [`TrackedMap`](https://github.com/paritytech/polkadot-sdk/blob/58fd5ae4/substrate/client/transaction-pool/src/graph/tracked_map.rs#L33-L41)
      is used in internal mempool to track the size of extrinsics:
      
      https://github.com/paritytech/polkadot-sdk/blob/58fd5ae4/substrate/client/transaction-pool/src/graph/tracked_map.rs#L33-L41
      
      - In this PR, I also removed the logic that kept transactions in the
      `tx_mem_pool` if they were immediately dropped by the views. Initially,
      I implemented this as an improvement: if there was available space in
      the _mempool_ and all views dropped the transaction upon submission, the
      transaction would still be retained in the _mempool_.
      
      However, upon further consideration, I decided to remove this
      functionality to reduce unnecessary complexity. Now, when all views drop
      a transaction during ...
      ace62f12
    • Nazar Mokrynskyi's avatar
      Remove network starter that is no longer needed (#6400) · b601d57a
      Nazar Mokrynskyi authored
      
      # Description
      
      This seems to be an old artifact of the long closed
      https://github.com/paritytech/substrate/issues/6827 that I noticed when
      working on related code earlier.
      
      ## Integration
      
      `NetworkStarter` was removed, simply remove its usage:
      ```diff
      -let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
      +let (network, system_rpc_tx, tx_handler_controller, sync_service) =
          build_network(BuildNetworkParams {
      ...
      -start_network.start_network();
      ```
      
      ## Review Notes
      
      Changes are trivial, the only reason for this to not be accepted is if
      it is desired to not start network automatically for whatever reason, in
      which case the description of network starter needs to change.
      
      # Checklist
      
      * [x] My PR includes a detailed description as outlined in the
      "Description" and its two subsections above.
      * [ ] My PR follows the [labeling requirements](
      
      https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process
      ) of this project (at minimum one label for `T` required)
      * External contributors: ask maintainers to put the right label on your
      PR.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      b601d57a
    • Alin Dima's avatar
      fix prospective-parachains best backable chain reversion bug (#6417) · 05ad5475
      Alin Dima authored
      
      Kudos to @EclesioMeloJunior for noticing it 
      
      Also added a regression test for it. The existing unit test was
      exercising only the case where the full chain is reverted
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      05ad5475
  4. Nov 08, 2024
  5. Nov 07, 2024
  6. Nov 06, 2024
Loading