1. Nov 03, 2023
  2. Nov 02, 2023
    • Oliver Tale-Yazdi's avatar
      Use `Message Queue` as DMP and XCMP dispatch queue (#1246) · e1c033eb
      Oliver Tale-Yazdi authored
      (imported from https://github.com/paritytech/cumulus/pull/2157)
      
      ## Changes
      
      This MR refactores the XCMP, Parachains System and DMP pallets to use
      the [MessageQueue](https://github.com/paritytech/substrate/pull/12485)
      for delayed execution of incoming messages. The DMP pallet is entirely
      replaced by the MQ and thereby removed. This allows for PoV-bounded
      execution and resolves a number of issues that stem from the current
      work-around.
      
      All System Parachains adopt this change.  
      The most important changes are in `primitives/core/src/lib.rs`,
      `parachains/common/src/process_xcm_message.rs`,
      `pallets/parachain-system/src/lib.rs`, `pallets/xcmp-queue/src/lib.rs`
      and the runtime configs.
      
      ### DMP Queue Pallet
      
      The pallet got removed and its logic refactored into parachain-system.
      Overweight message management can be done directly through the MQ
      pallet.
      
      Final undeployment migrations are provided by
      `cumulus_pallet_dmp_queue::UndeployDmpQueue` and `DeleteDmpQueue` that
      can be configured with an aux config trait like:
      
      ```rust
      parameter_types! {
      	pub const DmpQueuePalletName: &'static str = \"DmpQueue\" < CHANGE ME;
      	pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent;
      }
      
      impl cumulus_pallet_dmp_queue::MigrationConfig for Runtime {
      	type PalletName = DmpQueuePalletName;
      	type DmpHandler = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
      	type DbWeight = <Runtime as frame_system::Config>::DbWeight;
      }
      
      // And adding them to your Migrations tuple:
      pub type Migrations = (
      	...
      	cumulus_pallet_dmp_queue::UndeployDmpQueue<Runtime>,
      	cumulus_pallet_dmp_queue::DeleteDmpQueue<Runtime>,
      );
      ```
      
      ### XCMP Queue pallet
      
      Removed all dispatch queue functionality. Incoming XCMP messages are now
      either: Immediately handled if they are Signals, enqueued into the MQ
      pallet otherwise.
      
      New config items for the XCMP queue pallet:
      ```rust
      /// The actual queue implementation that retains the messages for later processing.
      type XcmpQueue: EnqueueMessage<ParaId>;
      
      /// How a XCM over HRMP from a sibling parachain should be processed.
      type XcmpProcessor: ProcessMessage<Origin = ParaId>;
      
      /// The maximal number of suspended XCMP channels at the same time.
      #[pallet::constant]
      type MaxInboundSuspended: Get<u32>;
      ```
      
      How to configure those:
      
      ```rust
      // Use the MessageQueue pallet to store messages for later processing. The `TransformOrigin` is needed since
      // the MQ pallet itself operators on `AggregateMessageOrigin` but we want to enqueue `ParaId`s.
      type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
      
      // Process XCMP messages from siblings. This is type-safe to only accept `ParaId`s. They will be dispatched
      // with origin `Junction::Sibling(…)`.
      type XcmpProcessor = ProcessFromSibling<
      	ProcessXcmMessage<
      		AggregateMessageOrigin,
      		xcm_executor::XcmExecutor<xcm_config::XcmConfig>,
      		RuntimeCall,
      	>,
      >;
      
      // Not really important what to choose here. Just something larger than the maximal number of channels.
      type MaxInboundSuspended = sp_core::ConstU32<1_000>;
      ```
      
      The `InboundXcmpStatus` storage item was replaced by
      `InboundXcmpSuspended` since it now only tracks inbound queue suspension
      and no message indices anymore.
      
      Now only sends the most recent channel `Signals`, as all prio ones are
      out-dated anyway.
      
      ### Parachain System pallet
      
      For `DMP` messages instead of forwarding them to the `DMP` pallet, it
      now pushes them to the configured `DmpQueue`. The message processing
      which was triggered in `set_validation_data` is now being done by the MQ
      pallet `on_initialize`.
      
      XCMP messages are still handed off to the `XcmpMessageHandler`
      (XCMP-Queue pallet) - no change here.
      
      New config items for the parachain system pallet:
      ```rust
      /// Queues inbound downward messages for delayed processing. 
      ///
      /// Analogous to the `XcmpQueue` of the XCMP queue pallet.
      type DmpQueue: EnqueueMessage<AggregateMessageOrigin>;
      ``` 
      
      How to configure:
      ```rust
      /// Use the MQ pallet to store DMP messages for delayed processing.
      type DmpQueue = MessageQueue;
      ``` 
      
      ## Message Flow
      
      The flow of messages on the parachain side. Messages come in from the
      left via the `Validation Data` and finally end up at the `Xcm Executor`
      on the right.
      
      ![Untitled
      (1)](https://github.com/paritytech/cumulus/assets/10380170/6cf8b377-88c9-4aed-96df-baace266e04d)
      
      ## Further changes
      
      - Bumped the default suspension, drop and resume thresholds in
      `QueueConfigData::default()`.
      - `XcmpQueue::{suspend_xcm_execution, resume_xcm_execution}` errors when
      they would be a noop.
      - Properly validate the `QueueConfigData` before setting it.
      - Marked weight files as auto-generated so they wont auto-expand in the
      MR files view.
      - Move the `hypothetical` asserts to `frame_support` under the name
      `experimental_hypothetically`
      
      Questions:
      - [ ] What about the ugly `#[cfg(feature = \"runtime-benchmarks\")]` in
      the runtimes? Not sure how to best fix. Just having them like this makes
      tests fail that rely on the real message processor when the feature is
      enabled.
      - [ ] Need a good weight for `MessageQueueServiceWeight`. The scheduler
      already takes 80% so I put it to 10% but that is quite low.
      
      TODO:
      - [x] Remove c&p code after
      https://github.com/paritytech/polkadot/pull/6271
      - [x] Use `HandleMessage` once it is public in Substrate
      - [x] fix `runtime-benchmarks` feature
      https://github.com/paritytech/polkadot/pull/6966
      
      
      - [x] Benchmarks
      - [x] Tests
      - [ ] Migrate `InboundXcmpStatus` to `InboundXcmpSuspended`
      - [x] Possibly cleanup Migrations (DMP+XCMP)
      - [x] optional: create `TransformProcessMessageOrigin` in Substrate and
      replace `ProcessFromSibling`
      - [ ] Rerun weights on ref HW
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      e1c033eb
  3. Nov 01, 2023
  4. Oct 31, 2023
  5. Oct 27, 2023
  6. Oct 26, 2023
    • Alin Dima's avatar
      cumulus: fix test runtimes panic (#2039) · 1b08bdd2
      Alin Dima authored
      the min slot duration should be 0 only if the `experimental` feature is
      enabled. otherwise, the runtime will panic on a division by 0.
      1b08bdd2
    • Branislav Kontur's avatar
    • Dastan's avatar
      Expose collection attributes from `Inspect` trait (#1914) · 0bcebac4
      Dastan authored
      # Description
      
      - What does this PR do?
      
      While working with `pallet_nfts` through `nonfungibles_v2` traits
      `Inspect, Mutate`, I found out that once you have set the collection
      attribute with `<Nfts as Mutate>::set_collection_attribute()`, it's not
      possible to read it with `<Nfts as Inspect>::collection_attribute()`
      since they use different `namespace` values. When setting the attribute,
      `AttributeNamespace::Pallet` is used, while
      `AttributeNamespace::CollectionOwner` is used when reading.
      
      more context:
      https://github.com/freeverseio/laos/issues/7#issuecomment-1766137370
      
      This PR makes `item` an optional parameter in
      `Inspect::system_attribute()`, to be able to read collection attributes.
      
      - Why are these changes needed?
      
      To be able to read collection level attributes when reading attributes
      of the collection. It will be possible to read collection attributes by
      passing `None` for `item`
      
      - How were these changes implemented and what do they affect?
      
      `NftsApi` is also affected and `NftsApi::system_attribute()` now accepts
      optional `item` parameter.
      
      ## Breaking change
      
      Because of the change in the `NftsApi::system_attribute()` method's
      `item` param, parachains who integrated the `NftsApi` need to update
      their API code and frontend integrations accordingly. AssetHubs are
      unaffected since the NftsApi wasn't released on those parachains yet.
      0bcebac4
  7. Oct 25, 2023
    • Branislav Kontur's avatar
      [testnet] Align testnet system parachain runtimes using... · f6560c2b
      Branislav Kontur authored
      [testnet] Align testnet system parachain runtimes using `RelayTreasuryLocation` and `SystemParachains` in the same way (#2023)
      
      This PR addresses several issues:
      - simplify referencing `RelayTreasuryLocation` without needing
      additional `RelayTreasury` struct
      - fix for referencing `SystemParachains` from parachain with `parents:
      1` instead of `parents: 0`
      - removed hard-coded constants and fix tests for `asset-hub-rococo`
      which was merged to master after
      https://github.com/paritytech/polkadot-sdk/pull/1726
      
      ---------
      
      Co-authored-by: command-bot <>
      f6560c2b
  8. Oct 24, 2023
    • Oliver Tale-Yazdi's avatar
      Improve features dev-ex (#1831) · 4a443567
      Oliver Tale-Yazdi authored
      Adds a config file that allows to run `zepter` without any arguments in
      the workspace to address all issues.
      A secondary workflow for the CI is provided as `zepter run check`. Both
      the formatting and linting are now in one check for efficiancy.
      
      The latest version also detects some more things that `featalign` was
      already showing.
      
      Error message [in the
      CI](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3916205)
      now looks like this:
      ```pre
      ...
      crate 'test-parachains' (/Users/vados/Documents/work/polkadot-sdk/polkadot/parachain/test-parachains/Cargo.toml)
        feature 'std'
          must propagate to:
            parity-scale-codec
      Found 55 issues (run with --fix to fix).
      Error: Command 'lint propagate-feature' failed with exit code 1
      
      Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration.
      It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`.
      Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
      
      For more information, see:
        - https://github.com/paritytech/polkadot-sdk/issues/1831
        - https://github.com/ggwpez/zepter
      
      
      ```
      
      TODO:
      - [x] Check that CI fails correctly
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      4a443567
    • Kian Paimani's avatar
      Ensure correct variant count in `Runtime[Hold/Freeze]Reason` (#1900) · 35eb133b
      Kian Paimani authored
      closes https://github.com/paritytech/polkadot-sdk/issues/1882
      
      
      
      ## Breaking Changes
      
      This PR introduces a new item to `pallet_balances::Config`:
      
      ```diff
      trait Config {
      ++    type RuntimeFreezeReasons;
      }
      ```
      
      This value is only used to check it against `type MaxFreeze`. A similar
      check has been added for `MaxHolds` against `RuntimeHoldReasons`, which
      is already given to `pallet_balances`.
      
      In all contexts, you should pass the real `RuntimeFreezeReasons`
      generated by `construct_runtime` to `type RuntimeFreezeReasons`. Passing
      `()` would also work, but it would imply that the runtime uses no
      freezes at all.
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      35eb133b
  9. Oct 23, 2023
    • Branislav Kontur's avatar
      [testnet] BridgeHubRococo nits (#1972) · e0620fd9
      Branislav Kontur authored
      This PR does not introduce any functional changes to the existing code,
      it merely addresses several minor refactors:
      - Moving bridging pallets to separate files.
      - Improving the readability and naming of weight files for bridging
      pallets and bridging pallet instances.
      
      The reason for this refactor is to facilitate easier plugin integration
      for the upcoming bridge between Rococo and Westend.
      
      ---------
      
      Co-authored-by: command-bot <>
      e0620fd9
    • Branislav Kontur's avatar
      Remove `(rococo/westend)-runtime` deps from testnet AssetHubs (#1979) · c284a931
      Branislav Kontur authored
      ## Problem
      
      This PR addresses the issue with testnet AssetHub builds, which was
      discovered during the execution of `bot bench`.
      
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4038738
      ```
           Compiling asset-hub-rococo-runtime-wasm v1.0.0 (/builds/parity/mirrors/polkadot-sdk/target/production/wbuild/asset-hub-rococo-runtime)
        warning: Linking globals named 'Core_version': symbol multiply defined!
        error: failed to load bitcode of module "rococo_runtime-8799ee884447805a.rococo_runtime.0bc572b8-cgu.0.rcgu.o": 
        warning: `asset-hub-rococo-runtime-wasm` (lib) generated 1 warning
        error: could not compile `asset-hub-rococo-runtime-wasm` (lib) due to previous error; 1 warning emitted
      ```
      
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4038739
      ```
      Compiling asset-hub-westend-runtime-wasm v1.0.0 (/builds/parity/mirrors/polkadot-sdk/target/production/wbuild/asset-hub-westend-runtime)
        warning: Linking globals named 'Core_version': symbol multiply defined!
        error: failed to load bitcode of module "westend_runtime-86d7844430f97d5c.westend_runtime.b7678d03-cgu.0.rcgu.o": 
        warning: `asset-hub-westend-runtime-wasm` (lib) generated 1 warning
        error: could not compile `asset-hub-westend-runtime-wasm` (lib) due to previous error; 1 warning emitted
      ```
      
      ## Solution
      
      - Removed dependencies on `rococo-runtime` and `westend-runtime`
      introduced by [this
      PR](https://github.com/paritytech/polkadot-sdk/pull/1234/files#diff-a86375df98e04ca3cce1ea35c40257a222e2d5087f5f528ff33307678b78dc2dR534-R550).
      - Replaced `<rococo_runtime::Treasury as PalletInfoAccess>::index()`
      with `rococo_runtime_constants::TREASURY_PALLET_ID`.
      - Added `check_treasury_pallet_id` to the relay runtimes to ensure that
      the constant is aligned with the pallet id.
      - Added "Rococo Treasury" to the waived locations (that will not be
      charged fees in the executor) for `BridgeHubRococo` (to be aligned with
      AssetHubs).
      
      ## References
      
      [Full element discussion
      here](https://matrix.to/#/!JUeaZUiYbdrvzvtwSL:parity.io/$2PnjYMsWRjR7M3oOfGuRI0XkjdoqJLtRcAPVcDLuLVg?via=parity.io&via=web3.foundation).
      
      ---------
      
      Co-authored-by: command-bot <>
      c284a931
  10. Oct 20, 2023
    • Branislav Kontur's avatar
      [testnet] AssetHubRococo nits (#1954) · 76994356
      Branislav Kontur authored
      This PR addresses several minor issues:
      - Fixes the symlink for `asset-hub-rococo.json` chainspec.
      - Corrects the `asset-hub-rococo-genesis` invulnerables setup.
      - Relocates common bash functions for bridge testing to a separate file
      `bridges_common.sh`.
      76994356
    • Bastian Köcher's avatar
      `xcm`: Change `TypeInfo::path` to not include `staging` (#1948) · f3bf5c1a
      Bastian Köcher authored
      The `xcm` crate was renamed to `staging-xcm` to be able to publish it to
      crates.io as someone as squatted `xcm`. The problem with this rename is
      that the `TypeInfo` includes the crate name which ultimately lands in
      the metadata. The metadata is consumed by downstream users like
      `polkadot-js` or people building on top of `polkadot-js`. These people
      are using the entire `path` to find the type in the type registry. Thus,
      their code would break as the type path would now be [`staging_xcm`,
      `VersionedXcm`] instead of [`xcm`, `VersionedXcm`]. This pull request
      fixes this by renaming the path segment `staging_xcm` to `xcm`.
      
      This requires: https://github.com/paritytech/scale-info/pull/197
      
      
      
      ---------
      
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      f3bf5c1a
    • Francisco Aguirre's avatar
      Remove some dbgs (#1949) · f0d443a0
      Francisco Aguirre authored
      Removed some debug logs
      f0d443a0
  11. Oct 18, 2023
    • Keith Yeung's avatar
      Introduce XcmFeesToAccount fee manager (#1234) · 3dece311
      Keith Yeung authored
      
      
      Combination of paritytech/polkadot#7005, its addon PR
      paritytech/polkadot#7585 and its companion paritytech/cumulus#2433.
      
      This PR introduces a new XcmFeesToAccount struct which implements the
      `FeeManager` trait, and assigns this struct as the `FeeManager` in the
      XCM config for all runtimes.
      
      The struct simply deposits all fees handled by the XCM executor to a
      specified account. In all runtimes, the specified account is configured
      as the treasury account.
      
      XCM __delivery__ fees are now being introduced (unless the root origin
      is sending a message to a system parachain on behalf of the originating
      chain).
      
      # Note for reviewers
      
      Most file changes are tests that had to be modified to account for the
      new fees.
      Main changes are in:
      - cumulus/pallets/xcmp-queue/src/lib.rs <- To make it track the delivery
      fees exponential factor
      - polkadot/xcm/xcm-builder/src/fee_handling.rs <- Added. Has the
      FeeManager implementation
      - All runtime xcm_config files <- To add the FeeManager to the XCM
      configuration
      
      # Important note
      
      After this change, instructions that create and send a new XCM (Query*,
      Report*, ExportMessage, InitiateReserveWithdraw, InitiateTeleport,
      DepositReserveAsset, TransferReserveAsset, LockAsset and RequestUnlock)
      will require the corresponding origin account in the origin register to
      pay for transport delivery fees, and the onward message will fail to be
      sent if the origin account does not have the required amount. This
      delivery fee is on top of what we already collect as tx fees in
      pallet-xcm and XCM BuyExecution fees!
      
      Wallet UIs that want to expose the new delivery fee can do so using the
      formula:
      
      ```
      delivery_fee_factor * (base_fee + encoded_msg_len * per_byte_fee)
      ```
      
      where the delivery fee factor can be obtained from the corresponding
      pallet based on which transport you are using (UMP, HRMP or bridges),
      the base fee is a constant, the encoded message length from the message
      itself and the per byte fee is the same as the configured per byte fee
      for txs (i.e. `TransactionByteFee`).
      
      ---------
      
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: default avatarGiles Cope <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      Co-authored-by: default avatarLiam Aharon <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      3dece311
    • joe petrowski's avatar
      Add Runtime Missing Crate Descriptions (#1909) · d3ea69b7
      joe petrowski authored
      Adds descriptions needed for publishing to crates.io.
      d3ea69b7
    • Adrian Catangiu's avatar
      cumulus: add asset-hub-rococo runtime based on asset-hub-kusama and add... · 8b3905d2
      Adrian Catangiu authored
      
      cumulus: add asset-hub-rococo runtime based on asset-hub-kusama and add asset-bridging support to it (#1215)
      
      This commit adds Rococo Asset Hub dedicated runtime so we can test new
      features here, before merging them in Kusama Asset Hub.
      Also adds one such feature: asset transfer over bridge (Rococo AssetHub
      <> Wococo AssetHub)
      
      - clone `asset-hub-kusama-runtime` -> `asset-hub-rococo-runtime`
      - make it use Rococo primitives, names, assets, constants, etc
      - add asset-transfer-over-bridge support to Rococo AssetHub <> Wococo
      AssetHub
      
      Fixes #1128
      
      ---------
      
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: default avatarFrancisco Aguirre <[email protected]>
      8b3905d2
    • Ignacio Palacios's avatar
      Publish `penpal-runtime` crate (#1904) · e73729b1
      Ignacio Palacios authored
      Remove `publish = false` to publish the crate
      e73729b1
  12. Oct 17, 2023
  13. Oct 16, 2023
  14. Oct 12, 2023
  15. Oct 11, 2023
    • Branislav Kontur's avatar
      Xcm emulator nits (#1649) · cfb29254
      Branislav Kontur authored
      # Desription
      
      ## Summary 
      
      This PR introduces several nits and tweaks to xcm emulator tests for
      system parachains.
      
      ## Explanation
      
      **Deduplicate `XcmPallet::send(` with root origin code**
      - Introduced `send_transact_to_parachain` which could be easily reuse
      for scenarios like _governance call from relay chain to parachain_.
      
      **Refactor `send_transact_sudo_from_relay_to_system_para_works`**
      - Test covered just one use-case which was moved to the
      `do_force_create_asset_from_relay_to_system_para`, so now we can extend
      this test with more _governance-like_ senarios.
      - Renamed to
      `send_transact_as_superuser_from_relay_to_system_para_works`.
      
      **Remove `send_transact_native_from_relay_to_system_para_fails` test**
      - This test and/or description is kind of misleading, because system
      paras support Native from relay chain by `RelayChainAsNative` with
      correct xcm origin.
      - It tested only sending on relay chain which should go directly to the
      relay chain unit-tests (does not even need to be in xcm emulator level).
      
      ## Future directions
      
      Check restructure parachains integration tests
      [issue](https://github.com/paritytech/polkadot-sdk/issues/1389) and [PR
      with more TODOs](https://github.com/paritytech/polkadot-sdk/pull/1693
      
      ).
      
      ---------
      
      Co-authored-by: default avatarIgnacio Palacios <[email protected]>
      cfb29254
  16. Oct 10, 2023
  17. Oct 07, 2023
    • Muharem Ismailov's avatar
      Treasury spends various asset kinds (#1333) · cb944dc5
      Muharem Ismailov authored
      
      
      ### Summary 
      
      This PR introduces new dispatchables to the treasury pallet, allowing
      spends of various asset types. The enhanced features of the treasury
      pallet, in conjunction with the asset-rate pallet, are set up and
      enabled for Westend and Rococo.
      
      ### Westend and Rococo runtimes.
      
      Polkadot/Kusams/Rococo Treasury can accept proposals for `spends` of
      various asset kinds by specifying the asset's location and ID.
      
      #### Treasury Instance New Dispatchables:
      - `spend(AssetKind, AssetBalance, Beneficiary, Option<ValidFrom>)` -
      propose and approve a spend;
      - `payout(SpendIndex)` - payout an approved spend or retry a failed
      payout
      - `check_payment(SpendIndex)` - check the status of a payout;
      - `void_spend(SpendIndex)` - void previously approved spend;
      > existing spend dispatchable renamed to spend_local
      
      in this context, the `AssetKind` parameter contains the asset's location
      and it's corresponding `asset_id`, for example:
      `USDT` on `AssetHub`,
      ``` rust
      location = MultiLocation(0, X1(Parachain(1000)))
      asset_id = MultiLocation(0, X2(PalletInstance(50), GeneralIndex(1984)))
      ```
      
      the `Beneficiary` parameter is a `MultiLocation` in the context of the
      asset's location, for example
      ``` rust
      // the Fellowship salary pallet's location / account
      FellowshipSalaryPallet = MultiLocation(1, X2(Parachain(1001), PalletInstance(64)))
      // or custom `AccountId`
      Alice = MultiLocation(0, AccountId32(network: None, id: [1,...]))
      ```
      
      the `AssetBalance` represents the amount of the `AssetKind` to be
      transferred to the `Beneficiary`. For permission checks, the asset
      amount is converted to the native amount and compared against the
      maximum spendable amount determined by the commanding spend origin.
      
      the `spend` dispatchable allows for batching spends with different
      `ValidFrom` arguments, enabling milestone-based spending. If the
      expectations tied to an approved spend are not met, it is possible to
      void the spend later using the `void_spend` dispatchable.
      
      Asset Rate Pallet provides the conversion rate from the `AssetKind` to
      the native balance.
      
      #### Asset Rate Instance Dispatchables:
      - `create(AssetKind, Rate)` - initialize a conversion rate to the native
      balance for the given asset
      - `update(AssetKind, Rate)` - update the conversion rate to the native
      balance for the given asset
      - `remove(AssetKind)` - remove an existing conversion rate to the native
      balance for the given asset
      
      the pallet's dispatchables can be executed by the Root or Treasurer
      origins.
      
      ### Treasury Pallet
      
      Treasury Pallet can accept proposals for `spends` of various asset kinds
      and pay them out through the implementation of the `Pay` trait.
      
      New Dispatchables:
      - `spend(Config::AssetKind, AssetBalance, Config::Beneficiary,
      Option<ValidFrom>)` - propose and approve a spend;
      - `payout(SpendIndex)` - payout an approved spend or retry a failed
      payout;
      - `check_payment(SpendIndex)` - check the status of a payout;
      - `void_spend(SpendIndex)` - void previously approved spend;
      > existing spend dispatchable renamed to spend_local
      
      The parameters' types of the `spend` dispatchable exposed via the
      pallet's `Config` and allows to propose and accept a spend of a certain
      amount.
      
      An approved spend can be claimed via the `payout` within the
      `Config::SpendPeriod`. Clients provide an implementation of the `Pay`
      trait which can pay an asset of the `AssetKind` to the `Beneficiary` in
      `AssetBalance` units.
      
      The implementation of the Pay trait might not have an immediate final
      payment status, for example if implemented over `XCM` and the actual
      transfer happens on a remote chain.
      
      The `check_status` dispatchable can be executed to update the spend's
      payment state and retry the `payout` if the payment has failed.
      
      ---------
      
      Co-authored-by: default avatarjoe petrowski <[email protected]>
      Co-authored-by: command-bot <>
      cb944dc5
  18. Oct 04, 2023
  19. Oct 03, 2023
  20. Oct 02, 2023
    • Liam Aharon's avatar
      Init System Parachain storage versions and add migration check jobs to CI (#1344) · db3fd687
      Liam Aharon authored
      Makes SPs first class citizens along with the relay chains in the
      context of our CI runtime upgrade checks.
      
      ## Code changes
      
      - Sets missing current storage version in `uniques` pallet
      - Adds multisig V1 migration to run where it was missing
      - Removes executed migration whos pre/post hooks were failing from
      collectives runtime
      - Initializes storage versions for SP pallets added after genesis
      - Originally I was going to wait for
      https://github.com/paritytech/polkadot-sdk/pull/1297 to be merged so
      this wouldn't need to be done manually, but it doesn't seem like it'll
      be merged any time soon so I've decided to set them manually to unblock
      this
      
      ## CI changes
      
      - Removed dependency of `westend` runtime upgrades being complete prior
      to other ones running. I assume it is supposed to cache the
      `try-runtime` build for a performance benefit, but it seems it wasn't
      working. Maybe someone from the CI team can look into this or explain
      why it needs to be there?
      
      - Adds check-runtime-migration jobs for Parity asset-hubs, bridge-hubs
      and contract chains
      
      - Updated VARIABLES to accomodate the `kusama-runtime` package being
      renamed to `staging-kusama-runtime` in
      https://github.com/paritytech/polkadot-sdk/pull/1241
      
      - Added `EXTRA_ARGS` variable to `check-runtime-migration`, and set
      `--no-weight-warnings` to the relay chain runtime upgrade checks (relay
      chains don't have weight restrictions).
      db3fd687
  21. Sep 29, 2023
    • Sebastian Kunert's avatar
      9485b0b4
    • Bastian Köcher's avatar
      Remove kusama and polkadot runtime crates (#1731) · bf90cb0b
      Bastian Köcher authored
      This pull request is removing the Kusama and Polkadot runtime crates. As
      still some crates dependent on the runtime crates, this pull request is
      doing some more changes.
      
      - It removes the `hostperfcheck` CLI command. This CLI command could
      compare the current node against the standard hardware by doing some
      checks. Later we added the hardware benchmark feature to Substrate. This
      hardware benchmark is running on every node startup and prints a warning
      if the current node is too slow. This makes this CLI command a duplicate
      that was also depending on the kusama runtime.
      
      - The pull request is removing the emulated integration tests that were
      requiring the Kusama or Polkadot runtime crates.
      bf90cb0b
  22. Sep 28, 2023
  23. Sep 27, 2023
  24. Sep 20, 2023
  25. Sep 19, 2023
  26. Sep 18, 2023