Skip to content
Snippets Groups Projects
  1. Nov 04, 2024
    • Iulian Barbu's avatar
      templates: make node compilation optional (#5954) · 2a849174
      Iulian Barbu authored
      # Description
      
      Closes #5940  
      
      ## Integration
      
      Node devs that rely on templates' nodes binaries for minimal or
      parachain would need to follow the updated templates' README.mds again
      to find how to build the nodes' binaries.
      
      ## Review Notes
      
      Conditional compilation of virtual workspaces would compile the
      `members` list as if we passed `--workspace` flag to `cargo build` ,
      except when adding a `default-members` list which will be used for any
      cargo command executed in the virtual workspace root. To build the full
      members list needs passing `--workspace` flag.
      
      Other options investigated:
      - feature guard the `node` crate by defining a feature in the `node`
      crate, but it feels too complex since all code needs to be feature
      guarded. I haven't tried it but technically speaking it might work. I
      think though it looks awkward and my opinion is that the alternative is
      better.
      - defining features in the virtual workspace's Cargo.toml doesn't work
      (thought that I might create a feature that will have a dependency on
      the `node` crate and then not passing the feature to cargo build results
      in ignoring the `node` crate)
      - skipping compilation by using an environment variable, read in the
      build script, that will exit compilation abruptly if not set, but I
      couldn't make it work.
      - exclude the crate from the members list and build it specifically by
      passing `--package minimal-template-node` flag to the `cargo build`
      command. This has the disadvantage of not allowing IDEs based on rust
      analyzer to index/compile the node crate.
      
      My conclusion is that any option would require two commands to build the
      template, one with the node and one without, and both must be included
      in the README or templates usage documentation. If it comes which ones
      to pick I am in favor of the `default-members` option, which requires
      minimal intervention and expresses how cargo commands are executed on
      top of the workspace members, and what's left out from regular usage.
      
      ### Testing
      
      Testing was conducted as described bellow:
      
      - [x] zombienet with `minimal-template-node` , `parachain-template-node`
      and `polkadot-omni-node`. Things work as expected.
      - [x] no chopsticks testing was conducted - feels a bit out of scope for
      OmniNode related docs and overall testing when promoting it over the
      templates' nodes.
      - [x] testing the changes for the sync templates workflow (ignore the
      added comment from the Cargo.tomls, it was removed here on this branch:
      [99bff3e2](https://github.com/paritytech/polkadot-sdk/pull/5954/commits/99bff3e2
      
      )):
      [minimal](https://github.com/paritytech-stg/polkadot-sdk-minimal-template/pull/22/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R9),
      [parachain](https://github.com/paritytech-stg/polkadot-sdk-parachain-template/pull/19/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R9),
      [solochain](https://github.com/paritytech-stg/polkadot-sdk-solochain-template/pull/17/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542R9).
      The links correspond to PRs opened by a bot after manually starting the
      sync-templates workflow on `paritytech-stg` org to test the end result
      of the `Cargo.toml` changes.
      
      ---------
      
      Signed-off-by: default avatarIulian Barbu <iulian.barbu@parity.io>
      Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
      2a849174
    • Giuseppe Re's avatar
      Refactor pallet `claims` (#6318) · 657b5503
      Giuseppe Re authored
      
      - [x] Removing `without_storage_info` and adding bounds on the stored
      types for pallet `claims` - issue
      https://github.com/paritytech/polkadot-sdk/issues/6289
      - [x] Migrating to benchmarking V2 -
      https://github.com/paritytech/polkadot-sdk/issues/6202
      
      ---------
      
      Co-authored-by: default avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
      657b5503
    • PG Herveou's avatar
      [eth-rpc] Fixes (#6317) · 7f80f452
      PG Herveou authored
      
      Various fixes for the release of eth-rpc & ah-westend-runtime
      
      - Bump asset-hub westend spec version
      - Fix the status of the Receipt to properly report failed transactions
      - Fix value conversion between native and eth decimal representation
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      7f80f452
    • Alin Dima's avatar
      collation-generation: use v2 receipts (#5908) · 68e05636
      Alin Dima authored
      
      Part of https://github.com/paritytech/polkadot-sdk/issues/5047
      
      Plus some cleanups
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: default avatarAndrei Sandu <54316454+sandreim@users.noreply.github.com>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      68e05636
  2. Nov 01, 2024
  3. Oct 31, 2024
  4. Oct 30, 2024
    • PG Herveou's avatar
      [pallet-revive] Add metrics to eth-rpc (#6288) · 5f782a4c
      PG Herveou authored
      
      Add metrics for eth-rpc
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
      5f782a4c
    • Cyrill Leutwiler's avatar
      [pallet-revive] implement the block hash API (#6246) · 2b6b6964
      Cyrill Leutwiler authored
      
      - Bound T::Hash to H256
      - Implement the block hash API
      
      ---------
      
      Signed-off-by: default avatarxermicus <cyrill@parity.io>
      Signed-off-by: default avatarCyrill Leutwiler <bigcyrill@hotmail.com>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      2b6b6964
    • Serban Iorga's avatar
      Publish `polkadot-omni-node` binary (#6057) · 01936b34
      Serban Iorga authored
      
      Closes https://github.com/paritytech/polkadot-sdk/issues/5566
      
      Publish the `polkadot-omni-node` binary
      
      This is a best effort. I'm not very familiar with the release /
      publishing process and also not sure how to test this.
      @paritytech/release-engineering can you take a look on this PR please ?
      
      ---------
      
      Co-authored-by: default avatarEgorPopelyaev <egor@parity.io>
      01936b34
    • Cyrill Leutwiler's avatar
      [pallet-revive] code size API (#6260) · 7aa3143f
      Cyrill Leutwiler authored
      
      This PR implements the contract API to query the code size of a given
      address.
      
      ---------
      
      Signed-off-by: default avatarCyrill Leutwiler <bigcyrill@hotmail.com>
      Signed-off-by: default avatarxermicus <cyrill@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarPG Herveou <pgherveou@gmail.com>
      7aa3143f
    • Sebastian Kunert's avatar
      Add overhead benchmark to frame-omni-bencher (#5891) · 40547f9f
      Sebastian Kunert authored
      
      # Benchmark Overhead Command for Parachains
      
      This implements the `benchmark overhead` command for parachains. Full
      context is available at:
      https://github.com/paritytech/polkadot-sdk/issues/5303. Previous attempt
      was this https://github.com/paritytech/polkadot-sdk/pull/5283, but here
      we have integration into frame-omni-bencher and improved tooling.
      
      ## Changes Overview
      
      Users are now able to use `frame-omni-bencher` to generate
      `extrinsic_weight.rs` and `block_weight.rs` files for their runtime. The
      core logic for generating these remains untouched; this PR provides
      mostly machinery to make it work for parachains at all.
      
      Similar to the pallet benchmarks, we gain the option to benchmark based
      on just a runtime:
      
      ```
      frame-omni-bencher v1 benchmark overhead --runtime {{runtime}}
      ```
      
      or with a spec:
      
      ```
      frame-omni-bencher v1 benchmark overhead --chain {{spec}} --genesis-builder spec
      ```
      
      In this case, the genesis state is generated from the runtime presets.
      However, it is also possible to use `--chain` and genesis builder `spec`
      to generate the genesis state from the chain spec.
      
      Additionally, we use metadata to perform some checks based on the
      pallets the runtime exposes:
      
      - If we see the `ParaInherent` pallet, we assume that we are dealing
      with a relay chain. This means that we don't need proof recording during
      import (since there is no storage weight).
      - If we detect the `ParachainSystem` pallet, we assume that we are
      dealing with a parachain and take corresponding actions like patching a
      para id into the genesis state.
      
      On the inherent side, I am currently supplying the standard inherents
      every parachain needs.
      
      In the current state, `frame-omni-bencher` supports all system chains.
      In follow-up PRs, we could add additional inherents to increase
      compatibility.
      
      Since we are building a block during the benchmark, we also need to
      build an extrinsic. By default, I am leveraging subxt to build the xt
      dynamically. If a chain is not compatible with the `SubstrateConfig`
      that comes with `subxt`, it can provide a custom extrinsic builder to
      benchmarking-cli. This requires either a custom bencher implementation
      or an integration into the parachains node.
      
      Also cumulus-test-runtime has been migrated to provide genesis configs.
      
      ## Chain Compatibility
      The current version here is compatible with the system chains and common
      substrate chains. The way to go for others would be to customize the
      frame-omni-bencher by providing a custom extrinsicbuilder. I did an
      example implementation that works for mythical:
      https://github.com/skunert/mythical-bencher
      
      ## Follow-Ups
      - After #6040 is finished, we should integrate this here to make the
      tooling truly useful. In the current form, the state is fairly small and
      not representative.
      
      ## How to Review
      I recommend starting from
      [here](https://github.com/paritytech/polkadot-sdk/pull/5891/files#diff-50830ff756b3ac3403b7739d66c9e3a5185dbea550669ca71b28d19c7a2a54ecR264),
      this method is the main entry point for omni-bencher and `polkadot`
      binary.
      
      TBD:
      - [x] PRDoc
      
      ---------
      
      Co-authored-by: default avatarMichal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
      40547f9f
    • Alexander Samusev's avatar
      [ci] Add publish docker for eth-rpc (#6286) · 6f96f721
      Alexander Samusev authored
      close https://github.com/paritytech/ci_cd/issues/1073
      6f96f721
    • Xavier Lau's avatar
      Migrate pallet-utility to benchmark v2 (#6276) · 06debd0b
      Xavier Lau authored
      
      Part of:
      
      - #6202.
      
      ---------
      
      Co-authored-by: default avatarDónal Murray <donalm@seadanda.dev>
      06debd0b
    • Tsvetomir Dimitrov's avatar
      Bump a timeout in zombienet coretime smoke test (#6268) · 4e247334
      Tsvetomir Dimitrov authored
      
      polkadot/zombienet_tests/smoke/0004-coretime-smoke-test.zndsl still
      timeouts on CI from time to time. Bumping the timeout a bit more.
      
      Related to https://github.com/paritytech/polkadot-sdk/issues/6226
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      4e247334
    • PG Herveou's avatar
      [pallet-revive] rpc server add docker file (#6278) · 3d50716a
      PG Herveou authored
      
      Add a docker for pallet-revive eth-rpc
      
       Tested with 
      ```
      sudo docker build . -t eth-rpc -f substrate/frame/revive/rpc/Dockerfile
      sudo docker run --network="host" -e RUST_LOG="info,eth-rpc=debug" eth-rpc
      ```
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
      3d50716a
  5. Oct 29, 2024
  6. Oct 28, 2024
  7. Oct 25, 2024
    • Andrei Sandu's avatar
      Switch node side to v2 candidate receipts (#5679) · 4c618a83
      Andrei Sandu authored
      
      on top of https://github.com/paritytech/polkadot-sdk/pull/5423
      
      This PR implements the plumbing work required for
      https://github.com/paritytech/polkadot-sdk/issues/5047 . I also added
      additional helper methods gated by feature "test" in primitives.
      
      TODO:
      - [x] PRDoc
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      4c618a83
    • Adrian Catangiu's avatar
      asset-hubs: simplify xcm-config (#6222) · a072ce81
      Adrian Catangiu authored
      
      `ForeignCreatorsSovereignAccountOf` is used by `ForeignCreators` filter
      to convert location to `AccountId`, _after_ `ForeignCreators::IsForeign`
      filter passes for an (asset, location) pair.
      
      The `IsForeign` filter is the actual differentiator, so if a location
      passes it, we should support converting it to an `AccountId`.
      
      As such, this commit replaces `ForeignCreatorsSovereignAccountOf`
      converter with the more general `LocationToAccountId` converter.
      
      Signed-off-by: default avatarAdrian Catangiu <adrian@parity.io>
      a072ce81
    • Branislav Kontur's avatar
      Fix migrations for pallet-xcm (#6148) · efd66030
      Branislav Kontur authored
      
      Relates to: https://github.com/paritytech/polkadot-sdk/pull/4826
      Relates to: https://github.com/paritytech/polkadot-sdk/issues/3214
      
      ## Description
      
      `pallet-xcm` stores some operational data that uses `Versioned*` XCM
      types. When we add a new XCM version (XV), we deprecate XV-2 and remove
      XV-3. Without proper migration, this can lead to issues with
      [undecodable
      storage](https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092),
      as was identified on the XCMv5 branch where XCMv2 was removed.
      
      This PR extends the existing `MigrateToLatestXcmVersion` to include
      migration for the `Queries`, `LockedFungibles`, and
      `RemoteLockedFungibles` storage types. Additionally, more checks were
      added to `try_state` for these types.
      
      ## TODO
      - [x] create tracking issue for `polkadot-fellows`
      https://github.com/polkadot-fellows/runtimes/issues/492
      - [x] Add missing `MigrateToLatestXcmVersion` for westend
      - [x] fix pallet-xcm `Queries`
      - fails for Westend
      https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092
      - `V2` was removed from `Versioned*` stuff, but we have a live data with
      V2 e.g. Queries - e.g. Kusama or Polkadot relay chains
      ```
      VersionNotifier: {
              origin: {
                V2: {
                  parents: 0
                  interior: {
                    X1: {
                      Parachain: 2,124
                    }
                  }
                }
              }
              isActive: true
            } 
      ```
      
      ![image](https://github.com/user-attachments/assets/f59f761b-46a7-4def-8aea-45c4e41c0a00)
      - [x] fix also for `RemoteLockedFungibles` 
      - [x] fix also for `LockedFungibles`
      
      ## Follow-ups
      
      - [ ] deploy on Westend chains before XCMv5
      - [ ] https://github.com/paritytech/polkadot-sdk/issues/6188
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
      efd66030
    • Alexander Theißen's avatar
      pallet-revive: Add stateful address mapping (#6096) · 07963262
      Alexander Theißen authored
      
      Fixes #5576
      
      This allows contracts to be used with an AccountId32 through normal
      extrinsics and not only through the eth compat layer. It works by adding
      a new extrinsic `map_account` that lets people register their
      AccountId32.
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarCyrill Leutwiler <cyrill@parity.io>
      07963262
    • Shoyu Vanilla (Flint)'s avatar
      substrate-offchain: upgrade hyper to v1 (#5919) · 5a142856
      Shoyu Vanilla (Flint) authored
      Closes #4896
      5a142856
    • Michal Kucharczyk's avatar
      `RuntimeGenesiConfig`: json macro added (#5813) · 7e996211
      Michal Kucharczyk authored
      This PR adds `build_struct_json_patch` which helps to generate a JSON
      used for preset.
      
      Here is doc and example:
      
      https://github.com/paritytech/polkadot-sdk/blob/d868b858/substrate/frame/support/src/generate_genesis_config.rs#L168-L266
      
      And real-world usage:
      
      https://github.com/paritytech/polkadot-sdk/blob/d868b858
      
      /cumulus/parachains/runtimes/assets/asset-hub-rococo/src/genesis_config_presets.rs#L37-L61
      
      Closes #5700
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
      7e996211
  8. Oct 24, 2024