Skip to content
Snippets Groups Projects
  1. Apr 16, 2024
  2. Apr 15, 2024
  3. Apr 14, 2024
  4. Apr 13, 2024
  5. Apr 12, 2024
    • Vedhavyas Singareddi's avatar
      define block hash provider and default impl using frame_system (#4080) · 5b513cc0
      Vedhavyas Singareddi authored
      This PR introduces `BlockHashProvider` into `pallet_mmr::Config`
      This type is used to get `block_hash` for a given `block_number` rather
      than directly using `frame_system::Pallet::block_hash`
      
      The `DefaultBlockHashProvider` uses `frame_system::Pallet::block_hash`
      to get the `block_hash`
      
      Closes: #4062
    • Branislav Kontur's avatar
      Remove `xcm::v3` from `assets-common` nits (#4037) · 5601f286
      Branislav Kontur authored
      This PR mainly removes `xcm::v3` stuff from `assets-common` to make it
      more generic and facilitate the transition to newer XCM versions. Some
      of the implementations here used hard-coded `xcm::v3::Location`, but now
      it's up to the runtime to configure according to its needs.
      
      Additional/consequent changes:
      - `penpal` runtime uses now `xcm::latest::Location` for `pallet_assets`
      as `AssetId`, because we don't care about migrations here
      - it pretty much simplify xcm-emulator integration tests, where we don't
      need now a lots of boilerplate conversions:
            ```
            v3::Location::try_from(...).expect("conversion works")`
            ```
      - xcm-emulator tests
      - split macro `impl_assets_helpers_for_parachain` to the
      `impl_assets_helpers_for_parachain` and
      `impl_foreign_assets_helpers_for_parachain` (avoids using hard-coded
      `xcm::v3::Location`)
    • Squirrel's avatar
      Remove redundent logging code (#4059) · b28ba4ae
      Squirrel authored
      
      1. The `CustomFmtContext::ContextWithFormatFields` enum arm isn't
      actually used and thus we don't need the enum anymore.
      
      2. We don't do anything with most of the normalized metadata that's
      created by calling `event.normalized_metadata();` - the `target` we can
      get from `event.metadata.target()` and level we can get from
      `event.metadata.level()` - let's just call them direct to simplify
      things. (`event.metadata()` is just a field call under the hood)
      
      Changelog: No functional changes, might run a tad faster with lots of
      logging turned on.
      
      ---------
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
    • Przemek Rzad's avatar
      Synchronize templates (#4040) · c963dc28
      Przemek Rzad authored
      - Progresses https://github.com/paritytech/polkadot-sdk/issues/3155
      
      ### What's inside
      
      A job, that will take each of the three
      [templates](https://github.com/paritytech/polkadot-sdk/tree/master/templates),
      yank them out of the monorepo workspace, and push to individual
      repositories
      ([1](https://github.com/paritytech/polkadot-sdk-minimal-template),
      [2](https://github.com/paritytech/polkadot-sdk-parachain-template),
      [3](https://github.com/paritytech/polkadot-sdk-solochain-template)).
      
      In case the build/test does not succeed, a PR such as [this
      one](https://github.com/paritytech-stg/polkadot-sdk-solochain-template/pull/2)
      gets created instead.
      
      I'm proposing a manual dispatch trigger for now - so we can test and
      iterate faster - and change it to fully automatic triggered by releases
      later.
      
      The manual trigger looks like this:
      
      <img width="340px"
      src="https://github.com/paritytech/polkadot-sdk/assets/12039224/e87e0fda-23a3-4735-9035-af801e8417fc"/>
      
      ### How it works
      
      The job replaces dependencies [referenced by
      git](https://github.com/paritytech/polkadot-sdk/blob/d733c77e/templates/minimal/pallets/template/Cargo.toml#L25)
      with a reference to released crates using
      [psvm](https://github.com/paritytech/psvm).
      
      It creates a new workspace for the template, and adapts what's needed
      from the `polkadot-sdk` workspace.
      
      ### See the results
      
      The action has been tried out in staging, and the results can be
      observed here:
      
      - [minimal
      stg](https://github.com/paritytech-stg/polkadot-sdk-minimal-template/)
      - [parachain
      stg](https://github.com/paritytech-stg/polkadot-sdk-parachain-template/)
      - [solochain
      stg](https://github.com/paritytech-stg/polkadot-sdk-solochain-template/)
      
      These are based on the `1.9.0` release (using `release-crates-io-v1.9.0`
      branch).
    • wersfeds's avatar
      chore: fix some typos (#4095) · 480d5d0f
      wersfeds authored
    • Adrian Catangiu's avatar
      pallet-xcm: add new extrinsic for asset transfers using explicit XCM transfer types (#3695) · 1e971b8d
      Adrian Catangiu authored
      
      # Description
      
      Add `transfer_assets_using()` for transferring assets from local chain
      to destination chain using explicit XCM transfer types such as:
      - `TransferType::LocalReserve`: transfer assets to sovereign account of
      destination chain and forward a notification XCM to `dest` to mint and
      deposit reserve-based assets to `beneficiary`.
      - `TransferType::DestinationReserve`: burn local assets and forward a
      notification to `dest` chain to withdraw the reserve assets from this
      chain's sovereign account and deposit them to `beneficiary`.
      - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM
      to `reserve` chain to move reserves from this chain's SA to `dest`
      chain's SA, and forward another XCM to `dest` to mint and deposit
      reserve-based assets to `beneficiary`. Typically the remote `reserve` is
      Asset Hub.
      - `TransferType::Teleport`: burn local assets and forward XCM to `dest`
      chain to mint/teleport assets and deposit them to `beneficiary`.
      
      By default, an asset's reserve is its origin chain. But sometimes we may
      want to explicitly use another chain as reserve (as long as allowed by
      runtime `IsReserve` filter).
      
      This is very helpful for transferring assets with multiple configured
      reserves (such as Asset Hub ForeignAssets), when the transfer strictly
      depends on the used reserve.
      
      E.g. For transferring Foreign Assets over a bridge, Asset Hub must be
      used as the reserve location.
      
      # Example usage scenarios
      
      ## Transfer bridged ethereum ERC20-tokenX between ecosystem parachains.
      
      ERC20-tokenX is registered on AssetHub as a ForeignAsset by the
      Polkadot<>Ethereum bridge (Snowbridge). Its asset_id is something like
      `(parents:2, (GlobalConsensus(Ethereum), Address(tokenX_contract)))`.
      Its _original_ reserve is Ethereum (only we can't use Ethereum as a
      reserve in local transfers); but, since tokenX is also registered on
      AssetHub as a ForeignAsset, we can use AssetHub as a reserve.
      
      With this PR we can transfer tokenX from ParaA to ParaB while using
      AssetHub as a reserve.
      
      ## Transfer AssetHub ForeignAssets between parachains
      
      AssetA created on ParaA but also registered as foreign asset on Asset
      Hub. Can use AssetHub as a reserve.
      
      And all of the above can be done while still controlling transfer type
      for `fees` so mixing assets in same transfer is supported.
      
      # Tests
      
      Added integration tests for showcasing:
      - transferring local (not bridged) assets from parachain over bridge
      using local Asset Hub reserve,
      - transferring foreign assets from parachain to Asset Hub,
      - transferring foreign assets from Asset Hub to parachain,
      - transferring foreign assets from parachain to parachain using local
      Asset Hub reserve.
      
      ---------
      
      Co-authored-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: command-bot <>
    • Liam Aharon's avatar
      update doc · cd77fb3b
      Liam Aharon authored
    • Liam Aharon's avatar
      is_zero() · f903ea2e
      Liam Aharon authored
    • Liam Aharon's avatar
      pure fns · 44191335
      Liam Aharon authored
    • Liam Aharon's avatar
      address comment · 767af862
      Liam Aharon authored
    • Andrei Sandu's avatar
      Runtime API: introduce `candidates_pending_availability` (#4027) · 2dfe5f74
      Andrei Sandu authored
      
      Fixes https://github.com/paritytech/polkadot-sdk/issues/3576
      
      Required by elastic scaling collators.
      Deprecates old API: `candidate_pending_availability`.
      
      TODO:
      - [x] PRDoc
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
    • Svyatoslav Nikolsky's avatar
      Move bridge extensions to a separate folder (#4096) · a1cb2a51
      Svyatoslav Nikolsky authored
      As requested in
      https://github.com/paritytech/parity-bridges-common/pull/2873#discussion_r1558974215
    • eskimor's avatar
      Improve docs of broker pallet (#3980) · a64009ae
      eskimor authored
      
      Small adjustments which should make understanding what is going on much
      easier for future readers.
      
      Initialization is a bit messy, the very least we should do is adding
      documentation to make it harder to use wrongly.
      
      I was thinking about calling `request_core_count` right from
      `start_sales`, but as explained in the docs, this is not necessarily
      what you want.
      
      ---------
      
      Co-authored-by: default avatareskimor <eskimor@no-such-url.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: default avatarDónal Murray <donal.murray@parity.io>
    • Xiliang Chen's avatar
      establish_channel_with_system (#3721) · b1db5f3a
      Xiliang Chen authored
      
      Implements https://github.com/polkadot-fellows/RFCs/issues/82
      Allow any parachain to have bidirectional channel with any system
      parachains
      
      Looking for initial feedbacks before continue finish it
      
      TODOs:
      - [x] docs
      - [x] benchmarks
      - [x] tests
      
      ---------
      
      Co-authored-by: default avatarjoe petrowski <25483142+joepetrowski@users.noreply.github.com>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
    • Andrei Sandu's avatar
      Adjust zombienet test resources and logic (#4032) · 13ca339e
      Andrei Sandu authored
      
      One more try to make this test robust from a resource perspective.
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <andrei-mihail@parity.io>
      Co-authored-by: default avatarJavier Viola <javier@parity.io>
    • PG Herveou's avatar
    • Liam Aharon's avatar
      Merge branch 'liam-staking-rewards-pallet' of... · 2ec60393
      Liam Aharon authored
      Merge branch 'liam-staking-rewards-pallet' of github.com:paritytech/polkadot-sdk into liam-staking-rewards-pallet
    • Liam Aharon's avatar
      fix doc build · 1c1646e6
      Liam Aharon authored
    • command-bot's avatar
      ".git/.scripts/commands/fmt/fmt.sh" · eaa7fdfd
      command-bot authored
      eaa7fdfd
    • Liam Aharon's avatar
      Merge branch 'liam-staking-rewards-pallet' of... · b46d609f
      Liam Aharon authored
      Merge branch 'liam-staking-rewards-pallet' of github.com:paritytech/polkadot-sdk into liam-staking-rewards-pallet
    • Liam Aharon's avatar
      kitchensink weightinfo · b56af273
      Liam Aharon authored
    • Liam Aharon's avatar
    • Liam Aharon's avatar
    • Liam Aharon's avatar