Skip to content
Snippets Groups Projects
  1. Mar 10, 2025
  2. Mar 06, 2025
    • Utkarsh Bhardwaj's avatar
      add poke_deposit extrinsic to pallet-proxy (#7801) · 4f7a9388
      Utkarsh Bhardwaj authored
      
      # Description
      
      * This PR adds a new extrinsic `poke_deposit` to `pallet-proxy`. This
      extrinsic will be used to re-adjust the deposits made in the pallet to
      create a proxy or to create an announcement.
      * Part of #5591 
      
      ## Review Notes
      
      * Added a new extrinsic `poke_deposit` in `pallet-proxy`.
      * This extrinsic checks and adjusts the deposits made for either
      creating a proxy or creating an announcement or both.
      * Added a new event `DepositPoked` to be emitted upon a successful call
      of the extrinsic.
      * Although the immediate use of the extrinsic will be to give back some
      of the deposit after the AH-migration, the extrinsic is written such
      that it can work if the deposit decreases or increases (both).
      * The call to the extrinsic would be `free` if an actual adjustment is
      made to the deposit for creating a proxy or to the deposit for creating
      an announcement or both and `paid` otherwise (when no deposit is
      changed).
      * Added a new enum `DepositKind` to differentiate between proxy deposit
      adjusted and announcement deposit adjusted when emitting events.
      * Added tests to test all scenarios.
      
      ## TO-DOs
      * [ ] Run CI cmd bot to benchmark
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      4f7a9388
    • Andrii's avatar
      [XCM] Add generic location to account converter that also works with external... · d5bd15b2
      Andrii authored
      [XCM] Add generic location to account converter that also works with external ecosystems for bridge hubs (#7809)
      
      That's the continuation of
      [PR#7313](https://github.com/paritytech/polkadot-sdk/pull/7313)
      d5bd15b2
    • clangenb's avatar
      [glutton-westend] and add sudo key to genesis config (#7794) · a377caec
      clangenb authored
      
      I discovered in https://github.com/paritytech/polkadot-sdk/pull/7459,
      that the overhead benchmark is not working for glutton-westend, as the
      client can't send `system.remark` extrinsics. This was due to 2 issues:
      
      1. Alice was not set as sudo. Hence, the `CheckOnlySudoAccount` deemed
      the extrinsic as invalid.
      2. The `CheckNonce` TxExtension also marked the extrinsic as invalid, as
      the account doesn't exist (because glutton has no balances pallet).
      
      This PR fixes the 1.) for now. I wanted to simply remove the
      `CheckNonce` in the TxExtension to fix 2., but it turns out that this is
      not possible, as the tx-pool needs the nonce tag to identify the
      transaction. https://github.com/paritytech/polkadot-sdk/pull/6884 will
      fix sending extrinsics on glutton.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatars0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com>
      a377caec
  3. Mar 05, 2025
  4. Feb 28, 2025
  5. Feb 27, 2025
    • Utkarsh Bhardwaj's avatar
      [AHM] Poke deposits: Multisig pallet (#7700) · cc83fba1
      Utkarsh Bhardwaj authored
      
      # Description
      
      * This PR adds a new extrinsic `poke_deposit` to `pallet-multisig`. This
      extrinsic will be used to re-adjust the deposits made in the pallet to
      create a multisig operation after AHM.
      * Part of #5591 
      
      ## Review Notes
      
      * Added a new extrinsic `poke_deposit` in `pallet-multisig`.
      * Added a new event `DepositPoked` to be emitted upon a successful call
      of the extrinsic.
      * Although the immediate use of the extrinsic will be to give back some
      of the deposit after the AH-migration, the extrinsic is written such
      that it can work if the deposit decreases or increases (both).
      * The call to the extrinsic would be `free` if an actual adjustment is
      made to the deposit and `paid` otherwise.
      * Added tests to test all scenarios.
      
      ## TO-DOs
      * [x] Add Benchmark
      * [x] Run CI cmd bot to benchmark
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      cc83fba1
  6. Feb 26, 2025
  7. Feb 25, 2025
  8. Feb 24, 2025
    • 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
    • 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: github-actions[bot] <41898282+github-act...
      16ed0296
  9. 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
  10. Feb 21, 2025
  11. Feb 20, 2025
    • PG Herveou's avatar
      [pallet-revive] tracing improvements (#7614) · 9e75647c
      PG Herveou authored
      
      Various pallet-revive improvements
      
      - add check for precompiles addresses,
      So we can easily identify which one are being called and not supported
      yet
      
      - fixes debug_call for revert call
      If a call revert we still want to get the traces for that call, that
      matches geth behaviors, diff tests will be added to the test suite for
      this
      
      - fixes traces for staticcall
      The call type was not always being reported properly.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
      9e75647c
    • Alexander Theißen's avatar
      Update to Rust stable 1.84.1 (#7625) · e2d3da61
      Alexander Theißen authored
      Ref https://github.com/paritytech/ci_cd/issues/1107
      
      We mainly need that so that we can finally compile the `pallet_revive`
      fixtures on stable. I did my best to keep the commits focused on one
      thing to make review easier.
      
      All the changes are needed because rustc introduced more warnings or is
      more strict about existing ones. Most of the stuff could just be fixed
      and the commits should be pretty self explanatory. However, there are a
      few this that are notable:
      
      ## `non_local_definitions `
      
      A lot of runtimes to write `impl` blocks inside functions. This makes
      sense to reduce the amount of conditional compilation. I guess I could
      have moved them into a module instead. But I think allowing it here
      makes sense to avoid the code churn.
      
      ## `unexpected_cfgs`
      
      The FRAME macros emit code that references various features like `std`,
      `runtime-benchmarks` or `try-runtime`. If a create that uses those
      macros does not have those features we get this warning. Those were
      mostly when ...
      e2d3da61
    • Serban Iorga's avatar
      derive `DecodeWithMemTracking` for `RuntimeCall` (#7634) · e8d17cbe
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
      e8d17cbe
  12. Feb 19, 2025
    • Dónal Murray's avatar
      Add sudo pallet to coretime-westend (#6960) · ececb4cb
      Dónal Murray authored
      
      Add the sudo pallet to coretime-westend, allowing use in
      development/testing. Previously the coretime-rococo runtime was used in
      situations like this, but since Rococo is now gone this can be used
      instead.
      
      No sudo key is added to Westend storage with this PR, since it's likely
      that any updates will continue to be done over XCM. If this is something
      that is wanted the key can be set via XCM.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarMaksym H <1177472+mordamax@users.noreply.github.com>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      ececb4cb
    • Jonathan Brown's avatar
      [pallet-broker] add extrinsic to remove an assignment (#7080) · bd418487
      Jonathan Brown authored
      
      # Description
      
      #6929 requests more extrinsics for "managing the network's coretime
      allocations without needing to dabble with migration+runtime upgrade or
      set/kill storage patterns"
      
      This pull request implements the remove_assignment() extrinsic.
      
      
      ## Integration
      
      Downstream projects need to benchmark the weight for the
      remove_assignment() extrinsic.
      
      ---------
      
      Co-authored-by: default avatarJonathan Brown <jbrown@acuity.network>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
      bd418487
    • Jonathan Brown's avatar
      [pallet-broker] add extrinsic to remove a lease (#7026) · 959d9187
      Jonathan Brown authored
      
      # Description
      
      #6929 requests more extrinsics for "managing the network's coretime
      allocations without needing to dabble with migration+runtime upgrade or
      set/kill storage patterns"
      
      This pull request implements the remove_lease() extrinsic.
      
      
      ## Integration
      
      Downstream projects need to benchmark the weight for the remove_lease()
      extrinsic.
      
      ## Review Notes
      
      Mentorship is requested to ensure this is implemented correctly.
      
      The lease is removed from state using the TaskId as a key. Is this
      sufficient. Does the extrinsic need to do anything else?
      
      ---------
      
      Co-authored-by: default avatarJonathan Brown <jbrown@acuity.network>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarDónal Murray <donalm@seadanda.dev>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
      959d9187
    • Serban Iorga's avatar
      Derive `DecodeWithMemTracking` for cumulus pallets and for `polkadot-sdk` runtimes (#7627) · d60afc9f
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/7360
      
      Derive `DecodeWithMemTracking` for the structures in the cumulus pallets
      and for the structures in the `polkadot-sdk` runtimes.
      
      The PR contains no functional changes and no manual implementation. Just
      deriving `DecodeWithMemTracking`.
      d60afc9f
    • clangenb's avatar
      add genesis presets for coretime parachains (#7476) · e9b745a7
      clangenb authored
      
      Extracted from #7473.
      
      Part of: https://github.com/paritytech/polkadot-sdk/issues/5704.
      
      ---------
      
      Co-authored-by: default avatarGuillaume Thiolliere <guillaume.thiolliere@parity.io>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      e9b745a7
    • Branislav Kontur's avatar
      Make `pallet-bridge-rewards` generic over `RewardKind` (#7492) · ba7cb484
      Branislav Kontur authored
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/7272
      Relates to: https://github.com/paritytech/polkadot-sdk/pull/6578
      Relates to: https://github.com/paritytech/polkadot-sdk/issues/7274
      
      ## Description
      
      The PR enhances the `pallet-bridge-rewards` by making it generic over
      the `RewardKind` type (previously hardcoded as `RewardsAccountParams`).
      This modification allows the pallet to support multiple reward types
      (e.g., P/K bridge, Snowbridge), increasing its flexibility and
      applicability across various bridge scenarios.
      
      Other pallets can register rewards using `bp_relayers::RewardLedger`,
      which is implemented by the rewards pallet. The runtime can then be
      configured with different mechanisms for paying/claiming rewards via
      `bp_relayers::PaymentProcedure` (e.g., see the `pub struct
      BridgeRewardPayer;` implementation for BridgeHubWestend).
      
      ## Follow-up  
      The removed balances/rewards statistics from the complex relay (no
      longer used) will eventually be reintroduced or fixed in the standalone
      relayers via
      https://github.com/paritytech/parity-bridges-common/issues/3004#issuecomment-2401634589.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
      Co-authored-by: default avatarSerban Iorga <serban@parity.io>
      ba7cb484
    • Branislav Kontur's avatar
      XCM: Deny barrier checks for nested XCMs with specific instructions to be... · bd7cf119
      Branislav Kontur authored
      XCM: Deny barrier checks for nested XCMs with specific instructions to be executed on the local chain (#7200)
      
      Resolves (partially):
      https://github.com/paritytech/polkadot-sdk/issues/7148
      Depends on: https://github.com/paritytech/polkadot-sdk/pull/7169
      
      # Description
      
      This PR addresses partially #7148 (Problem 2) and ensures the proper
      checking of nested local instructions. It introduces a new barrier -
      `DenyRecursively` - to provide more refined control over instruction
      denial. The main change is the replacement of `DenyThenTry<Deny, Allow>`
      with `DenyThenTry<DenyRecursively<Deny>, Allow>` which handles both
      top-level and nested local instructions by applying allow condition
      after denial.
      
      For context and additional information, please refer to [_Problem 2 -
      Barrier vs nested XCM
      validation_](https://github.com/paritytech/polkadot-sdk/issues/7148).
      
      # TODO
      - [x] Evaluate PoC, more details at #7351:
          - **DenyNestedXcmInstructions**: Keep it as it is and be explicit:
              1. Name the Deny barriers for the top level.
      2. Name the Deny barrier for nested with `DenyInstructionsWithXcm`.
      - **DenyThenTry<DenyInstructionsWithXcm<Deny>, Allow>**: Alternatively,
      hard-code those three instructions in `DenyThenTry`, so we wouldn’t need
      `DenyInstructionsWithXcm`. However, this approach wouldn’t be as
      general.
      - **DenyInstructionsWithXcmFor**: Another possibility is to check
      `DenyInstructionsWithXcm::Inner` for the actual `message`, so we don’t
      need duplication for top-level and nested (not sure, maybe be explicit
      is good thing) - see _Problem2 - example_. Instead of this:
         ```
        DenyThenTry<
                      (
                                     // Deny for top level XCM program 
                                     DenyReserveTransferToRelayChain,
      // Dedicated barrier for nested XCM programs
                                     DenyInstructionsWithXcmFor<
      // Repeat all Deny filters here
      DenyReserveTransferToRelayChain,
                                      >
                      ),
         ```
        we could just use:
         ```
        DenyThenTry<
                      (
                                     // Dedicated barrier for XCM programs
                                     DenyInstructionsWithXcmFor<
      // Add all `Deny` filters here
      DenyReserveTransferToRelayChain,
                                                      ...
                                      >
                      ),
         ```
      - [POC
      Evaluation](https://github.com/paritytech/polkadot-sdk/pull/7200#discussion_r1939288792)
      - [x] Consider better name `DenyInstructionsWithXcm` =>
      `DenyRecursively`, more details at
      [here](https://github.com/paritytech/polkadot-sdk/pull/7200#discussion_r1958588973)
      - [x] Clean-up and docs
      - [x] Merge https://github.com/paritytech/polkadot-sdk/pull/7169 or
      rebase this branch on the top of `yrong:fix-for-deny-then-try`
      - [x] Set for the runtimes where we use `DenyThenTry<Deny, Allow>` =>
      `DenyThenTry<DenyRecursively<Deny>, Allow>`
      - [ ] Schedule sec.audit
      
      ---------
      
      Co-authored-by: default avatarRaymond Cheung <178801527+raymondkfcheung@users.noreply.github.com>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarron <yrong1997@gmail.com>
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
      Co-authored-by: default avatarClara van Staden <claravanstaden64@gmail.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      bd7cf119
  13. Feb 18, 2025
  14. Feb 17, 2025
  15. Feb 14, 2025
    • Kian Paimani's avatar
      [AHM] Multi-block staking election pallet (#7282) · a025562b
      Kian Paimani authored
      ## Multi Block Election Pallet
      
      This PR adds the first iteration of the multi-block staking pallet. 
      
      From this point onwards, the staking and its election provider pallets
      are being customized to work in AssetHub. While usage in solo-chains is
      still possible, it is not longer the main focus of this pallet. For a
      safer usage, please fork and user an older version of this pallet.
      
      ---
      
      ## Replaces
      
      - [x] https://github.com/paritytech/polkadot-sdk/pull/6034 
      - [x] https://github.com/paritytech/polkadot-sdk/pull/5272
      
      ## Related PRs: 
      
      - [x] https://github.com/paritytech/polkadot-sdk/pull/7483
      - [ ] https://github.com/paritytech/polkadot-sdk/pull/7357
      - [ ] https://github.com/paritytech/polkadot-sdk/pull/7424
      - [ ] https://github.com/paritytech/polkadot-staking-miner/pull/955
      
      This branch can be periodically merged into
      https://github.com/paritytech/polkadot-sdk/pull/7358 ->
      https://github.com/paritytech/polkadot-sdk/pull/6996
      
      ## TODOs: 
      
      - [x] rebase to master 
      - Benchmarking for staking critical path
        - [x] snapshot
        - [x] election result
      - Benchmarking for EPMB critical path
        - [x] snapshot
        - [x] verification
        - [x] submission
        - [x] unsigned submission
        - [ ] election results fetching
      - [ ] Fix deletion weights. Either of
        - [ ] Garbage collector + lazy removal of all paged storage items
        - [ ] Confirm that deletion is small PoV footprint.
      - [ ] Move election prediction to be push based. @tdimitrov 
      - [ ] integrity checks for bounds 
      - [ ] Properly benchmark this as a part of CI -- for now I will remove
      them as they are too slow
      - [x] add try-state to all pallets
      - [x] Staking to allow genesis dev accounts to be created internally
      - [x] Decouple miner config so @niklasad1 can work on the miner
      72841b73
      - [x] duplicate snapshot page reported by @niklasad1
      
       
      - [ ] https://github.com/paritytech/polkadot-sdk/pull/6520 or equivalent
      -- during snapshot, `VoterList` must be locked
      - [ ] Move target snapshot to a separate block
      
      ---------
      
      Co-authored-by: default avatarGonçalo Pestana <g6pestana@gmail.com>
      Co-authored-by: default avatarAnkan <10196091+Ank4n@users.noreply.github.com>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      a025562b
    • Bastian Köcher's avatar
    • Oliver Tale-Yazdi's avatar
      [mq pallet] Custom next queue selectors (#6059) · 7aac8861
      Oliver Tale-Yazdi authored
      
      Changes:
      - Expose a `force_set_head` function from the `MessageQueue` pallet via
      a new trait: `ForceSetHead`. This can be used to force the MQ pallet to
      process this queue next.
      - The change only exposes an internal function through a trait, no audit
      is required.
      
      ## Context
      
      For the Asset Hub Migration (AHM) we need a mechanism to prioritize the
      inbound upward messages and the inbound downward messages on the AH. To
      achieve this, a minimal (and no breaking) change is done to the MQ
      pallet in the form of adding the `force_set_head` function.
      
      An example use of how to achieve prioritization is then demonstrated in
      `integration_test.rs::AhmPrioritizer`. Normally, all queues are
      scheduled round-robin like this:
      
      `| Relay | Para(1) | Para(2) | ... | Relay | ... `
      
      The prioritizer listens to changes to its queue and triggers if either:
      - The queue processed in the last block (to keep the general round-robin
      scheduling)
      - The queue did not process since `n` blocks (to prevent starvation if
      there are too many other queues)
      
      In either situation, it schedules the queue for a streak of three
      consecutive blocks, such that it would become:
      
      `| Relay | Relay | Relay | Para(1) | Para(2) | ... | Relay | Relay |
      Relay | ... `
      
      It basically transforms the round-robin into an elongated round robin.
      Although different strategies can be injected into the pallet at
      runtime, this one seems to strike a good balance between general service
      level and prioritization.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      Co-authored-by: default avatarmuharem <ismailov.m.h@gmail.com>
      7aac8861
  16. Feb 13, 2025
  17. Feb 12, 2025