Skip to content
Snippets Groups Projects
  1. Nov 27, 2024
    • Alexandru Vasile's avatar
      rpc-v2: Implement `archive_unstable_storageDiff` (#5997) · afd065fa
      Alexandru Vasile authored
      
      This PR implements the `archive_unstable_storageDiff`.
      
      The implementation follows the rpc-v2 spec from:
      -  https://github.com/paritytech/json-rpc-interface-spec/pull/159.
      - builds on top of
      https://github.com/paritytech/json-rpc-interface-spec/pull/161
      
      cc @paritytech/subxt-team
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarJames Wilson <james@jsdw.me>
    • Alexandru Vasile's avatar
      v16: Expose the unstable metadata v16 (#5732) · 5b1b34db
      Alexandru Vasile authored
      
      This PR exposes the *unstable* metadata V16. The metadata is exposed
      under the unstable u32::MAX number.
      
      Developers can start experimenting with the new features of the metadata
      v16. *Please note that this metadata is under development and expect
      breaking changes until stabilization.*
      
      The `ExtrinsicMetadata` trait receives a breaking change. Its associated
      type `VERSION` is rename to `VERSIONS` and now supports a constant
      static list of metadata versions.
      The versions implemented for `UncheckedExtrinsic` are v4 (legacy
      version) and v5 (new version).
      
      For metadata collection, it is assumed that all `TransactionExtensions`
      are under version 0.
      
      Builds on top of: https://github.com/paritytech/polkadot-sdk/pull/5274
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/5980
      Closes: https://github.com/paritytech/polkadot-sdk/issues/5347
      Closes: https://github.com/paritytech/polkadot-sdk/issues/5285
      
      cc @paritytech/subxt-team
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarJames Wilson <james@jsdw.me>
      Co-authored-by: default avatarGitHub Action <action@github.com>
    • Alexandru Vasile's avatar
      litep2p/req-resp: Always provide main protocol name in responses (#6603) · 2a0b2680
      Alexandru Vasile authored
      Request responses are initialized with a main protocol name, and
      optional protocol names as a fallback.
      
      Running litep2p in kusama as a validator has surfaced a `debug_asserts`
      coming from the sync component:
      
      https://github.com/paritytech/polkadot-sdk/blob/3906c578
      
      /substrate/client/network/sync/src/strategy/chain_sync.rs#L640-L646
      
      The issue is that we initiate a request-response over the main protocol
      name `/genesis/sync/2` but receive a response over the legacy procotol
      `ksm/sync/2`. This behavior is correct because litep2p propagates to the
      higher levels the protocol that responded.
      
      In contrast, libp2p provides the main protocol name regardless of
      negotiating a legacy protocol.
      
      Because of this, higher level components assume that only the main
      protocol name will respond.
      To not break this assumption, this PR alings litep2p shim layer with the
      libp2p behavior.
      
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/6581
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarDmitry Markin <dmitry@markin.tech>
    • Branislav Kontur's avatar
      Add stable2412 to target_branches for command-backport.yml (#6666) · 445c1c80
      Branislav Kontur authored
      The backport bot opens PR for `A4-needs-backport` only for stable2407
      stable2409, but we have already stable2412.
      
      The question is, when should we append a new `stable*` branch here?
      Should it be done when a new `stable*` branch is created? Can we
      automate this process somehow?
  2. 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>
    • 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>
    • 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>
    • 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>
    • 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
    • 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>
    • 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>
    • Javier Viola's avatar
  3. Nov 25, 2024
  4. Nov 24, 2024
  5. Nov 22, 2024
  6. 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>
    • 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>
    • 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>
    • 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>
    • 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>
    • 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>
    • 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>
    • 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
  7. Nov 20, 2024
  8. Nov 19, 2024