Skip to content
Snippets Groups Projects
  1. Nov 11, 2024
    • 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>
    • 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>
    • 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 submission, it is automatically rejected, with the
      `submit/submit_and_watch` call returning `ImmediatelyDropped`.
      
      
      Closes: #5476
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • 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>
    • 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>
  2. Nov 08, 2024
  3. Nov 07, 2024
    • Liu-Cheng Xu's avatar
      Expose more syncing types to enable custom syncing strategy (#6163) · 0e09ad44
      Liu-Cheng Xu authored
      This PR exposes additional syncing types to facilitate the development
      of a custom syncing strategy based on the existing Polkadot syncing
      strategy. Specifically, my goal is to isolate the state sync and chain
      sync components, allowing the state to be downloaded from the P2P
      network without running a full regular Substrate node. I also need to
      intercept the state responses during the state sync process.
      
      The newly exposed types are necessary to implement this custom syncing
      strategy.
    • Xavier Lau's avatar
      Migrate pallet-elections-phragmen benchmark to v2 and improve doc (#6314) · c4e94d35
      Xavier Lau authored
      
      Part of:
      
      - #6202.
      
      ---------
      
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Alin Dima's avatar
      make prospective-parachains debug logs less spammy (#6406) · 2680f20a
      Alin Dima authored
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6172
    • Andrei Eres's avatar
      Add networking benchmarks for libp2p (#6077) · 8795ae66
      Andrei Eres authored
      
      # Description
      
      Implemented benchmarks for Notifications and RequestResponse protocols
      with libp2p implementation. These benchmarks allow us to monitor
      regressions and implement fixes before they are observed in real chain.
      In the future, they can be used for targeted optimizations of litep2p
      compared to libp2p.
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/5220
      
      Next steps:
      - Add benchmarks for litep2p implementation
      - Optimize load to get better results
      - Add benchmarks to CI to catch regressions
      
      
      
      ## Integration
      
      Benchmarks don't affect downstream projects.
      
      ---------
      
      Co-authored-by: default avataralvicsam <alvicsam@gmail.com>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Alexandre R. Baldé's avatar
      Add missing events to identity pallet (#6261) · 65e79720
      Alexandre R. Baldé authored
      # Description
      
      E2E tests to Polkadot/Kusama's people chains (in
      https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/63)
      revealed that 2 of the identity pallet's extrinsics did not emit events
      in case of success:
      * `pallet_identity::rename_sub`, and
      * `pallet_identity::set_subs`
      
      This PR fixes that.
      
      ## Integration
      
      Other than 2 extrinsics emiting an event when previously they did not,
      no other behavior in pallets/extrinsics was modified, so no integration
      is needed.
      
      ## Review Notes
      
      N/A
    • Michal Kucharczyk's avatar
      gensis-config: patching default `RuntimeGenesisConfig` fixed (#6382) · 566706dd
      Michal Kucharczyk authored
      
      This PR changes the behavior of `json_patch::merge` function which no
      longer removes any keys from the base JSON object.
      
      fixes: #6306
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Egor_P's avatar
      [Release|CI/CD] Add node version to deb package version (#6399) · 1100c184
      Egor_P authored
      This PR has small addition to the db package version. As `cargodeb`
      takes the version from the `*.toml` file, this PR adds an extra flag to
      the `cargodeb` command so that the version of the deb package matches
      the `polkadot` node version.
    • Andrei Eres's avatar
      PVF: drop backing jobs if it is too late (#5616) · 6c8a347a
      Andrei Eres authored
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/5530
      
      This PR introduces the removal of backing jobs that have been back
      pressured for longer than `allowedAncestryLen`, as these candidates are
      no longer viable.
      
      It is reasonable to expect a result for a backing job execution within
      `allowedAncestryLen` blocks. Therefore, we set the job TTL as a relay
      block number and synchronize the validation host by sending activated
      leaves.
      
      ---------
      
      Co-authored-by: default avatarAndrei Sandu <54316454+sandreim@users.noreply.github.com>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
    • Alexandru Vasile's avatar
      net/discovery: Do not propagate external addr with different peerIDs (#6380) · bb8c7a3b
      Alexandru Vasile authored
      
      This PR ensures that external addresses with different PeerIDs are not
      propagated to the higher layer of the network code.
      
      While at it, this ensures that libp2p only adds the `/p2p/peerid` part
      to the discovered address if it does not contain it already.
      
      This is a followup from:
      - https://github.com/paritytech/polkadot-sdk/pull/6298
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
    • Ankan's avatar
      [pallet-staking] Add page info to `PayoutStarted` event (#5984) · 8c146a7c
      Ankan authored
      
      fixes https://github.com/paritytech/polkadot-sdk/issues/5966
      
      ---------
      
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
    • Nazar Mokrynskyi's avatar
      Syncing strategy refactoring (part 3) (#5737) · 12d90524
      Nazar Mokrynskyi authored
      # Description
      
      This is a continuation of
      https://github.com/paritytech/polkadot-sdk/pull/5666 that finally fixes
      https://github.com/paritytech/polkadot-sdk/issues/5333.
      
      This should allow developers to create custom syncing strategies or even
      the whole syncing engine if they so desire. It also moved syncing engine
      creation and addition of corresponding protocol outside
      `build_network_advanced` method, which is something Bastian expressed as
      desired in
      https://github.com/paritytech/polkadot-sdk/issues/5#issuecomment-1700816458
      
      Here I replaced strategy-specific types and methods in `SyncingStrategy`
      trait with generic ones. Specifically `SyncingAction` is now used by all
      strategies instead of strategy-specific types with conversions.
      `StrategyKey` was an enum with a fixed set of options and now replaced
      with an opaque type that strategies create privately and send to upper
      layers as an opaque type. Requests and responses are now handled in a
      generic way regardl...
    • Alexandru Vasile's avatar
      substrate/zombienet: Fix 0002-validators-warp-sync (#6379) · 3c7b9a0e
      Alexandru Vasile authored
      
      This PR fixes the `0002-validators-warp-sync` zombienet test by matching
      for a specific error case.
      
      The following PR introduced a new error for validators that don't have
      public addresses available for publishing in the DHT:
      - https://github.com/paritytech/polkadot-sdk/pull/6298
      The log line was moved from `eprintln!("Warning: ...` in sc-cli to the
      authority discovery where it is printed properly as an error.
      
      
      cc @paritytech/sdk-node
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
    • Alin Dima's avatar
      fix shared-core-idle-parachain flaky test (#6387) · ec77843c
      Alin Dima authored
      https://github.com/paritytech/polkadot-sdk/issues/6343
    • Xavier Lau's avatar
    • dependabot[bot]'s avatar
      Bump futures from 0.3.30 to 0.3.31 (#6252) · 27bf54b4
      dependabot[bot] authored
      
      Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.30 to
      0.3.31.
      <details>
      <summary>Release notes</summary>
      <p><em>Sourced from <a
      href="https://github.com/rust-lang/futures-rs/releases">futures's
      releases</a>.</em></p>
      <blockquote>
      <h2>0.3.31</h2>
      <ul>
      <li>Fix use after free of task in <code>FuturesUnordered</code> when
      dropped future panics (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li>
      <li>Fix soundness bug in <code>task::waker_ref</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>)
      This is a breaking change but allowed because it is soundness bug
      fix.</li>
      <li>Fix bugs in <code>AsyncBufRead::read_line</code> and
      <code>AsyncBufReadExt::lines</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
      <li>Fix parsing issue in
      <code>select!</code>/<code>select_biased!</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>)
      This is technically a breaking change as it will now reject a very odd
      undocumented syntax that was previously accidentally accepted.</li>
      <li>Work around issue due to upstream <code>Waker::will_wake</code>
      change (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
      <li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
      <li>Add <code>future::AlwaysReady</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li>
      <li>Relax trait bound on non-constructor methods of
      <code>io::{BufReader,BufWriter}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Changelog</summary>
      <p><em>Sourced from <a
      href="https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md">futures's
      changelog</a>.</em></p>
      <blockquote>
      <h1>0.3.31 - 2024-10-05</h1>
      <ul>
      <li>Fix use after free of task in <code>FuturesUnordered</code> when
      dropped future panics (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2886">#2886</a>)</li>
      <li>Fix soundness bug in <code>task::waker_ref</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2830">#2830</a>)
      This is a breaking change but allowed because it is soundness bug
      fix.</li>
      <li>Fix bugs in <code>AsyncBufRead::read_line</code> and
      <code>AsyncBufReadExt::lines</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
      <li>Fix parsing issue in
      <code>select!</code>/<code>select_biased!</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2832">#2832</a>)
      This is technically a breaking change as it will now reject a very odd
      undocumented syntax that was previously accidentally accepted.</li>
      <li>Work around issue due to upstream <code>Waker::will_wake</code>
      change (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
      <li>Add <code>stream::Iter::{get_ref,get_mut,into_inner}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
      <li>Add <code>future::AlwaysReady</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2825">#2825</a>)</li>
      <li>Relax trait bound on non-constructor methods of
      <code>io::{BufReader,BufWriter}</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2848">#2848</a>)</li>
      </ul>
      </blockquote>
      </details>
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/1e052816b09890925cfdfcbe8d390cdaae5e4c38"><code>1e05281</code></a>
      Release 0.3.31</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/8a8b085a8c1a7396173a104c67e0cf2f5b74fc74"><code>8a8b085</code></a>
      Fix clippy::uninit_vec warning</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/f3fb74df310d070d91df7995c942f223cba6720a"><code>f3fb74d</code></a>
      Document how <code>BoxFuture</code>s / <code>BoxStream</code>s are often
      made (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2887">#2887</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/f00e7afb467e5f9b3c81724cc3cac1f0687fff7c"><code>f00e7af</code></a>
      Fix use after free of task in FuturesUnordered when dropped future
      panics (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2">#2</a>...</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/33c46b3dc65e151e0e794636ad62872330733557"><code>33c46b3</code></a>
      ci: Work around sanitizer issue on latest Linux kernel</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/7bf5a72826c0daed633ec48e8ddaecd8a32f0d11"><code>7bf5a72</code></a>
      Fix issues with <code>AsyncBufRead::read_line</code> and
      <code>AsyncBufReadExt::lines</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2884">#2884</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/87afaf3973e8652228f7ccaadd04e7b0e456c63d"><code>87afaf3</code></a>
      Use <code>#[inline(always)]</code> on <code>clone_arc_raw</code> (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2865">#2865</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/549b90b1793a044bcade67b81a3d7eabd95f3971"><code>549b90b</code></a>
      Add accessors for the inner of stream::Iter (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2875">#2875</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/07b004ac7e0d72e09ff652f234d00e4f26a5f558"><code>07b004a</code></a>
      Add missing symbols (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2883">#2883</a>)</li>
      <li><a
      href="https://github.com/rust-lang/futures-rs/commit/86dc069fa278d4197de91eb6e038e0ec64857684"><code>86dc069</code></a>
      Various fixes too make the CI green (<a
      href="https://redirect.github.com/rust-lang/futures-rs/issues/2885">#2885</a>)</li>
      <li>Additional commits viewable in <a
      href="https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futures&package-manager=cargo&previous-version=0.3.30&new-version=0.3.31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
      
      Dependabot will resolve any conflicts with this PR as long as you don't
      alter it yourself. You can also trigger a rebase manually by commenting
      `@dependabot rebase`.
      
      [//]: # (dependabot-automerge-start)
      [//]: # (dependabot-automerge-end)
      
      ---
      
      <details>
      <summary>Dependabot commands and options</summary>
      <br />
      
      You can trigger Dependabot actions by commenting on this PR:
      - `@dependabot rebase` will rebase this PR
      - `@dependabot recreate` will recreate this PR, overwriting any edits
      that have been made to it
      - `@dependabot merge` will merge this PR after your CI passes on it
      - `@dependabot squash and merge` will squash and merge this PR after
      your CI passes on it
      - `@dependabot cancel merge` will cancel a previously requested merge
      and block automerging
      - `@dependabot reopen` will reopen this PR if it is closed
      - `@dependabot close` will close this PR and stop Dependabot recreating
      it. You can achieve the same result by closing it manually
      - `@dependabot show <dependency name> ignore conditions` will show all
      of the ignore conditions of the specified dependency
      - `@dependabot ignore this major version` will close this PR and stop
      Dependabot creating any more for this major version (unless you reopen
      the PR or upgrade to it yourself)
      - `@dependabot ignore this minor version` will close this PR and stop
      Dependabot creating any more for this minor version (unless you reopen
      the PR or upgrade to it yourself)
      - `@dependabot ignore this dependency` will close this PR and stop
      Dependabot creating any more for this dependency (unless you reopen the
      PR or upgrade to it yourself)
      
      
      </details>
      
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  4. Nov 06, 2024
  5. Nov 05, 2024