Skip to content
Snippets Groups Projects
  1. Jan 21, 2025
  2. Jan 20, 2025
    • PG Herveou's avatar
      [eth-indexer] subscribe to finalize blocks instead of best blocks (#7260) · cbf3925e
      PG Herveou authored
      For eth-indexer, it's probably safer to use `subscribe_finalized` and
      index these blocks into the DB rather than `subscribe_best`
      
      ---------
      
      Co-authored-by: command-bot <>
      cbf3925e
    • Benjamin Gallois's avatar
      Fix `frame-benchmarking-cli` not buildable without rocksdb (#7263) · 2c4cecce
      Benjamin Gallois authored
      ## Description
      
      The `frame-benchmarking-cli` crate has not been buildable without the
      `rocksdb` feature since version 1.17.0.
      
      **Error:**  
      ```rust
      self.database()?.unwrap_or(Database::RocksDb),
                                   ^^^^^^^ variant or associated item not found in `Database`
      ```
      
      This issue is also related to the `rocksdb` feature bleeding (#3793),
      where the `rocksdb` feature was always activated even when compiling
      this crate with `--no-default-features`.
      
      **Fix:**  
      - Resolved the error by choosing `paritydb` as the default database when
      compiled without the `rocksdb` feature.
      - Fixed the issue where the `sc-cli` crate's `rocksdb` feature was
      always active, even compiling `frame-benchmarking-cli` with
      `--no-default-features`.
      
      ## Review Notes
      
      Fix the crate to be built without rocksdb, not intended to solve #3793.
      
      ---------
      
      Co-authored-by: command-bot <>
      2c4cecce
    • runcomet's avatar
      Migrate `pallet-assets-freezer` to umbrella crate (#6599) · 711e6ff3
      runcomet authored
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/6504
      
      ### Added modules
      
      - `utility`: Traits not tied to any direct operation in the runtime.
      
      polkadot address: 14SRqZTC1d8rfxL8W1tBTnfUBPU23ACFVPzp61FyGf4ftUFg
      
      ---------
      
      Co-authored-by: default avatarGiuseppe Re <giuseppe.re@parity.io>
      711e6ff3
    • Ron's avatar
      Migrate pallet-mmr to umbrella crate (#7081) · 569ce71e
      Ron authored
      Part of https://github.com/paritytech/polkadot-sdk/issues/6504
      569ce71e
    • Branislav Kontur's avatar
      Apply a few minor fixes found while addressing the fellows PR for weights. (#7098) · 115ff4e9
      Branislav Kontur authored
      This PR addresses a few minor issues found while working on the
      polkadot-fellows PR
      [https://github.com/polkadot-fellows/runtimes/pull/522](https://github.com/polkadot-fellows/runtimes/pull/522):
      - Incorrect generic type for `InboundLaneData` in
      `check_message_lane_weights`.
      - Renaming leftovers: `assigner_on_demand` -> `on_demand`.
      115ff4e9
    • PG Herveou's avatar
      [pallet-revive] eth-rpc error logging (#7251) · ea27696a
      PG Herveou authored
      Log error instead of failing with an error when block processing fails
      
      ---------
      
      Co-authored-by: command-bot <>
      ea27696a
    • Sebastian Kunert's avatar
      Stabilize `ensure_execute_processes_have_correct_num_threads` test (#7253) · d5d9b127
      Sebastian Kunert authored
      Saw this test flake a few times, last time
      [here](https://github.com/paritytech/polkadot-sdk/actions/runs/12834432188/job/35791830215).
      
      We first fetch all processes in the test, then query `/proc/<pid>/stat`
      for every one of them. When the file was not found, we would error. Now
      we tolerate not finding this file. Ran 200 times locally without error,
      before would fail a few times, probably depending on process fluctuation
      (which I expect to be high on CI runners).
      d5d9b127
    • seemantaggarwal's avatar
      Use docify export for parachain template hardcoded configuration and embed it... · 4937f779
      seemantaggarwal authored
      Use docify export for parachain template hardcoded configuration and embed it in its README #6333 (#7093)
      
      Use docify export for parachain template hardcoded configuration and
      embed it in its README #6333
      
      Docify currently has a limitation of not being able to embed a
      variable/const in its code, without embedding it's definition, even if
      do something in a string like
      
      "this is a sample string ${sample_variable}"
      
      It will embed the entire string 
      "this is a sample string ${sample_variable}"
      without replacing the value of sample_variable from the code
      
      Hence, the goal was just to make it obvious in the README where the
      PARACHAIN_ID value is coming from, so a note has been added at the start
      for the same, so whenever somebody is running these commands, they will
      be aware about the value and replace accordingly.
      
      To make it simpler, we added a 
      rust ignore block so the user can just look it up in the readme itself
      and does not have to scan through the runtime directory for the value.
      
      ---------
      
      Co-authored-by: default avatarIulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
      4937f779
    • Sebastian Kunert's avatar
      Collator: Fix `can_build_upon` by always allowing to build on included block (#7205) · 06f5d486
      Sebastian Kunert authored
      Follow-up to #6825, which introduced this bug.
      
      We use the `can_build_upon` method to ask the runtime if it is fine to
      build another block. The runtime checks this based on the
      [`ConsensusHook`](https://github.com/paritytech/polkadot-sdk/blob/c1b7c302/cumulus/pallets/aura-ext/src/consensus_hook.rs#L110-L110)
      implementation, the most popular one being the `FixedConsensusHook`.
      
      In #6825 I removed a check that would always allow us to build when we
      are building on an included block. Turns out this check is still
      required when:
      1. The [`UnincludedSegment`
      ](https://github.com/paritytech/polkadot-sdk/blob/c1b7c302
      
      /cumulus/pallets/parachain-system/src/lib.rs#L758-L758)
      storage item in pallet-parachain-system is equal or larger than the
      unincluded segment.
      2. We are calling the `can_build_upon` runtime API where the included
      block has progressed offchain to the current parent block (so last entry
      in the `UnincludedSegment` storage item).
      
      In this scenario the last entry in `UnincludedSegment` does not have a
      hash assigned yet (because it was not available in `on_finalize` of the
      previous block). So the unincluded segment will be reported at its
      maximum length which will forbid building another block.
      
      Ideally we would have a more elegant solution than to rely on the
      node-side here. But for now the check is reintroduced and a test is
      added to not break it again by accident.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarMichal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
      06f5d486
  3. Jan 17, 2025
  4. Jan 16, 2025
    • Ankan's avatar
      [Staking] Currency <> Fungible migration (#5501) · f5673cf2
      Ankan authored
      Migrate staking currency from `traits::LockableCurrency` to
      `traits::fungible::holds`.
      
      Resolves part of https://github.com/paritytech/polkadot-sdk/issues/226.
      
      ## Changes
      ### Nomination Pool
      TransferStake is now incompatible with fungible migration as old pools
      were not meant to have additional ED. Since they are anyways deprecated,
      removed its usage from all test runtimes.
      
      ### Staking
      - Config: `Currency` becomes of type `Fungible` while `OldCurrency` is
      the `LockableCurrency` used before.
      - Lazy migration of accounts. Any ledger update will create a new hold
      with no extra reads/writes. A permissionless extrinsic
      `migrate_currency()` releases the old `lock` along with some
      housekeeping.
      - Staking now requires ED to be left free. It also adds no consumer to
      staking accounts.
      - If hold cannot be applied to all stake, the un-holdable part is force
      withdrawn from the ledger.
      
      ### Delegated Staking
      The pallet does not add provider for agents anymore.
      
      ## Migration stats
      ### Polkadot
      Total accounts that can be migrated: 59564
      Accounts failing to migrate: 0
      Accounts with stake force withdrawn greater than ED: 59
      Total force withdrawal: 29591.26 DOT
      
      ### Kusama
      Total accounts that can be migrated: 26311
      Accounts failing to migrate: 0
      Accounts with stake force withdrawn greater than ED: 48
      Total force withdrawal: 1036.05 KSM
      
      
      [Full logs here](https://hackmd.io/@ak0n/BklDuFra0).
      
      ## Note about locks (freeze) vs holds
      With locks or freezes, staking could use total balance of an account.
      But with holds, the account needs to be left with at least Existential
      Deposit in free balance. This would also affect nomination pools which
      till now has been able to stake all funds contributed to it. An
      alternate version of this PR is
      https://github.com/paritytech/polkadot-sdk/pull/5658 where staking
      pallet does not add any provider, but means pools and delegated-staking
      pallet has to provide for these accounts and makes the end to end logic
      (of provider and consumer ref) lot less intuitive and prone to bug.
      
      This PR now introduces requirement for stakers to maintain ED in their
      free balance. This helps with removing the bug prone incrementing and
      decrementing of consumers and providers.
      
      ## TODO
      - [x] Test: Vesting + governance locked funds can be staked.
      - [ ] can `Call::restore_ledger` be removed? @gpestana 
      - [x] Ensure unclaimed withdrawals is not affected by no provider for
      pool accounts.
      - [x] Investigate kusama accounts with balance between 0 and ED.
      - [x] Permissionless call to release lock.
      - [x] Migration of consumer (dec) and provider (inc) for direct stakers.
      - [x] force unstake if hold cannot be applied to all stake.
      - [x] Fix try state checks (it thinks nothing is staked for unmigrated
      ledgers).
      - [x] Bench `migrate_currency`.
      - [x] Virtual Staker migration test.
      - [x] Ensure total issuance is upto date when minting rewards.
      
      ## Followup
      - https://github.com/paritytech/polkadot-sdk/issues/5742
      
      ---------
      
      Co-authored-by: command-bot <>
      f5673cf2
    • chloefeal's avatar
      chore: fix typos (#6999) · e056586b
      chloefeal authored
      ✄
      -----------------------------------------------------------------------------
      
      Thank you for your Pull Request! :pray:
      
       Please make sure it follows the
      contribution guidelines outlined in [this
      
      document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md)
      and fill out the
      sections below. Once you're ready to submit your PR for review, please
      delete this section and leave only the text under
      the "Description" heading.
      
      # Description
      
      Hello, I fix some typos in logs and comments. Thank you very much.
      
      
      ## Integration
      
      *In depth notes about how this PR should be integrated by downstream
      projects. This part is mandatory, and should be
      reviewed by reviewers, if the PR does NOT have the `R0-Silent` label. In
      case of a `R0-Silent`, it can be ignored.*
      
      ## Review Notes
      
      *In depth notes about the **implementation** details of your PR. This
      should be the main guide for reviewers to
      understand your approach and effectively review it. If too long, use
      
      [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)*.
      
      *Imagine that someone who is depending on the old code wants to
      integrate your new code and the only information that
      they get is this section. It helps to include example usage and default
      value here, with a `diff` code-block to show
      possibly integration.*
      
      *Include your leftover TODOs, if any, here.*
      
      # Checklist
      
      * [ ] 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.
      * [ ] I have made corresponding changes to the documentation (if
      applicable)
      * [ ] I have added tests that prove my fix is effective or that my
      feature works (if applicable)
      
      You can remove the "Checklist" section once all have been checked. Thank
      you for your contribution!
      
      ✄
      -----------------------------------------------------------------------------
      
      Signed-off-by: default avatarchloefeal <188809157+chloefeal@users.noreply.github.com>
      e056586b
    • Javier Viola's avatar
      Migrate substrate zombienet test poc (#7178) · 77ad8abb
      Javier Viola authored
      Zombienet substrate tests PoC (using native provider).
      
      cc: @emamihe @alvicsam
      77ad8abb
    • Dastan's avatar
      [FRAME] `pallet_asset_tx_payment`: replace `AssetId` bound from `Copy` to `Clone` (#7194) · f7baa84f
      Dastan authored
      closes https://github.com/paritytech/polkadot-sdk/issues/6911
      f7baa84f
    • Giuseppe Re's avatar
      Update `parity-publish` to v0.10.4 (#7193) · 64abc745
      Giuseppe Re authored
      The changes from v0.10.3 are only related to dependencies version. This
      should fix some failing CIs.
      
      This PR also updates the Rust cache version in CI.
      64abc745
    • Liam Aharon's avatar
      Implement `pallet-asset-rewards` (#3926) · be2404cc
      Liam Aharon authored
      
      Closes #3149 
      
      ## Description
      
      This PR introduces `pallet-asset-rewards`, which allows accounts to be
      rewarded for freezing `fungible` tokens. The motivation for creating
      this pallet is to allow incentivising LPs.
      
      See the pallet docs for more info about the pallet.
      
      ## Runtime changes
      
      The pallet has been added to
      - `asset-hub-rococo`
      - `asset-hub-westend`
      
      The `NativeAndAssets` `fungibles` Union did not contain `PoolAssets`, so
      it has been renamed `NativeAndNonPoolAssets`
      
      A new `fungibles` Union `NativeAndAllAssets` was created to encompass
      all assets and the native token.
      
      ## TODO
      - [x] Emulation tests
      - [x] Fill in Freeze logic (blocked
      https://github.com/paritytech/polkadot-sdk/issues/3342) and re-run
      benchmarks
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarmuharem <ismailov.m.h@gmail.com>
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
      be2404cc
  5. Jan 15, 2025
  6. Jan 14, 2025
    • Sebastian Kunert's avatar
      Parachains: Use relay chain slot for velocity measurement (#6825) · d5539aa6
      Sebastian Kunert authored
      
      closes #3967 
      
      ## Changes
      We now use relay chain slots to measure velocity on chain. Previously we
      were storing the current parachain slot. Then in `on_state_proof` of the
      `ConsensusHook` we were checking how many blocks were athored in the
      current parachain slot. This works well when the parachain slot time and
      relay chain slot time is the same. With elastic scaling, we can have
      parachain slot times lower than that of the relay chain. In these cases
      we want to measure velocity in relation to the relay chain. This PR
      adjusts that.
      
      
      ##  Migration
      This PR includes a migration. Storage item `SlotInfo` of pallet
      `aura-ext` is renamed to `RelaySlotInfo` to better reflect its new
      content. A migration has been added that just kills the old storage
      item. `RelaySlotInfo` will be `None` initially but its value will be
      adjusted after one new relay chain slot arrives.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <git@kchr...>
      d5539aa6
    • Bastian Köcher's avatar
      5f391db8
    • Carlo Sala's avatar
      xcm: convert properly assets in xcmpayment apis (#7134) · 85c244f6
      Carlo Sala authored
      
      Port #6459 changes to relays as well, which were probably forgotten in
      that PR.
      Thanks!
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
      Co-authored-by: command-bot <>
      85c244f6
    • Sebastian Kunert's avatar
      CI: Only format umbrella crate during umbrella check (#7139) · ba36b2d2
      Sebastian Kunert authored
      The umbrella crate quick-check was always failing whenever there was
      something misformated in the whole codebase.
      This leads to an error that indicates that a new crate was added, even
      when it was not.
      
      After this PR we only apply `cargo fmt` to the newly generated umbrella
      crate `polkadot-sdk`. This results in this check being independent from
      the fmt job which should check the entire codebase.
      ba36b2d2