Skip to content
Snippets Groups Projects
  1. Nov 26, 2024
    • Francisco Aguirre's avatar
      Fix `XcmPaymentApi::query_weight_to_asset_fee` version conversion (#6459) · 139691b1
      Francisco Aguirre authored
      The `query_weight_to_asset_fee` function was trying to convert versions
      by using `try_as`, this function [doesn't convert from a versioned to a
      concrete
      type](https://github.com/paritytech/polkadot-sdk/blob/0156ca8f/polkadot/xcm/src/lib.rs#L131).
      This would cause all calls with a lower version to fail.
      
      The correct function to use is the good old
      [try_into](https://github.com/paritytech/polkadot-sdk/blob/0156ca8f
      
      /polkadot/xcm/src/lib.rs#L184).
      Now those calls work :)
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      139691b1
    • Giuseppe Re's avatar
      Hide nonce implementation details in metadata (#6562) · fc315ac5
      Giuseppe Re authored
      
      See https://github.com/polkadot-fellows/runtimes/issues/248 : using
      `TypeWithDefault` having derived `TypeInfo` for `Nonce` causes a
      breaking change in metadata for nonce type because it's no longer `u64`.
      
      Adding a default implementation of `TypeInfo` for `TypeWithDefault` to
      restore the original type info in metadata.
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
      fc315ac5
    • Dino Pačandi's avatar
      Zero refund check for FungibleAdapter (#6506) · f520adb0
      Dino Pačandi authored
      
      `FungibleAdapter` will now check if the _refund amount_ is zero before
      calling deposit & emitting an event.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6469.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      f520adb0
    • Branislav Kontur's avatar
      xcm: fix local/remote exports when inner routers return `NotApplicable` (#6645) · 1c0b6100
      Branislav Kontur authored
      
      This PR addresses two small fixes:  
      
      1. Fixed a typo ("as as") found on the way.  
      2. Resolved a bug in the `local/remote exporters` used for bridging.
      Previously, they consumed `dest` and `msg` without returning them when
      inner routers/exporters failed with `NotApplicable`. This PR ensures
      compliance with the
      [`SendXcm`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/src/v5/traits.rs#L449-L450)
      and
      [`ExportXcm`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/traits/export.rs#L44-L45)
      traits.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      1c0b6100
    • Egor_P's avatar
      [Release|CI/CD] Github pipeline to publish polkadot deb package (#6640) · 3c003872
      Egor_P authored
      This pipeline should replace a manual action done on the `cleamroom`
      server to publish the `polkadot` deb package to our apt repo with the
      pipeline triggered from the new paritytech-release org.
      Right now, this is done manually by running the
      [add-packages.sh](https://github.com/paritytech/cleanroom/blob/master/ansible/roles/parity-repos/files/add-packages.sh)
      script on the `cleanroom` machine.
      What is done under the hood:
      - Pipeline downloads `polakdot` deb package from S3, that was prebuilt
      in the [Build release rc
      pipeline](https://github.com/paritytech/polkadot-sdk/blob/master/.github/workflows/release-build-rc.yml)
      - Prepares and syncs local apt repository
      - Adds and signs deb package to it using `reprepro`
      - Uploads new deb package to the distributed repo
      
      Closes: https://github.com/paritytech/release-engineering/issues/239
      3c003872
    • Alexandru Vasile's avatar
      ci/check-semver: Fix semver failed step (#6535) · 8216235b
      Alexandru Vasile authored
      
      The semver-check is failing with the following
      [error](https://github.com/paritytech/polkadot-sdk/actions/runs/11908981132/job/33185572284):
      
      ```bash
      error[E0658]: use of unstable library feature 'error_in_core'
        --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-decode-0.5.0/src/decoding/extrinsic_decoder.rs:56:6
         |
      56 | impl core::error::Error for ExtrinsicDecodeError {}
         |      ^^^^^^^^^^^^^^^^^^
         |
         = note: see issue #103765 <https://github.com/rust-lang/rust/issues/103765> for more information
         = help: add `#![feature(error_in_core)]` to the crate attributes to enable
         = note: this compiler was built on 2024-05-31; consider upgrading it if it is out of date
      ```
      
      This is related to the toolchain nightly version 1.80. In rust, 1.81 the
      `core::error::Error` is stable.
      
      After updating the rust-toolchain, parity-publish crate must be updated
      as well.
      The `cargo-semver-checks` dependency of `parity-publish` crate is
      updated from 0.34 to 0.38.
      This update enables rustdoc v36 that fixes the following
      [issue](https://github.com/paritytech/polkadot-sdk/actions/runs/11912689841/job/33196936011):
      
      
      ```bash
       validating prdocs...
      checking file changes...
      checking semver changes...
      (1/18) building frame-support-HEAD...
      (2/18) building frame-support-28.0.0...
      Error: rustdoc format v36 for file /__w/polkadot-sdk/polkadot-sdk/target/doc/frame_support.new is not supported
      ```
      
      This PR is pending on a release of parity-publish to version 0.9.0
      (fixes already on origin/master)
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      8216235b
    • dependabot[bot]'s avatar
      Bump rustls from 0.23.14 to 0.23.18 (#6641) · 86a917f5
      dependabot[bot] authored
      
      Bumps [rustls](https://github.com/rustls/rustls) from 0.23.14 to
      0.23.18.
      <details>
      <summary>Commits</summary>
      <ul>
      <li><a
      href="https://github.com/rustls/rustls/commit/33af2c38b0f1e4abf44d59d5b74ccf12f5cf5e56"><code>33af2c3</code></a>
      Prepare 0.23.18</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/ffe646d1ff07d3e1d9f009daadd94228d462425d"><code>ffe646d</code></a>
      Add reproducer for bug 2227</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/69b6f7473a7ae096a9cf9e2d6eb3cd8b22743597"><code>69b6f74</code></a>
      Record and restore the processed cursor in first_handshake_message</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/4ef3532cf2fceda9fdd19947f871adf7020d0b49"><code>4ef3532</code></a>
      Upgrade to mio 1</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/092a16427e81e58ecd6bcfdacc0b49f02bad8db3"><code>092a164</code></a>
      Manage dependencies via the workspace</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/a01bd6bcb536c6cdd490942b0eae2903abcfcab3"><code>a01bd6b</code></a>
      rustls-bench: fix warnings with no features</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/7d74de2c1bdf265531036f50abd3fc04df8c148a"><code>7d74de2</code></a>
      tests: linearize new test code helper</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/499d797b267e0b548fef5225b044b99fc215a8ff"><code>499d797</code></a>
      fix: do not send session_ticket(35) extension for TLS 1.3</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/faca28904efcb3b5a4a5f05be8e03374bf5086df"><code>faca289</code></a>
      chore(deps): lock file maintenance</li>
      <li><a
      href="https://github.com/rustls/rustls/commit/d12f42385c2da74e1ec16826af68d17a13101152"><code>d12f423</code></a>
      fix(deps): update rust crate asn1 to 0.20</li>
      <li>Additional commits viewable in <a
      href="https://github.com/rustls/rustls/compare/v/0.23.14...v/0.23.18">compare
      view</a></li>
      </ul>
      </details>
      <br />
      
      
      [![Dependabot compatibility
      score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustls&package-manager=cargo&previous-version=0.23.14&new-version=0.23.18)](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)
      You can disable automated security fix PRs for this repo from the
      [Security Alerts
      page](https://github.com/paritytech/polkadot-sdk/network/alerts).
      
      </details>
      
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      86a917f5
    • Javier Viola's avatar
  2. Nov 25, 2024
  3. Nov 24, 2024
  4. Nov 22, 2024
  5. Nov 21, 2024
    • PG Herveou's avatar
      [pallet-revive] Support all eth tx types (#6461) · d8ce5502
      PG Herveou authored
      
      Add support for all eth tx types
      Note that js libs will continue to use the Legacy type since we don't
      include base_fee_per_gas yet in the block.
      We can think about setting these values after we revisit how we encode
      the gas into weight & deposit_limit in a follow up PR
      
      ---------
      
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      d8ce5502
    • Iulian Barbu's avatar
      parachain-template-node: add properties for dev chain-spec (#6560) · 6d59c3b1
      Iulian Barbu authored
      
      # Description
      
      Reused as before the `properties` variable when defining a development
      chain spec for parachain-template-node.
      
      ## Integration
      
      N/A
      
      ## Review Notes
      
      One line change, pretty self explanatory (it got lost within the history
      of changes over the parachain-template-node/chain_spec.rs file). To be
      honest, not really sure how useful it is, but I had the choice of
      removing the `properties` var or reuse it as before, and I went with the
      latter.
      
      Signed-off-by: default avatarIulian Barbu <iulian.barbu@parity.io>
      6d59c3b1
    • Ankan's avatar
      [Fix|NominationPools] Only allow apply slash to be executed if the slash... · bf20a9ee
      Ankan authored
      [Fix|NominationPools] Only allow apply slash to be executed if the slash amount is atleast ED (#6540)
      
      This change prevents `pools::apply_slash` from being executed when the
      pending slash amount of the member is lower than the ED.
      
      The issue came to light with the failing [benchmark
      test](https://github.com/polkadot-fellows/runtimes/actions/runs/11879471717/job/33101445269?pr=490#step:11:765)
      in Kusama. The problem arises from the inexact conversion between points
      and balance. Specifically, when points are converted to balance and then
      back to points, rounding can introduce a small discrepancy between the
      input and the resulting value. This issue surfaced in Kusama due to its
      ED being different from Westend and Polkadot (1 UNIT/300), making the
      rounding issue noticeable.
      
      This fix is also significant because applying a slash is feeless and
      permissionless. Allowing super small slash amounts to be applied without
      a fee is undesirable. With this change, such small slashes will still be
      applied but only when member funds are withdrawn.
      
      ---------
      
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
      bf20a9ee
    • Iulian Barbu's avatar
      github/workflows: add ARM macos build binaries job (#6427) · 1f7765b6
      Iulian Barbu authored
      # Description
      
      This PR adds the required changes to release `polkadot`,
      `polkadot-parachain` and `polkadot-omni-node` binaries built on Apple
      Sillicon macos.
      
      ## Integration
      
      This addresses requests from the community for such binaries: #802, and
      they should be part of the Github release page.
      
      ## Review Notes
      
      Test on paritytech-stg solely focused on macos binaries:
      https://github.com/paritytech-stg/polkadot-sdk/actions/runs/11824692766/job/32946793308,
      except the steps related to `pgpkms` (which need AWS credentials,
      missing from paritytech-stg). The binary names don't have a `darwin-arm`
      identifier, and conflict with the existing x86_64-linux binaries. I
      haven't tested building everything on `paritytech-stg` because the
      x86_64-linux builds run on `unbutu-latest-m` which isn't enabled on
      `pairtytech-stg` (and I haven't asked CI team to enable one), so testing
      how to go around naming conflicts should be covered next.
      
      ### TODO
      
      - [x] Test the workflow start to end (especially the last bits related
      to uploading the binaries on S3 and ensuring the previous binaries and
      the new ones coexist harmoniously on S3/action artifacts storage without
      naming conflicts) @EgorPopelyaev
      - [x] Publish the arm binaries on the Github release page - to clarify
      what's needed @iulianbarbu
      
       . Current practice is to manually publish the
      binaries built via `release-build-rc.yml` workflow, taken from S3. Would
      be great to have the binaries there in the first place before working on
      automating this, but I would also do it in a follow up PR.
      
      ### Follow ups
      
      - [ ] unify the binaries building under
      `release-30_publish_release_draft.yml` maybe?
      - [ ] automate binary artifacts upload to S3 in
      `release-30_publish_release_draft.yml`
      
      ---------
      
      Signed-off-by: default avatarIulian Barbu <iulian.barbu@parity.io>
      Co-authored-by: default avatarEgorPopelyaev <egor@parity.io>
      1f7765b6
    • Bastian Köcher's avatar
      slot-based-collator: Move spawning of the futures (#6561) · 56d97c3a
      Bastian Köcher authored
      
      Move spawning of the slot-based collator into the `run` function. Also
      the tasks are being spawned as blocking task and not just as normal
      tasks.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      56d97c3a
    • Alexandru Vasile's avatar
      network-gossip: Ensure sync event is processed on unknown peer roles (#6553) · 7c9e34b5
      Alexandru Vasile authored
      
      The `GossipEngine::poll_next` implementation polls both the
      `notification_service` and the `sync_event_stream`.
      
      If both polls produce valid data to be processed
      (`Poll::Ready(Some(..))`), then the sync event is ignored when we
      receive `NotificationEvent::NotificationStreamOpened` and the role
      cannot be deduced.
      
      This PR ensures both events are processed gracefully. While at it, I
      have added a warning to the sync engine related to
      `notification_service` producing `Poll::Ready(None)`.
      
      This effectively ensures that `SyncEvents` propagate to the network
      potentially fixing any state mismatch.
      
      
      For more context: https://github.com/paritytech/polkadot-sdk/issues/6507
      
      cc @paritytech/sdk-node
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      7c9e34b5
    • Alexander Theißen's avatar
      revive: Bump connect timeout to fix flaky tests (#6567) · b290f27c
      Alexander Theißen authored
      
      The eth RPC tests fail sometimes because they run into a connect timeout
      because the node takes a long time to start. This bumps the connect
      timeout from 30 to 120 seconds. Locally they take around 40s for me.
      
      As a drive by I also remove a apparently duplicated nextest config.
      
      ---------
      
      Co-authored-by: default avatarordian <write@reusable.software>
      b290f27c
    • gupnik's avatar
      Removes constraint in `BlockNumberProvider` from treasury (#6522) · a8722784
      gupnik authored
      https://github.com/paritytech/polkadot-sdk/pull/3970 updated the
      treasury pallet to support relay chain block number provider. However,
      it added a constraint to the BlockNumberProvider to have the same block
      number type as frame_system:
      
      ```rust
      type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;
      ```
      
      This PR removes that constraint as suggested by @gui1117
      a8722784
  6. Nov 20, 2024
  7. Nov 19, 2024
    • Liu-Cheng Xu's avatar
      Pure state sync refactoring (part-2) (#6521) · 07a59333
      Liu-Cheng Xu authored
      
      This PR is the second part of the pure state sync refactoring,
      encapsulating `StateSyncMetadata` as a separate entity. Now it's pretty
      straightforward what changes are needed for the persistent state sync as
      observed in the struct `StateSync`:
      
      - `state`: redirect directly to the DB layer instead of being
      accumulated in the memory.
      - `metadata`: handle the state sync metadata on disk whenever the state
      is forwarded to the DB, resume an ongoing state sync on a restart, etc.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarAlexandru Vasile <60601340+lexnv@users.noreply.github.com>
      07a59333
    • Liu-Cheng Xu's avatar
      Support block gap created by fast sync (#5703) · ce20d0a5
      Liu-Cheng Xu authored
      This is part 2 of
      https://github.com/paritytech/polkadot-sdk/issues/5406#issuecomment-2325064863,
      properly handling the block gap generated during fast sync.
      
      Although #5406 remains unresolved due to the known issues in #5663, I
      decided to open up this PR earlier than later to speed up the overall
      progress. I've tested the fast sync locally with this PR, and it appears
      to be functioning well. (I was doing a fast sync from a discontinued
      archive node locally, thus the issue highlighted in
      https://github.com/paritytech/polkadot-sdk/pull/5663#discussion_r1752124039
      was bypassed exactly.)
      
      Once the edge cases in #5663 are addressed, we can move forward by
      removing the body attribute from the LightState block request and
      complete the work on #5406. The changes in this PR are incremental, so
      reviewing commit by commit should provide the best clarity.
      
      cc @dmitry-markin
      
      
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      ce20d0a5
    • Bastian Köcher's avatar
      Forward logging directives to Polkadot workers (#6534) · cccf3417
      Bastian Köcher authored
      
      This pull request forward all the logging directives given to the node
      via `RUST_LOG` or `-l` to the workers, instead of only forwarding
      `RUST_LOG`.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      cccf3417
    • Kazunobu Ndong's avatar
      Migrate pallet-democracy benchmarks to benchmark v2 syntax (#6509) · 09757a41
      Kazunobu Ndong authored
      
      # Description
      
      Migrates pallet-democracy benchmarks to benchmark v2 syntax
      This is Part of https://github.com/paritytech/polkadot-sdk/issues/6202
      
      ---------
      
      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>
      09757a41
    • Maciej's avatar
      Validator Re-Enabling (#5724) · 8d4138f7
      Maciej authored
      
      Aims to implement Stage 3 of Validator Disbling as outlined here:
      https://github.com/paritytech/polkadot-sdk/issues/4359
      
      Features:
      - [x] New Disabling Strategy (Staking level)
      - [x] Re-enabling logic (Session level)
      - [x] More generic disabling decision output
      - [x] New Disabling Events
      
      Testing & Security:
      - [x] Unit tests
      - [x] Mock tests
      - [x] Try-runtime checks
      - [x] Try-runtime tested on westend snap
      - [x] Try-runtime CI tests
      - [ ] Re-enabling Zombienet Test (?)
      - [ ] SRLabs Audit
      
      Closes #4745 
      Closes #2418
      
      ---------
      
      Co-authored-by: default avatarordian <write@reusable.software>
      Co-authored-by: default avatarAnkan <10196091+Ank4n@users.noreply.github.com>
      Co-authored-by: default avatarTsvetomir Dimitrov <tsvetomir@parity.io>
      8d4138f7
    • tmpolaczyk's avatar
      Fix metrics not shutting down if there are open connections (#6220) · 0449b214
      tmpolaczyk authored
      Fix prometheus metrics not shutting down if there are open connections.
      I fixed the same issue in the past but it broke again after a dependecy
      upgrade.
      
      See also:
      
      https://github.com/paritytech/polkadot-sdk/pull/1637
      0449b214
    • Ermal Kaleci's avatar
      [pallet-revive] Update delegate_call to accept address and weight (#6111) · 293d4a59
      Ermal Kaleci authored
      
      Enhance the `delegate_call` function to accept an `address` target
      parameter instead of a `code_hash`. This allows direct identification of
      the target contract using the provided address.
      Additionally, introduce parameters for specifying a customizable
      `ref_time` limit and `proof_size` limit, thereby improving flexibility
      and control during contract interactions.
      
      ---------
      
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
      293d4a59
    • Tobi Demeco's avatar
      sp-trie: correctly avoid panicking when decoding bad compact proofs (#6502) · 5e8348f0
      Tobi Demeco authored
      # Description
      
      Opening another PR because I added a test to check for my fix pushed in
      #6486 and realized that for some reason I completely forgot how to code
      and did not fix the underlying issue, since out-of-bounds indexing could
      still happen even with the check I added. This one should fix that and,
      as an added bonus, has a simple test used as an integrity check to make
      sure future changes don't accidently revert this fix.
      
      Now `sp-trie` should definitely not panic when faced with bad
      `CompactProof`s. Sorry about that 😅
      
      
      
      This, like #6486, is related to issue #6485
      
      ## Integration
      
      No changes have to be done downstream, and as such the version bump
      should be minor.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      5e8348f0
    • Michal Kucharczyk's avatar
      `TransactionPool` API uses `async_trait` (#6528) · 5721e556
      Michal Kucharczyk authored
      
      This PR refactors `TransactionPool` API to use `async_trait`, replacing
      the` Pin<Box<...>>` pattern. This should improve readability and
      maintainability.
      
      The change is not altering any functionality.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      5721e556
  8. Nov 18, 2024