Skip to content
Snippets Groups Projects
  1. Jan 27, 2025
    • christopher k's avatar
      Add development chain-spec file for minimal/parachain templates for Omni Node compatibility (#6529) · d85147d0
      christopher k authored
      
      # Description
      
      This PR adds development chain specs for the minimal and parachain
      templates.
      [#6334](https://github.com/paritytech/polkadot-sdk/issues/6334)
      
      
      ## Integration
      
      This PR adds development chain specs for the minimal and para chain
      template runtimes, ensuring synchronization with runtime code. It
      updates zombienet-omni-node.toml, zombinet.toml files to include valid
      chain spec paths, simplifying configuration for zombienet in the
      parachain and minimal template.
      
      ## Review Notes
      
      1. Overview of Changes:
      - Added development chain specs for use in the minimal and parachain
      template.
      - Updated zombienet-omni-node.toml and zombinet.toml files in the
      minimal and parachain templates to include paths to the new dev chain
      specs.
      
      2. Integration Guidance:
      **NB: Follow the templates' READMEs from the polkadot-SDK master branch.
      Please build the binaries and runtimes based on the polkadot-SDK master
      branch.**
      - Ensure you have set up your runtimes `parachain-template-runtime` and
      `minimal-template-runtime`
      - Ensure you have installed the nodes required ie
      `parachain-template-node` and `minimal-template-node`
      - Set up [Zombinet](https://paritytech.github.io/zombienet/intro.html)
      - For running the parachains, you will need to install the polkadot
      `cargo install --path polkadot` remember from the polkadot-SDK master
      branch.
      - Inside the template folders minimal or parachain, run the command to
      start with `Zombienet with Omni Node`, `Zombienet with
      minimal-template-node` or `Zombienet with parachain-template-node`
      
      *Include your leftover TODOs, if any, here.*
      * [ ] Test the syncing of chain specs with runtime's code.
      
      ---------
      
      Signed-off-by: default avatarEleisonC <ckalule7@gmail.com>
      Co-authored-by: default avatarIulian Barbu <14218860+iulianbarbu@users.noreply.github.com>
      Co-authored-by: default avatarAlexander Samusev <41779041+alvicsam@users.noreply.github.com>
      d85147d0
    • dharjeezy's avatar
      `Arc` definition in `TransactionPool` (#7042) · b2004ed8
      dharjeezy authored
      
      closes #5978
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarMichal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
      b2004ed8
    • Dmitry Markin's avatar
      [sync] Let new subscribers know about already connected peers (backward-compatible) (#7344) · ee30ec72
      Dmitry Markin authored
      
      Revert https://github.com/paritytech/polkadot-sdk/pull/7011 and replace
      it with a backward-compatible solution suitable for backporting to a
      release branch.
      
      ### Review notes
      It's easier to review this PR per commit: the first commit is just a
      revert, so it's enough to review only the second one, which is almost a
      one-liner.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
      ee30ec72
  2. Jan 26, 2025
  3. Jan 25, 2025
    • thiolliere's avatar
      Improve debugging by using `#[track_caller]` in system `assert_last_event` and... · 17ae0627
      thiolliere authored
      Improve debugging by using `#[track_caller]` in system `assert_last_event` and `assert_has_event` (#7142)
      
      Without track caller the error message of the assert points to the
      `assert_last_event` function, which is not useful.
      ```
      thread 'tests::set_metadata_works' panicked at /home/gui/Developpement/polkadot-sdk/substrate/frame/system/src/lib.rs:2034:9:
      assertion `left == right` failed: expected event RuntimeEvent::Referenda(Event::MetadataSet { index: 0, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa }) is not equal to the last event RuntimeEvent::Referenda(Event::MetadataSet { index: 1, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa })
        left: RuntimeEvent::Referenda(Event::MetadataSet { index: 1, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa })
       right: RuntimeEvent::Referenda(Event::MetadataSet { index: 0, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa })
      ```
      
      With the track caller the error message points to the caller, showing
      the source of the error:
      ```
      thread 'tests::set_metadata_works' panicked at substrate/frame/referenda/src/tests.rs:639:9:
      assertion `left == right` failed: expected event RuntimeEvent::Referenda(Event::MetadataSet { index: 0, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa }) is not equal to the last event RuntimeEvent::Referenda(Event::MetadataSet { index: 1, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa })
        left: RuntimeEvent::Referenda(Event::MetadataSet { index: 1, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa })
       right: RuntimeEvent::Referenda(Event::MetadataSet { index: 0, hash: 0xbb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aa })
      ```
      
      I also improved the error message to include a warning when checking
      events on block number zero.
      17ae0627
    • thiolliere's avatar
      `set_validation_data` register weight manually, do not use refund when the pre... · 682f8cd2
      thiolliere authored
      `set_validation_data` register weight manually, do not use refund when the pre dispatch is zero. (#7327)
      
      Related https://github.com/paritytech/polkadot-sdk/issues/6772
      
      For an extrinsic, in the post dispatch info, the actual weight is only
      used to reclaim unused weight. If the actual weight is more than the pre
      dispatch weight, then the extrinsic is using the minimum, e.g., the
      weight used registered in pre dispatch.
      
      In parachain-system pallet one call is `set_validation_data`. This call
      is returning an actual weight, but the pre-dispatch weight is 0.
      
      This PR fix the disregard of actual weight of `set_validation_data` by
      registering it manually.
      682f8cd2
  4. Jan 24, 2025
  5. Jan 23, 2025
    • Andrei Sandu's avatar
      Deprecate ParaBackingState API (#6867) · e9393a9a
      Andrei Sandu authored
      
      Currently the `para_backing_state` API is used only by the prospective
      parachains subsystems and returns 2 things: the constraints for
      parachain blocks and the candidates pending availability.
      
      This PR deprecates `para_backing_state` and introduces a new
      `backing_constraints` API that can be used together with
      `candidates_pending_availability` to get the same information provided
      by `para_backing_state`.
      
      TODO:
      - [x] PRDoc
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: command-bot <>
      e9393a9a
    • Maksym H's avatar
      Fix setting the image properly (#7315) · 3a7f3c0a
      Maksym H authored
      Fixed condition which sets weights/large images
      3a7f3c0a
    • Maksym H's avatar
      Refactor command bot and drop rejecting non paritytech members (#7231) · 6091330a
      Maksym H authored
      Aims to 
      - close #7049 
      - close https://github.com/paritytech/opstooling/issues/449
      - close https://github.com/paritytech/opstooling/issues/463
      
      What's changed:
      - removed is paritytech member check as required prerequisite to run a
      command
      - run the cmd.py script taking it from master, if someone who run this
      is not a member of paritytech, and from current branch, if is a member.
      That keeps the developer experience & easy testing if paritytech members
      are contributing to cmd.py
      - isolate the cmd job from being able to access GH App token or PR
      token- currently the fmt/bench/prdoc are being run with limited
      permissions scope, just to generate output, which then is uploaded to
      artifacts, and then the other job which doesn't run any files from repo,
      does a commit/push more securely
      6091330a
    • Alin Dima's avatar
      bump lookahead to 3 for testnet genesis (#7252) · cfc5b6f5
      Alin Dima authored
      This is the right value after
      https://github.com/paritytech/polkadot-sdk/pull/4880, which corresponds
      to an allowedAncestryLen of 2 (which is the default)
      
      WIll fix https://github.com/paritytech/polkadot-sdk/issues/7105
      cfc5b6f5
    • Branislav Kontur's avatar
      Bridges small nits/improvements (#7307) · 085da479
      Branislav Kontur authored
      This PR contains small fixes identified during work on the larger PR:
      https://github.com/paritytech/polkadot-sdk/issues/6906.
      
      ---------
      
      Co-authored-by: command-bot <>
      085da479
    • Alisher A. Khassanov's avatar
      Add `offchain_localStorageClear` RPC method (#7266) · 66bd26d3
      Alisher A. Khassanov authored
      
      # Description
      
      Closes https://github.com/paritytech/polkadot-sdk/issues/7265.
      
      ## Integration
      
      Requires changes in
      `https://github.com/polkadot-js/api/packages/{rpc-augment,types-support,types}`
      to be visible in Polkadot\Substrate Portal and in other libraries where
      we should explicitly state RPC methods.
      
      Accompany PR to `polkadot-js/api`:
      https://github.com/polkadot-js/api/pull/6070.
      
      ## Review Notes
      
      Please put the right label on my PR.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      66bd26d3
    • runcomet's avatar
      Balances: Configurable Number of Genesis Accounts with Specified Balances for Benchmarking (#6267) · 04847d51
      runcomet authored
      
      # Derived Dev Accounts
      
      Resolves https://github.com/paritytech/polkadot-sdk/issues/6040
      
      ## Description
      This update introduces support for creating an arbitrary number of
      developer accounts at the genesis block based on a specified derivation
      path. This functionality is gated by the runtime-benchmarks feature,
      ensuring it is only enabled during benchmarking scenarios.
      
      ### Key Features
      - Arbitrary Dev Accounts at Genesis: Developers can now specify any
      number of accounts to be generated at genesis using a hard derivation
      path.
      
      - Default Derivation Path: If no derivation path is provided (i.e., when
      `Option<dev_accounts: (..., None)>` is set to `Some` at genesis), the
      system will default to the path `//Sender//{}`.
      
      - No Impact on Total Token Issuance: Developer accounts are excluded
      from the total issuance of the token supply at genesis, ensuring they do
      not affect the overall balance or token distribution.
      
      polkadot address: 14SRqZTC1d8rfxL8W1tBTnfUBPU23ACFVPzp61FyGf4ftUFg
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
      04847d51
    • Egor_P's avatar
      [Release|CI/CD] Download only linux artefacts for deb package build (#7271) · fb2e414f
      Egor_P authored
      This PR contains a fix for the rc-build release pipeline. The problem
      was, that for the deb package build were all the artefacts downloaded
      and merged together, what could lead to the issue, that the polkadot
      linux binary was overwritten with the macos one.
      fb2e414f
    • PG Herveou's avatar
      [pallet-revive] fee estimation fixes (#7281) · 5772b9db
      PG Herveou authored
      - Fix the EVM fee cost estimation.
      The estimation shown in EVM wallet was using Native instead of EVM
      decimals
      - Remove the precise code length estimation in dry run call.
      Over-estimating is fine, since extra gas is refunded anyway.
      - Ensure that the estimated fee calculated from gas_price x gas use the
      encoded weight & deposit limit instead of the exact one calculated by
      the dry-run. Else we can end up with a fee that is lower than the actual
      fee paid by the user
      
      ---------
      
      Co-authored-by: command-bot <>
      5772b9db
  6. Jan 22, 2025
    • FereMouSiopi's avatar
      Migrate `pallet-insecure-randomness-collective-flip` to umbrella crate (#6738) · 89b02284
      FereMouSiopi authored
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/6504
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      89b02284
    • Alexandru Vasile's avatar
      net/libp2p: Enforce outbound request-response timeout limits (#7222) · fd64a1e7
      Alexandru Vasile authored
      This PR enforces that outbound requests are finished within the
      specified protocol timeout.
      
      The stable2412 version running libp2p 0.52.4 contains a bug which does
      not track request timeouts properly:
      - https://github.com/libp2p/rust-libp2p/pull/5429
      
      The issue has been detected while submitting libp2p -> litep2p requests
      in kusama. This aims to check that pending outbound requests have not
      timedout. Although the issue has been fixed in libp2p, there might be
      other cases where this may happen. For example:
      - https://github.com/libp2p/rust-libp2p/pull/5417
      
      For more context see:
      https://github.com/paritytech/polkadot-sdk/issues/7076#issuecomment-2596085096
      
      
      1. Ideally, the force-timeout mechanism in this PR should never be
      triggered in production. However, origin/stable2412 occasionally
      encounters this issue. When this happens, 2 warnings may be generated:
      - one warning introduced by this PR wrt force timeout terminating the
      request
      - possible one warning when the libp2p decides (if at all) to provide
      the response back to substrate (as mentioned by @alexggh
      [here](https://github.com/paritytech/polkadot-sdk/pull/7222/files#diff-052aeaf79fef3d9a18c2cfd67006aa306b8d52e848509d9077a6a0f2eb856af7L769)
      and
      [here](https://github.com/paritytech/polkadot-sdk/pull/7222/files#diff-052aeaf79fef3d9a18c2cfd67006aa306b8d52e848509d9077a6a0f2eb856af7L842)
      
      2. This implementation does not propagate to the substrate service the
      `RequestFinished { error: .. }`. That event is only used internally by
      substrate to increment metrics. However, we don't have the peer
      information available to propagate the event properly when we
      force-timeout the request. Considering this should most likely not
      happen in production (origin/master) and that we'll be able to extract
      information by warnings, I would say this is a good tradeoff for code
      simplicity:
      
      
      https://github.com/paritytech/polkadot-sdk/blob/06e3b5c6
      
      /substrate/client/network/src/service.rs#L1543
      
      
      ### Testing
      
      Added a new test to ensure the timeout is reached properly, even if
      libp2p does not produce a response in due time.
      
      I've also transitioned the tests to using `tokio::test` due to a
      limitation of
      [CI](https://github.com/paritytech/polkadot-sdk/actions/runs/12832055737/job/35784043867)
      
      ```
      --- TRY 1 STDERR:        sc-network request_responses::tests::max_response_size_exceeded ---
      thread 'request_responses::tests::max_response_size_exceeded' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/time/interval.rs:139:26:
      there is no reactor running, must be called from the context of a Tokio 1.x runtime
      ```
      
      
      
      cc @paritytech/networking
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <alexandru.vasile@parity.io>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      fd64a1e7
    • Mrisho Lukamba's avatar
      Unify Import verifier usage across parachain template and omninode (#7195) · 634a17b6
      Mrisho Lukamba authored
      Closes #7055
      
      @skunert @bkchr
      
      
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
      634a17b6
    • Serban Iorga's avatar
      Fix bridge tests image (#7292) · 350a6c4c
      Serban Iorga authored
      Fix bridge tests image
      350a6c4c
    • Stephane Gurgenidze's avatar
      collation-generation: resolve mismatch between descriptor and commitments core index (#7104) · 4eb92288
      Stephane Gurgenidze authored
      ## Issue
      [[#7107] Core Index Mismatch in Commitments and
      Descriptor](https://github.com/paritytech/polkadot-sdk/issues/7107)
      
      ## Description
      This PR resolves a bug where normal (non-malus) undying collators failed
      to generate and submit collations, resulting in the following error:
      
      `ERROR tokio-runtime-worker parachain::collation-generation: Failed to
      construct and distribute collation: V2 core index check failed: The core
      index in commitments doesn't match the one in descriptor.`
      
      More details about the issue and reproduction steps are described in the
      [related issue](https://github.com/paritytech/polkadot-sdk/issues/7107).
      
      ## Summary of Fix
      - When core selectors are provided in the UMP signals, core indexes will
      be chosen using them;
      - The fix ensures that functionality remains unchanged for parachains
      not using UMP signals;
      - Added checks to stop processing if the same core is selected
      repeatedly.
      
      ## TODO
      - [X] Implement the fix;
      - [x] Add tests;
      - [x] Add PRdoc.
      4eb92288
    • Serban Iorga's avatar
      Enable BEEFY `report_fork_voting()` (#6856) · 1bdb817f
      Serban Iorga authored
      Related to https://github.com/paritytech/polkadot-sdk/issues/4523
      
      Follow-up for: https://github.com/paritytech/polkadot-sdk/pull/5188
      
      Reopening https://github.com/paritytech/polkadot-sdk/pull/6732 as a new
      PR
      
      ---------
      
      Co-authored-by: command-bot <>
      1bdb817f
  7. Jan 21, 2025
  8. 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