Skip to content
Snippets Groups Projects
  1. Oct 02, 2024
  2. Sep 30, 2024
  3. Sep 25, 2024
    • Liam Aharon's avatar
      MBM `try-runtime` support (#4251) · cc6a5130
      Liam Aharon authored
      
      # MBM try-runtime support
      
      This MR adds support to the try-runtime trait such that the
      try-runtime-CLI will be able to support MBM testing
      [here](https://github.com/paritytech/try-runtime-cli/pull/90). It mainly
      adds two feature-gated hooks to the `SteppedMigration` hook to
      facilitate testing. These hooks are named `pre_upgrade` and
      `post_upgrade` and have the same signature and implications as for
      single-block migrations.
      
      ## Integration
      
      To make use of this in your Multi-Block-Migration, just implement the
      two new hooks and test pre- and post-conditions in them:
      
      ```rust
      #[cfg(feature = "try-runtime")]
      fn pre_upgrade() -> Result<Vec<u8>, frame_support::sp_runtime::TryRuntimeError> {
      	// ...
      }
      
      #[cfg(feature = "try-runtime")]
      fn post_upgrade(prev: Vec<u8>) -> Result<(), frame_support::sp_runtime::TryRuntimeError> {
          // ...
      }
      ```
      
      You may return an error or panic in these functions to indicate failure.
      This will then show up in the try-runtime-CLI and can be used in CI for
      testing.
      
      Changes:
      - Adds `try-runtime` gated methods `pre_upgrade` and `post_upgrade` on
      `SteppedMigration`
      - Adds `try-runtime` gated methods `nth_pre_upgrade` and
      `nth_post_upgrade` on `SteppedMigrations`
      - Modifies `pallet_migrations` implementation to run pre_upgrade and
      post_upgrade steps at the appropriate times, and panic in the event of
      migration failure.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Signed-off-by: default avatargeorgepisaltu <george.pisaltu@parity.io>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarclaravanstaden <claravanstaden64@gmail.com>
      Co-authored-by: default avatarggwpez <ggwpez@users.noreply.github.com>
      Co-authored-by: default avatargeorgepisaltu <george.pisaltu@parity.io>
  4. Sep 23, 2024
    • Alin Dima's avatar
      elastic scaling: add core selector to cumulus (#5372) · b9eb68bc
      Alin Dima authored
      Partially implements
      https://github.com/paritytech/polkadot-sdk/issues/5048
      
      - adds a core selection runtime API to cumulus and a generic way of
      configuring it for a parachain
      - modifies the slot based collator to utilise the claim queue and the
      generic core selection
      
      What's left to be implemented (in a follow-up PR):
      - add the UMP signal for core selection into the parachain-system pallet
      
      View the RFC for more context:
      https://github.com/polkadot-fellows/RFCs/pull/103
      
      ---------
      
      Co-authored-by: command-bot <>
  5. Sep 16, 2024
  6. Sep 12, 2024
    • Dónal Murray's avatar
      Add `pallet_proxy` to People Chain and Coretime Chain testnet runtimes. (#5509) · 4653c379
      Dónal Murray authored
      Proxies are possible in the runtimes for Kusama and Polkadot but this
      functionality was not previously available on testnets.
      
      Closes #5453.
      
      Proxies can now be used on `coretime-rococo`, `coretime-westend`,
      `people-rococo` and `people-westend` in the same way as they can be on
      Kusama and Polkadot chains.
      
      The exact same proxies are configured as the production runtimes for the
      respective system parachains.
  7. Sep 10, 2024
  8. Aug 26, 2024
  9. Aug 12, 2024
  10. Jul 30, 2024
  11. Jul 19, 2024
    • Özgün Özerk's avatar
      relax `XcmFeeToAccount` trait bound on `AccountId` (#4959) · f8f70b37
      Özgün Özerk authored
      Fixes #4960 
      
      Configuring `FeeManager` enforces the boundary `Into<[u8; 32]>` for the
      `AccountId` type.
      
      Here is how it works currently: 
      
      Configuration:
      ```rust
          type FeeManager = XcmFeeManagerFromComponents<
              IsChildSystemParachain<primitives::Id>,
              XcmFeeToAccount<Self::AssetTransactor, AccountId, TreasuryAccount>,
          >;
      ```
      
      `XcmToFeeAccount` struct:
      ```rust
      /// A `HandleFee` implementation that simply deposits the fees into a specific on-chain
      /// `ReceiverAccount`.
      ///
      /// It reuses the `AssetTransactor` configured on the XCM executor to deposit fee assets. If
      /// the `AssetTransactor` returns an error while calling `deposit_asset`, then a warning will be
      /// logged and the fee burned.
      pub struct XcmFeeToAccount<AssetTransactor, AccountId, ReceiverAccount>(
      	PhantomData<(AssetTransactor, AccountId, ReceiverAccount)>,
      );
      
      impl<
      		AssetTransactor: TransactAsset,
      		AccountId: Clone + Into<[u8; 32]>,
      		ReceiverAccount: Get<AccountId>,
      	> HandleFee for XcmFeeToAccount<AssetTransactor, AccountId, ReceiverAccount>
      {
      	fn handle_fee(fee: Assets, context: Option<&XcmContext>, _reason: FeeReason) -> Assets {
      		deposit_or_burn_fee::<AssetTransactor, _>(fee, context, ReceiverAccount::get());
      
      		Assets::new()
      	}
      }
      ```
      
      `deposit_or_burn_fee()` function:
      ```rust
      /// Try to deposit the given fee in the specified account.
      /// Burns the fee in case of a failure.
      pub fn deposit_or_burn_fee<AssetTransactor: TransactAsset, AccountId: Clone + Into<[u8; 32]>>(
      	fee: Assets,
      	context: Option<&XcmContext>,
      	receiver: AccountId,
      ) {
      	let dest = AccountId32 { network: None, id: receiver.into() }.into();
      	for asset in fee.into_inner() {
      		if let Err(e) = AssetTransactor::deposit_asset(&asset, &dest, context) {
      			log::trace!(
      				target: "xcm::fees",
      				"`AssetTransactor::deposit_asset` returned error: {:?}. Burning fee: {:?}. \
      				They might be burned.",
      				e, asset,
      			);
      		}
      	}
      }
      ```
      
      ---
      
      In order to use **another** `AccountId` type (for example, 20 byte
      addresses for compatibility with Ethereum or Bitcoin), one has to
      duplicate the code as the following (roughly changing every `32` to
      `20`):
      ```rust
      /// A `HandleFee` implementation that simply deposits the fees into a specific on-chain
      /// `ReceiverAccount`.
      ///
      /// It reuses the `AssetTransactor` configured on the XCM executor to deposit fee assets. If
      /// the `AssetTransactor` returns an error while calling `deposit_asset`, then a warning will be
      /// logged and the fee burned.
      pub struct XcmFeeToAccount<AssetTransactor, AccountId, ReceiverAccount>(
          PhantomData<(AssetTransactor, AccountId, ReceiverAccount)>,
      );
      impl<
              AssetTransactor: TransactAsset,
              AccountId: Clone + Into<[u8; 20]>,
              ReceiverAccount: Get<AccountId>,
          > HandleFee for XcmFeeToAccount<AssetTransactor, AccountId, ReceiverAccount>
      {
          fn handle_fee(fee: XcmAssets, context: Option<&XcmContext>, _reason: FeeReason) -> XcmAssets {
              deposit_or_burn_fee::<AssetTransactor, _>(fee, context, ReceiverAccount::get());
      
              XcmAssets::new()
          }
      }
      
      pub fn deposit_or_burn_fee<AssetTransactor: TransactAsset, AccountId: Clone + Into<[u8; 20]>>(
          fee: XcmAssets,
          context: Option<&XcmContext>,
          receiver: AccountId,
      ) {
          let dest = AccountKey20 { network: None, key: receiver.into() }.into();
          for asset in fee.into_inner() {
              if let Err(e) = AssetTransactor::deposit_asset(&asset, &dest, context) {
                  log::trace!(
                      target: "xcm::fees",
                      "`AssetTransactor::deposit_asset` returned error: {:?}. Burning fee: {:?}. \
                      They might be burned.",
                      e, asset,
                  );
              }
          }
      }
      ```
      
      ---
      
      This results in code duplication, which can be avoided simply by
      relaxing the trait enforced by `XcmFeeToAccount`.
      
      In this PR, I propose to introduce a new trait called `IntoLocation` to
      be able to express both `Into<[u8; 32]>` and `Into<[u8; 20]>` should be
      accepted (and every other `AccountId` type as long as they implement
      this trait).
      
      Currently, `deposit_or_burn_fee()` function converts the `receiver:
      AccountId` to a location. I think converting an account to `Location`
      should not be the responsibility of `deposit_or_burn_fee()` function.
      
      This trait also decouples the conversion of `AccountId` to `Location`,
      from `deposit_or_burn_fee()` function. And exposes `IntoLocation` trait.
      Thus, allowing everyone to come up with their `AccountId` type and make
      it compatible for configuring `FeeManager`.
      
      ---
      
      Note 1: if there is a better file/location to put `IntoLocation`, I'm
      all ears
      
      Note 2: making `deposit_or_burn_fee` or `XcmToFeeAccount` generic was
      not possible from what I understood, due to Rust currently do not
      support a way to express the generic should implement either `trait A`
      or `trait B` (since the compiler cannot guarantee they won't overlap).
      In this case, they are `Into<[u8; 32]>` and `Into<[u8; 20]>`.
      See [this](https://github.com/rust-lang/rust/issues/20400) and
      [this](https://github.com/rust-lang/rfcs/pull/1672#issuecomment-262152934).
      
      Note 3: I should also submit a PR to `frontier` that implements
      `IntoLocation` for `AccountId20` if this PR gets accepted.
      
      
      ### Summary 
      this new trait:
      - decouples the conversion of `AccountId` to `Location`, from
      `deposit_or_burn_fee()` function
      - makes `XcmFeeToAccount` accept every possible `AccountId` type as long
      as they they implement `IntoLocation`
      - backwards compatible
      - keeps the API simple and clean while making it less restrictive
      
      
      @franciscoaguirre and @gupnik
      
       are already aware of the issue, so tagging
      them here for visibility.
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: command-bot <>
  12. Jul 15, 2024
    • Jun Jiang's avatar
      Remove most all usage of `sp-std` (#5010) · 7ecf3f75
      Jun Jiang authored
      
      This should remove nearly all usage of `sp-std` except:
      - bridge and bridge-hubs
      - a few of frames re-export `sp-std`, keep them for now
      - there is a usage of `sp_std::Writer`, I don't have an idea how to move
      it
      
      Please review proc-macro carefully. I'm not sure I'm doing it the right
      way.
      
      Note: need `/bot fmt`
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: command-bot <>
  13. Jul 08, 2024
  14. Jun 26, 2024
    • Branislav Kontur's avatar
      [xcm] runtime api for LocationToAccount conversions (#4857) · 75069569
      Branislav Kontur authored
      
      Closes: https://github.com/paritytech/polkadot-sdk/issues/4298
      
      This PR also merges `xcm-fee-payment-runtime-api` module to the
      `xcm-runtime-api`.
      
      
      ## TODO
      
      - [x] rename `convert` to `convert_location` and add new one
      `convert_account` (opposite direction)
      - [x] add to the all testnet runtimes
      - [x] check polkadot-js if supports that automatically or if needs to be
      added manually https://github.com/polkadot-js/api/pull/5917
      - [ ] backport/patch for fellows and release (asap)
      
      ## Open questions
      - [x] should we merge `xcm-runtime-api` and
      `xcm-fee-payment-runtime-api` to the one module `xcm-runtime-api` ?
      
      ## Usage
      Input:
       - `location:  VersionedLocation`
       
      Output:
       - account_id bytes
      
      
      ![image](https://github.com/paritytech/polkadot-sdk/assets/8159517/4607b15a-77d2-462b-806c-606107776c0d)
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
  15. Jun 24, 2024
    • Oliver Tale-Yazdi's avatar
      Lift all dependencies (the big one) (#4716) · 8efa0544
      Oliver Tale-Yazdi authored
      
      After preparing in https://github.com/paritytech/polkadot-sdk/pull/4633,
      we can lift also all internal dependencies up to the workspace.
      
      This does not actually change anything, but uses `workspace = true` for
      all dependencies. You can check it with:
      ```bash
      git checkout -q $(git merge-base oty-lift-all-deps origin/master)
      cargo tree -e features > master.out
      
      git checkout -q oty-lift-all-deps
      cargo tree -e features > new.out
      diff master.out new.out
      ```
      
      It did not yet lift 100% of dependencies, some inside of `target.*` or
      some that had conflicting aliases introduced recently. But i will do
      these together in a follow-up with CI checks.
      
      Can be reproduced with [zepter](https://github.com/ggwpez/zepter/):
      `zepter transpose d lift-to-workspace "regex:.*" --version-resolver
      highest --skip-package "polkadot-sdk" --ignore-errors --fix`.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  16. Jun 13, 2024
  17. May 31, 2024
    • Francisco Aguirre's avatar
      Implement `XcmPaymentApi` and `DryRunApi` on all system parachains (#4634) · fc6c3182
      Francisco Aguirre authored
      Depends on https://github.com/paritytech/polkadot-sdk/pull/4621.
      
      Implemented the
      [`XcmPaymentApi`](https://github.com/paritytech/polkadot-sdk/pull/3607)
      and [`DryRunApi`](https://github.com/paritytech/polkadot-sdk/pull/3872)
      on all system parachains.
      
      More scenarios can be tested on both rococo and westend if all system
      parachains implement this APIs.
      The objective is for all XCM-enabled runtimes to implement them.
      After demonstrating fee estimation in a UI on the testnets, come the
      fellowship runtimes.
      
      Step towards https://github.com/paritytech/polkadot-sdk/issues/690.
  18. May 22, 2024
  19. May 16, 2024
    • Oliver Tale-Yazdi's avatar
      [Runtime] Bound XCMP queue (#3952) · 4adfa37d
      Oliver Tale-Yazdi authored
      Re-applying #2302 after increasing the `MaxPageSize`.  
      
      Remove `without_storage_info` from the XCMP queue pallet. Part of
      https://github.com/paritytech/polkadot-sdk/issues/323
      
      Changes:
      - Limit the number of messages and signals a HRMP channel can have at
      most.
      - Limit the number of HRML channels.
      
      A No-OP migration is put in place to ensure that all `BoundedVec`s still
      decode and not truncate after upgrade. The storage version is thereby
      bumped to 5 to have our tooling remind us to deploy that migration.
      
      ## Integration
      
      If you see this error in your try-runtime-cli:  
      ```pre
      Max message size for channel is too large. This means that the V5 migration can be front-run and an
      attacker could place a large message just right before the migration to make other messages un-decodable.
      Please either increase `MaxPageSize` or decrease the `max_message_size` for this channel. Channel max:
      102400, MaxPageSize: 65535
      ```
      
      Then increase the `MaxPageSize` of the `cumulus_pallet_xcmp...
  20. May 15, 2024
    • Alexandru Gheorghe's avatar
      Make vscode rustanalyzer fast again (#4470) · e31fcffb
      Alexandru Gheorghe authored
      
      This bump of versions:
      
      https://github.com/paritytech/polkadot-sdk/pull/4409/files#diff-13ee4b2252c9e516a0547f2891aa2105c3ca71c6d7a1e682c69be97998dfc87eR11936
      
      reintroduced a dependency to proc-macro-crate 2.0.0 which is suffering
      from: https://github.com/bkchr/proc-macro-crate/pull/42 this, so bump
      parity-scale-codec to a newer version to eliminate the bad
      proc-macro-crate 2.0.0 dependency.
      
      ---------
      
      Signed-off-by: default avatarAlexandru Gheorghe <alexandru.gheorghe@parity.io>
      Co-authored-by: command-bot <>
  21. May 08, 2024
    • Dino Pačandi's avatar
      [pallet-balances] `burn_allow_death` extrinsic (#3964) · c3e57c1b
      Dino Pačandi authored
      
      Adds an additional extrinsic call to the `pallet-balances` to _burn_
      tokens.
      Depending on the `keep_alive` flag, the call might or might not reap the
      account.
      
      Required modification of the _fungible's_ `Mutate` trait, `burn_from`
      function to allow the `Preservation` argument.
      
      **TODO**
      - [x] run benchmarks & update weights
      - [x] make sure prdoc is required & properly formatted
      
      Related issue: https://github.com/paritytech/polkadot-sdk/issues/3943
      
      ---------
      
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: command-bot <>
    • Francisco Aguirre's avatar
      XcmDryRunApi - Dry-running extrinsics to get their XCM effects (#3872) · 7213e363
      Francisco Aguirre authored
      
      # Context
      
      Estimating fees for XCM execution and sending has been an area with bad
      UX.
      The addition of the
      [XcmPaymentApi](https://github.com/paritytech/polkadot-sdk/pull/3607)
      exposed the necessary components to be able to estimate XCM fees
      correctly, however, that was not the full story.
      The `XcmPaymentApi` works for estimating fees only if you know the
      specific XCM you want to execute or send.
      This is necessary but most UIs want to estimate the fees for extrinsics,
      they don't necessarily know the XCM program that's executed by them.
      
      # Main addition
      
      A new runtime API is introduced, the `XcmDryRunApi`, that given an
      extrinsic, or an XCM program, returns its effects:
      - Execution result
      - Local XCM (in the case of an extrinsic)
      - Forwarded XCMs
      - List of events
      
      This API can be used on its own for dry-running purposes, for
      double-checking or testing, but it mainly shines when used in
      conjunction with the `XcmPaymentApi`.
      UIs can use these two APIs to estimate transfers.
      
      # How it works
      
      New tests are added to exemplify how to incorporate both APIs.
      There's a mock test just to make sure everything works under
      `xcm-fee-payment-runtime-api`.
      There's a real-world test using Westend and AssetHubWestend under
      `cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs`.
      Added both a test for a simple teleport between chains and a reserve
      transfer asset between two parachains going through a reserve.
      
      The steps to follow:
      - Use `XcmDryRunApi::dry_run_extrinsic` to get local XCM program and
      forwarded messages
      - For each forwarded message
      - Use `XcmPaymentApi::query_delivery_fee` LOCALLY to get the delivery
      fees
      - Use `XcmPaymentApi::query_xcm_weight` ON THE DESTINATION to get the
      remote execution weight
      - (optional) Use `XcmPaymentApi::query_acceptable_payment_assets` ON THE
      DESTINATION to know on which assets the execution fees can be paid
      - Use `XcmPaymentApi::query_weight_to_asset_fee` ON THE DESTINATION to
      convert weight to the actual remote execution fees
      - Use `XcmDryRunApi::dry_run_xcm` ON THE DESTINATION to know if a new
      message will be forwarded, if so, continue
      
      # Dear reviewer
      
      The changes in this PR are grouped as follows, and in order of
      importance:
      - Addition of new runtime API
      - Definition, mock and simple tests:
      polkadot/xcm/xcm-fee-payment-runtime-api/*
      - Implemented on Westend, Asset Hub Westend and Penpal, will implement
      on every runtime in a following PR
      - Addition of a new config item to the XCM executor for recording xcms
      about to be executed
        - Definition: polkadot/xcm/xcm-executor/*
        - Implementation: polkadot/xcm/pallet-xcm/*
      - had to update all runtime xcm_config.rs files with `type XcmRecorder =
      XcmPallet;`
      - Addition of a new trait for inspecting the messages in queues
        - Definition: polkadot/xcm/xcm-builder/src/routing.rs
        - Implemented it on all routers:
          - ChildParachainRouter: polkadot/runtime/common/src/xcm_sender.rs
      - ParentAsUmp: cumulus/primitives/utility/src/lib.rs (piggybacked on
      implementation in cumulus/pallets/parachain-system/src/lib.rs)
          - XcmpQueue: cumulus/pallets/xcmp-queue/src/lib.rs
          - Bridge: bridges/modules/xcm-bridge-hub-router/src/lib.rs
      - More complicated and useful tests:
      -
      cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs
      
      ## Next steps
      
      With this PR, Westend, AssetHubWestend, Rococo and AssetHubRococo have
      the new API.
      UIs can test on these runtimes to create better experiences around
      cross-chain operations.
      
      Next:
      - Add XcmDryRunApi to all system parachains
      - Integrate xcm fee estimation in all emulated tests
      - Get this on the fellowship runtimes
      
      ---------
      
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
  22. May 02, 2024
  23. Apr 24, 2024
  24. Apr 23, 2024
  25. Apr 22, 2024
  26. Apr 10, 2024
  27. Apr 09, 2024
  28. Apr 04, 2024
    • Michal Kucharczyk's avatar
      `GenesisConfig` presets for runtime (#2714) · f910a15c
      Michal Kucharczyk authored
      The runtime now can provide a number of predefined presets of
      `RuntimeGenesisConfig` struct. This presets are intended to be used in
      different deployments, e.g.: `local`, `staging`, etc, and should be
      included into the corresponding chain-specs.
      
      Having `GenesisConfig` presets in runtime allows to fully decouple node
      from runtime types (the problem is described in #1984).
      
      **Summary of changes:**
      - The `GenesisBuilder` API was adjusted to enable this functionality
      (and provide better naming - #150):
         ```rust
          fn preset_names() -> Vec<PresetId>;
      fn get_preset(id: Option<PresetId>) -> Option<serde_json::Value>;
      //`None` means default
          fn build_state(value: serde_json::Value);
          pub struct PresetId(Vec<u8>);
         ```
      
      - **Breaking change**: Old `create_default_config` method was removed,
      `build_config` was renamed to `build_state`. As a consequence a node
      won't be able to interact with genesis config for older runtimes. The
      cleanup was made for sake of API simplicity. Also IMO maintaining
      compatibility with old API is not so crucial.
      - Reference implementation was provided for `substrate-test-runtime` and
      `rococo` runtimes. For rococo new
      [`genesis_configs_presets`](https://github.com/paritytech/polkadot-sdk/blob/3b41d66b/polkadot/runtime/rococo/src/genesis_config_presets.rs#L530)
      module was added and is used in `GenesisBuilder`
      [_presets-related_](https://github.com/paritytech/polkadot-sdk/blob/3b41d66b/polkadot/runtime/rococo/src/lib.rs#L2462-L2485)
      methods.
      
      - The `chain-spec-builder` util was also improved and allows to
      ([_doc_](https://github.com/paritytech/polkadot-sdk/blob/3b41d66b/substrate/bin/utils/chain-spec-builder/src/lib.rs#L19)):
         - list presets provided by given runtime (`list-presets`),
      - display preset or default config provided by the runtime
      (`display-preset`),
         - build chain-spec using named preset (`create ... named-preset`),
      
      
      - The `ChainSpecBuilder` is extended with
      [`with_genesis_config_preset_name`](https://github.com/paritytech/polkadot-sdk/blob/3b41d66b/substrate/client/chain-spec/src/chain_spec.rs#L447)
      method which allows to build chain-spec using named preset provided by
      the runtime. Sample usage on the node side
      [here](https://github.com/paritytech/polkadot-sdk/blob/2caffaae
      
      /polkadot/node/service/src/chain_spec.rs#L404).
      
      Implementation of #1984.
      fixes: #150
      part of: #25
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
      Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    • Liam Aharon's avatar
      Migrate fee payment from `Currency` to `fungible` (#2292) · bda4e75a
      Liam Aharon authored
      Part of https://github.com/paritytech/polkadot-sdk/issues/226 
      Related https://github.com/paritytech/polkadot-sdk/issues/1833
      
      - Deprecate `CurrencyAdapter` and introduce `FungibleAdapter`
      - Deprecate `ToStakingPot` and replace usage with `ResolveTo`
      - Required creating a new `StakingPotAccountId` struct that implements
      `TypedGet` for the staking pot account ID
      - Update parachain common utils `DealWithFees`, `ToAuthor` and
      `AssetsToBlockAuthor` implementations to use `fungible`
      - Update runtime XCM Weight Traders to use `ResolveTo` instead of
      `ToStakingPot`
      - Update runtime Transaction Payment pallets to use `FungibleAdapter`
      instead of `CurrencyAdapter`
      - [x] Blocked by https://github.com/paritytech/polkadot-sdk/pull/1296,
      needs the `Unbalanced::decrease_balance` fix
  29. Apr 03, 2024
  30. Mar 27, 2024
  31. Mar 26, 2024
    • Dcompoze's avatar
      Fix spelling mistakes across the whole repository (#3808) · 002d9260
      Dcompoze authored
      **Update:** Pushed additional changes based on the review comments.
      
      **This pull request fixes various spelling mistakes in this
      repository.**
      
      Most of the changes are contained in the first **3** commits:
      
      - `Fix spelling mistakes in comments and docs`
      
      - `Fix spelling mistakes in test names`
      
      - `Fix spelling mistakes in error messages, panic messages, logs and
      tracing`
      
      Other source code spelling mistakes are separated into individual
      commits for easier reviewing:
      
      - `Fix the spelling of 'authority'`
      
      - `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`
      
      - `Fix the spelling of 'prev_enqueud_messages'`
      
      - `Fix the spelling of 'endpoint'`
      
      - `Fix the spelling of 'children'`
      
      - `Fix the spelling of 'PenpalSiblingSovereignAccount'`
      
      - `Fix the spelling of 'PenpalSudoAccount'`
      
      - `Fix the spelling of 'insufficient'`
      
      - `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`
      
      - `Fix the spelling of 'subtracted'`
      
      - `Fix the spelling of 'CandidatePendingAvailability'`
      
      - `Fix the spelling of 'exclusive'`
      
      - `Fix the spelling of 'until'`
      
      - `Fix the spelling of 'discriminator'`
      
      - `Fix the spelling of 'nonexistent'`
      
      - `Fix the spelling of 'subsystem'`
      
      - `Fix the spelling of 'indices'`
      
      - `Fix the spelling of 'committed'`
      
      - `Fix the spelling of 'topology'`
      
      - `Fix the spelling of 'response'`
      
      - `Fix the spelling of 'beneficiary'`
      
      - `Fix the spelling of 'formatted'`
      
      - `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`
      
      - `Fix the spelling of 'succeeded'`
      
      - `Fix the spelling of 'reopened'`
      
      - `Fix the spelling of 'proposer'`
      
      - `Fix the spelling of 'InstantiationNonce'`
      
      - `Fix the spelling of 'depositor'`
      
      - `Fix the spelling of 'expiration'`
      
      - `Fix the spelling of 'phantom'`
      
      - `Fix the spelling of 'AggregatedKeyValue'`
      
      - `Fix the spelling of 'randomness'`
      
      - `Fix the spelling of 'defendant'`
      
      - `Fix the spelling of 'AquaticMammal'`
      
      - `Fix the spelling of 'transactions'`
      
      - `Fix the spelling of 'PassingTracingSubscriber'`
      
      - `Fix the spelling of 'TxSignaturePayload'`
      
      - `Fix the spelling of 'versioning'`
      
      - `Fix the spelling of 'descendant'`
      
      - `Fix the spelling of 'overridden'`
      
      - `Fix the spelling of 'network'`
      
      Let me know if this structure is adequate.
      
      **Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
      `Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
      as it is.
      
      ~~**Note:** In some places the term `Receival` is used to refer to
      message reception, IMO `Reception` is the correct word here, but I left
      it as it is.~~
      
      ~~**Note:** In some places the term `Overlayed` is used instead of the
      more acceptable version `Overlaid` but I also left it as it is.~~
      
      ~~**Note:** In some places the term `Applyable` is used instead of the
      correct version `Applicable` but I also left it as it is.~~
      
      **Note:** Some usage of British vs American english e.g. `judgement` vs
      `judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
      are both present in different places, but I suppose that's
      understandable given the number of contributors.
      
      ~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
      triggers errors in CI when I make changes to it, so I left it as it
      is.~~
  32. Mar 21, 2024
  33. Mar 19, 2024
    • Juan Ignacio Rios's avatar
      Add HRMP notification handlers to the xcm-executor (#3696) · 8b3bf39a
      Juan Ignacio Rios authored
      
      Currently the xcm-executor returns an `Unimplemented` error if it
      receives any HRMP-related instruction.
      What I propose here, which is what we are currently doing in our forked
      executor at polimec, is to introduce a trait implemented by the executor
      which will handle those instructions.
      
      This way, if parachains want to keep the default behavior, they just use
      `()` and it will return unimplemented, but they can also implement their
      own logic to establish HRMP channels with other chains in an automated
      fashion, without requiring to go through governance.
      
      Our implementation is mentioned in the [polkadot HRMP
      docs](https://arc.net/l/quote/hduiivbu), and it was suggested to us to
      submit a PR to add these changes to polkadot-sdk.
      
      ---------
      
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: command-bot <>
  34. Mar 18, 2024
  35. Mar 17, 2024