Skip to content
Snippets Groups Projects
  1. Mar 03, 2025
  2. Feb 28, 2025
    • Alexandru Vasile's avatar
      notifications/libp2p: Terminate the outbound notification substream on `std::io::Errors` (#7724) · 1bc6ca60
      Alexandru Vasile authored
      
      This PR handles a case where we called the `poll_next` on an outbound
      substream notification to check if the stream is closed. It is entirely
      possible that the `poll_next` would return an `io::error`, for example
      end of file.
      
      This PR ensures that we make the distinction between unexpected incoming
      data, and error originated from `poll_next`.
      
      While at it, the bulk of the PR change propagates the PeerID from the
      network behavior, through the notification handler, to the notification
      outbound stream for logging purposes.
      
      cc @paritytech/networking 
      
      Part of: https://github.com/paritytech/polkadot-sdk/issues/7722
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      1bc6ca60
    • Sebastian Kunert's avatar
      Remove leftovers of leftovers of contracts-rococo (#7750) · 9adb8d28
      Sebastian Kunert authored
      Follow-up of https://github.com/paritytech/polkadot-sdk/pull/7638, which
      attempted to remove contracts-rococo.
      
      But there were some leftover weight files still chilling in the repo.
      9adb8d28
    • Alexander Theißen's avatar
      pallet_revive: Change address derivation to use hashing (#7662) · 4087e2d9
      Alexander Theißen authored
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6723
      
      ## Motivation
      
      Internal auditors recommended to not truncate Polkadot Addresses when
      deriving Ethereum addresses from it. Reasoning is that they are raw
      public keys where truncating could lead to collisions when weaknesses in
      those curves are discovered in the future. Additionally, some pallets
      generate account addresses in a way where only the suffix we were
      truncating contains any entropy. The changes in this PR act as a safe
      guard against those two points.
      
      ## Changes made
      
      We change the `to_address` function to first hash the AccountId32 and
      then use trailing 20 bytes as `AccountId20`. If the `AccountId32` ends
      with 12x 0xEE we keep our current behaviour of just truncating those
      trailing bytes.
      
      ## Security Discussion
      
      This will allow us to still recover the original `AccountId20` because
      those are constructed by just adding those 12 bytes. Please note that
      generating an ed25519 key pair where the trailing 12 bytes are 0xEE is
      theoretically possible as 96bits is not a huge search space. However,
      this cannot be used as an attack vector. It will merely allow this
      address to interact with `pallet_revive` without registering as the
      fallback account is the same as the actual address. The ultimate vanity
      address. In practice, this is not relevant since the 0xEE addresses are
      not valid public keys for sr25519 which is used almost everywhere.
      
      tl:dr: We keep truncating in case of an Ethereum address derived account
      id. This is safe as those are already derived via keccak. In every other
      case where we have to assume that the account id might be a public key.
      Therefore we first hash and then take the trailing bytes.
      
      ## Do we need a Migration for Westend
      
      No. We changed the name of the mapping. This means the runtime will not
      try to read the old data. Ethereum keys are unaffected by this change.
      We just advise people to re-register their AccountId32 in case they need
      to use it as it is a very small circle of users (just 3 addresses
      registered). This will not cause disturbance on Westend.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      4087e2d9
    • Egor_P's avatar
      [Release|CI/CD] Update pgpgkms to the latest version (#7745) · 95be69ce
      Egor_P authored
      This PR updates `pgpgkms`, tool to sign releases, to the latest version
      to fix the issue wiht the `debian` publishing form the pipeline.
      Address: https://github.com/paritytech/release-engineering/issues/248
      95be69ce
    • Serban Iorga's avatar
      Derive `DecodeWithMemTracking` for `Block` (#7655) · c11b1f85
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
      
      This PR adds `DecodeWithMemTracking` as a trait bound for `Header`,
      `Block` and `TransactionExtension` and
      derives it for all the types that implement these traits in
      `polkadot-sdk`.
      c11b1f85
  3. Feb 27, 2025
  4. Feb 26, 2025
  5. Feb 25, 2025
  6. Feb 24, 2025
    • Niklas Adolfsson's avatar
      deps: remove unused feature `subxt/substrate-compat` (#7643) · a9baa520
      Niklas Adolfsson authored
      Partly fixes #7403
      
      Subxt depends still on sp-crypto-hashing v0.7 but it's only one
      dependency after removing the substrate-compat feature which is probably
      "acceptable"
      a9baa520
    • PG Herveou's avatar
      [pallet-revive] tracing should wrap around call stack execution (#7676) · cdc03394
      PG Herveou authored
      
      Fix tracing should wrap around the entire call stack execution
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      cdc03394
    • Francisco Aguirre's avatar
      XCM: Process PayFees only once (#7641) · 46139cd6
      Francisco Aguirre authored
      
      The `PayFees` instruction should only ever be used once. If it's used
      more than once, it's just a noop.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      46139cd6
    • CrabGopher's avatar
      optional rocksdb for frame-benchmarking-cli (#7649) · 2edabef4
      CrabGopher authored
      `sc-cli` brings rocksdb dependency into frame-benchmarking-cli when used
      with `default-features = false`.
      This PR makes rocksdb deps optional that sc-cli brings in some of the
      crates. I think I covered all the crates that depend on sc-cli but
      please let me know if I missed any.
      
      Fixes: https://github.com/paritytech/polkadot-sdk/issues/3793
      2edabef4
    • Daniel Shiposha's avatar
      Fix DryRunApi client-facing XCM versions (#7438) · 963f0d73
      Daniel Shiposha authored
      
      # Description
      
      Fixes #7413
      
      ## Integration
      
      This PR updates the `DryRunApi`. The signature of the `dry_run_call` is
      changed, and the XCM version of the return values of `dry_run_xcm` now
      follows the version of the input XCM program.
      
      ## Review Notes
      
      * **The `DryRunApi` is modified**
      * **Added the `Router::clear_messages` to `dry_run_xcm` common
      implementation**
      * **Fixed the xcmp-queue's Router's clear_messages: channels details'
      first_index and last_index are reset when clearing**
      * **The MIN_XCM_VERSION is added**
      * The common implementation in the `pallet-xcm` is modified accordingly
      * The `DryRunApi` tests are modified to account for testing old XCM
      versions
      * The implementation from the `pallet-xcm` is used where it was not used
      (including the `DryRunApi` tests)
      * All the runtime implementations are modified according to the Runtime
      API change
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      963f0d73
    • Raymond Cheung's avatar
      Enhance XCM Debugging with Log Capture in Unit Tests (#7594) · d189f9e7
      Raymond Cheung authored
      
      # Description
      
      This PR introduces a lightweight log-capturing mechanism for XCM unit
      tests, simplifying debugging by enabling structured log assertions. It
      partially addresses #6119 and #6125, offering an optional way to verify
      logs in tests while remaining unobtrusive in normal execution.
      
      # Key Changes
      
      * [x] Introduces a log capture utility in `sp_tracing`.
      * [x] Adds XCM test examples demonstrating how and when to use log
      capturing.
      
      # Review Notes:
      
      * The log capture mechanism is opt-in and does not affect existing tests
      unless explicitly used.
      * The implementation is minimal and does not add complexity to existing
      test setups.
      * It provides a structured alternative to
      [`sp_tracing::init_for_tests()`](https://paritytech.github.io/polkadot-sdk/master/sp_tracing/fn.init_for_tests.html)
      for log verification in automated tests.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      d189f9e7
    • seemantaggarwal's avatar
      effort towards getting chainspecbuilder into omni-node fix 5567 (#7619) · cf52a0d9
      seemantaggarwal authored
      Adding chain-spec-builder as a subcommand into Polkadot omni node
      cf52a0d9
    • paritytech-cmd-bot-polkadot-sdk[bot]'s avatar
      Auto-update of all weights for 2025-02-21-1740149841 (#7668) · 16ed0296
      
      Auto-update of all weights for 2025-02-21-1740149841.
      
      Subweight results:
      - [now vs
      master](https://weights.tasty.limo/compare?repo=polkadot-sdk&threshold=5&path_pattern=.%2F**%2Fweights%2F**%2F*.rs%2C.%2F**%2Fweights.rs&method=asymptotic&ignore_errors=true&unit=time&old=master&new=update-weights-weekly-2025-02-21-1740149841)
      - [now vs polkadot-v1.15.6
      (2025-01-16)](https://weights.tasty.limo/compare?repo=polkadot-sdk&threshold=5&path_pattern=.%2F**%2Fweights%2F**%2F*.rs%2C.%2F**%2Fweights.rs&method=asymptotic&ignore_errors=true&unit=time&old=polkadot-v1.15.6&new=update-weights-weekly-2025-02-21-1740149841)
      - [now vs polkadot-v1.16.2
      (2024-11-14)](https://weights.tasty.limo/compare?repo=polkadot-sdk&threshold=5&path_pattern=.%2F**%2Fweights%2F**%2F*.rs%2C.%2F**%2Fweights.rs&method=asymptotic&ignore_errors=true&unit=time&old=polkadot-v1.16.2&new=update-weights-weekly-2025-02-21-1740149841)
      
      Co-authored-by: default avatargithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      16ed0296
  7. Feb 23, 2025
    • Davide Galassi's avatar
      Bandersnatch hot fix (#7670) · 21f6f070
      Davide Galassi authored
      
      Essentially, this locks `bandersnatch_vrfs` to a specific branch of a
      repository I control. This is a temporary workaround to avoid issues
      like https://github.com/paritytech/polkadot-sdk/issues/7653 until
      https://github.com/paritytech/polkadot-sdk/pull/7669 is ready.
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/7653 
      
      @drskalman
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      21f6f070
  8. Feb 22, 2025
    • Al's avatar
      Changed Rotko Networks bootnodes addresses (#7432) · f385a3ed
      Al authored
      # Description
      
      Creating this PR to changed Rotko Networks bootnode addresses to the new
      structure.
      
      Rotko bootnode addresses tested with this results:
      
      ```
      {
          "asset-hub-kusama": {
            "bootnode": "/dns/asset-hub-kusama.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWJUFnjR2PNbsJhudwPVaWCoZy1acPGKjM2cSuGj345BBu",
            "discovered_peers": 3,
            "error_details": null,
            "id": "rotko",
            "network": "asset-hub-kusama",
            "status": "success",
            "test_duration_ms": 19394,
            "valid": true
          },
          "asset-hub-polkadot": {
            "bootnode": "/dns/asset-hub-polkadot.boot.rotko.net/tcp/30435/wss/p2p/12D3KooWKkzLjYF6M5eEs7nYiqEtRqY8SGVouoCwo3nCWsRnThDW",
            "discovered_peers": 5,
            "error_details": null,
            "id": "rotko",
            "network": "asset-hub-polkadot",
            "status": "success",
            "test_duration_ms": 5024,
            "valid": true
          },
          "asset-hub-westend": {
            "bootnode": "/dns/asset-hub-westend.boot.rotko.net/tcp/30...
      f385a3ed
  9. Feb 21, 2025
    • Ayevbeosa Iyamu's avatar
      xcm-builder: added logging for xcm filters/helpers/matchers/types (#2408) (#7003) · 934c0914
      Ayevbeosa Iyamu authored
      # Description
      
      Added logs in pallet-xcm to help in debugging, fixes #2408, and in
      continuation of #4982
      
      # Checklist
      
      - [x]
      https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-builder/src/
      - [x]
      https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/parachains/runtimes/assets/common/src
      - [x] runtime-defined XCM filters/converters (just [one
      example](https://github.com/paritytech/polkadot-sdk/blob/183b55aa
      
      /cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs#L284))
      
      Polkadot Address: 1Gz5aLtEu2n4jsfA6XwtZnuaRymJrDDw4kEGdNHTdxrpzrc
      
      ---------
      
      Co-authored-by: default avatarAyevbeosa Iyamu <aiyamu@vatebra.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarRaymond Cheung <178801527+raymondkfcheung@users.noreply.github.com>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.gi...>
      934c0914
    • PG Herveou's avatar
      [pallet-revive] Remove js examples (#7660) · e915cad4
      PG Herveou authored
      
      Remove JS examples, they now belongs to the evm-test-suite repo
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      e915cad4
    • Alexandru Gheorghe's avatar
      remove redundant 0016-approval-voting-parallel test (#7659) · b65c0a3d
      Alexandru Gheorghe authored
      
      The test was flaky and was disabled here
      https://github.com/paritytech/polkadot-sdk/issues/6345, looked at the
      flakiness
      https://github.com/paritytech/polkadot-sdk/issues/6345#issuecomment-2674063608
      and it wasn't because of some bug in our production code, but because of
      the way the test interacts with the infrastructure.
      
      Since https://github.com/paritytech/polkadot-sdk/pull/7504 this test is
      now testing redundant things that other tests like
      0009-approval-voting-coalescing.toml and 0006-parachains-max-tranche0
      already cover, so instead of investing trying to fix it, just remove it.
      
      Fixes: https://github.com/paritytech/polkadot-sdk/issues/6345
      
      Signed-off-by: default avatarAlexandru Gheorghe <alexandru.gheorghe@parity.io>
      b65c0a3d
    • Clara van Staden's avatar
      Snowbridge - Ethereum Electra Upgrade Support (#7075) · dd7562ab
      Clara van Staden authored
      # Description
      
      Adds support for the upcoming Ethereum Electra upgrade, while
      maintaining backwards compatibility for the current Deneb fork.
      
      ## Integration
      
      Relayers should be updated to send updated Electra consensus data
      structures.
      
      ## Review Notes
      
      The [Ethereum Electra hard-fork
      consensus](https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/light-client/sync-protocol.md)
      changes affecting the Ethereum light client are mainly isolated to the
      [Generalized
      Indexes](https://github.com/protolambda/eth2.0-ssz/blob/master/specs/navigation/generalized_indices.md)
      of data structures changing. Before Electra, these values were hardcoded
      in config. For Electra, these values change and needed to the updated.
      Methods were added to return the correct g-index for the current fork
      version.
      
      Data structures used by the Ethereum client did not change in this
      hard-fork. The BeaconState container has been updated with additional
      changes, but because t...
      dd7562ab