Skip to content
Snippets Groups Projects
  1. Mar 05, 2025
  2. Feb 28, 2025
  3. Feb 25, 2025
  4. Feb 21, 2025
    • 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 the on-chain code does not reference the
      BeaconState directly (only indirectly through merkle proofs), it is not
      a concern. Off-chain relayers use the BeaconState to generate proofs,
      and so the relayer code has been updated accordingly.
      
      ### Companion PR for off-chain relayers
      https://github.com/Snowfork/snowbridge/pull/1283
      
      ---------
      
      Co-authored-by: claravanstaden <Cats 4 life!>
      Co-authored-by: default avatarRon <yrong1997@gmail.com>
      Co-authored-by: default avatarVincent Geddes <vincent@snowfork.com>
      Co-authored-by: default avatarAlistair Singh <alistair.singh7@gmail.com>
      Co-authored-by: default avatarVincent Geddes <117534+vgeddes@users.noreply.github.com>
  5. Feb 20, 2025
    • 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 defining a `mock` runtime. I opted for silencing the warning
      in this case rather than adding not needed features.
      
      For the benchmarking ui tests I opted for adding the `runtime-benchmark`
      feature to the `Cargo.toml`.
      
      ## Failing UI test
      
      I am bumping the `trybuild` version and regenerating the ui tests. The
      old version seems to be incompatible. This requires us to pass
      `deny_warnings` in `CARGO_ENCODED_RUSTFLAGS` as `RUSTFLAGS` is ignored
      in the new version.
      
      ## Removing toolchain file from the pallet revive fixtures
      
      This is no longer needed since the latest stable will compile them fine
      using the `RUSTC_BOOTSTRAP=1`.
      
      ---------
      
      Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  6. Feb 19, 2025
  7. Feb 18, 2025
  8. Feb 10, 2025
  9. Jan 29, 2025
  10. Jan 26, 2025
  11. Jan 23, 2025
    • 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 <>
    • 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>
  12. Jan 20, 2025
  13. Jan 16, 2025
    • 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>
  14. Jan 07, 2025
  15. Jan 06, 2025
  16. Dec 20, 2024
    • Xavier Lau's avatar
      Reorder dependencies' keys (#6967) · a843d15e
      Xavier Lau authored
      
      It doesn't make sense to only reorder the features array.
      
      For example:
      
      This makes it hard for me to compare the dependencies and features,
      especially some crates have a really really long dependencies list.
      ```toml​
      [dependencies]
      c = "*"
      a = "*"
      b = "*"
      
      [features]
      std = [
        "a",
        "b",
        "c",
      ]
      ```
      
      This makes my life easier.
      ```toml​
      [dependencies]
      a = "*"
      b = "*"
      c = "*"
      
      [features]
      std = [
        "a",
        "b",
        "c",
      ]
      ```
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>
  17. Dec 12, 2024
  18. Dec 11, 2024
    • Alexander Theißen's avatar
      snowbridge: Update alloy-core (#6808) · da2dd9b7
      Alexander Theißen authored
      I am planning to use `alloy_core` to implement precompile support in
      `pallet_revive`. I noticed that it is already used by snowbridge. In
      order to unify the dependencies I did the following:
      
      1. Switch to the `alloy-core` umbrella crate so that we have less
      individual dependencies to update.
      2. Bump the latest version and fixup the resulting compile errors.
  19. Dec 10, 2024
    • Ron's avatar
      XCMv5: Fix for compatibility with V4 (#6503) · fe4846f5
      Ron authored
      ## Description
      
      Our smoke tests transfer `WETH` from Sepolia to Westend-AssetHub breaks,
      try to reregister `WETH` on AH but fails as following:
      
      
      https://bridgehub-westend.subscan.io/xcm_message/westend-4796d6b3600aca32ef63b9953acf6a456cfd2fbe
      
      https://assethub-westend.subscan.io/extrinsic/9731267-0?event=9731267-2
      
      The reason is that the transact call encoded on BH to register the asset
      
      https://github.com/paritytech/polkadot-sdk/blob/a77940ba
      
      /bridges/snowbridge/primitives/router/src/inbound/mod.rs#L282-L289
      ```
      0x3500020209079edaa8020300fff9976782d46cc05630d1f6ebab18b2324d6b1400ce796ae65569a670d0c1cc1ac12515a3ce21b5fbf729d63d7b289baad070139d01000000000000000000000000000000
      ```
      
      the `asset_id` which is the xcm location can't be decoded on AH in V5
      
      Issue initial post in
      https://matrix.to/#/!qUtSTcfMJzBdPmpFKa:parity.io/$RNMAxIIOKGtBAqkgwiFuQf4eNaYpmOK-Pfw4d6vv1aU?via=parity.io&via=matrix.org&via=web3.foundation
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
    • Joseph Zhao's avatar
      Remove AccountKeyring everywhere (#5899) · 311ea438
      Joseph Zhao authored
      
      Close: #5858
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • Branislav Kontur's avatar
      Bridges - revert-back congestion mechanism (#6781) · 8f4b99cf
      Branislav Kontur authored
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/5551
      
      ## Description
      
      With [permissionless lanes
      PR#4949](https://github.com/paritytech/polkadot-sdk/pull/4949), the
      congestion mechanism based on sending
      `Transact(report_bridge_status(is_congested))` from
      `pallet-xcm-bridge-hub` to `pallet-xcm-bridge-hub-router` was replaced
      with a congestion mechanism that relied on monitoring XCMP queues.
      However, this approach could cause issues, such as suspending the entire
      XCMP queue instead of isolating the affected bridge. This PR reverts
      back to using `report_bridge_status` as before.
      
      ## TODO
      - [x] benchmarks
      - [x] prdoc
      
      ## Follow-up
      
      https://github.com/paritytech/polkadot-sdk/pull/6231
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
    • Francisco Aguirre's avatar
      Add fallback_max_weight to snowbridge Transact (#6792) · 4fc92486
      Francisco Aguirre authored
      
      We removed the `require_weight_at_most` field and later changed it to
      `fallback_max_weight`.
      This was to have a fallback when sending a message to v4 chains, which
      happens in the small time window when chains are upgrading.
      We originally put no fallback for a message in snowbridge's inbound
      queue but we should have one.
      This PR adds it.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
  20. Dec 09, 2024
    • Adrian Catangiu's avatar
      xcm-executor: take transport fee from transferred assets if necessary (#4834) · e79fd2bb
      Adrian Catangiu authored
      
      # Description
      
      Sending XCM messages to other chains requires paying a "transport fee".
      This can be paid either:
      - from `origin` local account if `jit_withdraw = true`,
      - taken from Holding register otherwise.
      
      This currently works for following hops/scenarios:
      1. On destination no transport fee needed (only sending costs, not
      receiving),
      2. Local/originating chain: just set JIT=true and fee will be paid from
      signed account,
      3. Intermediary hops - only if intermediary is acting as reserve between
      two untrusted chains (aka only for `DepositReserveAsset` instruction) -
      this was fixed in https://github.com/paritytech/polkadot-sdk/pull/3142
      
      But now we're seeing more complex asset transfers that are mixing
      reserve transfers with teleports depending on the involved chains.
      
      # Example
      
      E.g. transferring DOT between Relay and parachain, but through AH (using
      AH instead of the Relay chain as parachain's DOT reserve).
      
      In the `Parachain --1--> AssetHub --2--> Relay` scenario, DOT has to be
      reserve-withdrawn in leg `1`, then teleported in leg `2`.
      On the intermediary hop (AssetHub), `InitiateTeleport` fails to send
      onward message because of missing transport fees. We also can't rely on
      `jit_withdraw` because the original origin is lost on the way, and even
      if it weren't we can't rely on the user having funded accounts on each
      hop along the way.
      
      # Solution/Changes
      
      - Charge the transport fee in the executor from the transferred assets
      (if available),
      - Only charge from transferred assets if JIT_WITHDRAW was not set,
      - Only charge from transferred assets if unless using XCMv5 `PayFees`
      where we do not have this problem.
      
      # Testing
      
      Added regression tests in emulated transfers.
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/4832
      Fixes https://github.com/paritytech/polkadot-sdk/issues/6637
      
      ---------
      
      Signed-off-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
  21. Dec 08, 2024
  22. Dec 05, 2024
    • Francisco Aguirre's avatar
      Added fallback_max_weight to Transact for sending messages to V4 chains (#6643) · f31c70aa
      Francisco Aguirre authored
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/6585
      
      Removing the `require_weight_at_most` parameter in V5 Transact had only
      one problem. Converting a message from V5 to V4 to send to chains that
      didn't upgrade yet. The conversion would not know what weight to give to
      the Transact, since V4 and below require it.
      
      To fix this, I added back the weight in the form of an `Option<Weight>`
      called `fallback_max_weight`. This can be set to `None` if you don't
      intend to deal with a chain that hasn't upgraded yet. If you set it to
      `Some(_)`, the behaviour is the same. The plan is to totally remove this
      in V6 since there will be a good conversion path from V6 to V5.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
  23. Dec 03, 2024
  24. Nov 28, 2024
  25. Nov 20, 2024
    • Branislav Kontur's avatar
      Bridges testing improvements (#6536) · bd0d0cde
      Branislav Kontur authored
      
      This PR includes:  
      - Refactored integrity tests to support standalone deployment of
      `pallet-bridge-messages`.
      - Refactored the `open_and_close_bridge_works` test case to support
      multiple scenarios, such as:
        1. A local chain opening a bridge.  
        2. Sibling parachains opening a bridge.  
        3. The relay chain opening a bridge.  
      - Previously, we added instance support for `pallet-bridge-relayer` but
      overlooked updating the `DeliveryConfirmationPaymentsAdapter`.
      
      ---------
      
      Co-authored-by: default avatarGitHub Action <action@github.com>
  26. Nov 14, 2024
    • georgepisaltu's avatar
      Follow up work on `TransactionExtension` - fix weights and clean up `UncheckedExtrinsic` (#6418) · ae4b68b3
      georgepisaltu authored
      Follow up to https://github.com/paritytech/polkadot-sdk/pull/3685
      Partially fixes https://github.com/paritytech/polkadot-sdk/issues/6403
      
      The main PR introduced bare support for the new extension version byte
      as well as extension weights and benchmarking.
      
      This PR:
      - Removes the redundant extension version byte from the signed v4
      extrinsic, previously unused and defaulted to 0.
      - Adds the extension version byte to the inherited implication passed to
      `General` transactions.
      - Whitelists the `pallet_authorship::Author`, `frame_system::Digest` and
      `pallet_transaction_payment::NextFeeMultiplier` storage items as they
      are read multiple times by extensions for each transaction, but are hot
      in memory and currently overestimate the weight.
      - Whitelists the benchmark caller for `CheckEra` and `CheckGenesis` as
      the reads are performed for every transaction and overestimate the
      weight.
      - Updates the umbrella frame weight...
  27. Nov 13, 2024
    • Branislav Kontur's avatar
      Fixed bridges zombienet tests because of removed NetworkId::Rococo/Westend from xcm::v5 (#6465) · bff395f8
      Branislav Kontur authored
      Closes: https://github.com/paritytech/polkadot-sdk/issues/6449
    • thiolliere's avatar
      [Tx ext stage 2: 1/4] Add `TransactionSource` as argument in... · 8e3d9296
      thiolliere authored
      [Tx ext stage 2: 1/4] Add `TransactionSource` as argument in `TransactionExtension::validate` (#6323)
      
      ## Meta 
      
      This PR is part of 4 PR:
      * https://github.com/paritytech/polkadot-sdk/pull/6323
      * https://github.com/paritytech/polkadot-sdk/pull/6324
      * https://github.com/paritytech/polkadot-sdk/pull/6325
      * https://github.com/paritytech/polkadot-sdk/pull/6326
      
      ## Description
      
      One goal of transaction extension is to get rid or unsigned
      transactions.
      But unsigned transaction validation has access to the
      `TransactionSource`.
      
      The source is used for unsigned transactions that the node trust and
      don't want to pay upfront.
      Instead of using transaction source we could do: the transaction is
      valid if it is signed by the block author, conceptually it should work,
      but it doesn't look so easy.
      
      This PR add `TransactionSource` to the validate function for transaction
      extensions
  28. Nov 06, 2024
  29. Nov 05, 2024
  30. Oct 24, 2024