Skip to content

Conversation

@dharjeezy
Copy link
Contributor

closes #9043

bkchr and others added 8 commits February 28, 2025 14:52
This adds remote proxy support to AssetHub on Polkadot and Kusama.
Currently it is configured only to support using proxies registered on
the relay chain to work on AssetHub. In the future this can be expanded.

---------

Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This Pull Request provides a minimal set of changes to support the
upgrade to `stable2412` (to the latest available patch).

## Notable changes

Here are the most notable changes:

- `sp-std` removed for every runtime (except Encointer). Now we use
`core` or `alloc` instead.
- Mocked weights for `frame_system_extensions`,
`pallet_transaction_payment`, and `xcm` on most runtimes.
- Mocked weights for `pallet_identity` on People runtimes.
- Update to XCMv5 started.

## Notable TODOs

- [x] ~Review whether we need to make more changes regarding XCMv5~
(moved to a follow-up PR). @franciscoaguirre
- [x] In Asset Hubs, the benchmarking options for
`pallet-asset-conversion-tx-payment` is not exposed (or at least, is
raising errors when trying to add it).
- [x] For `polkadot-runtime`, do we still need `coretime_migration.rs`?
@seadanda
- [x] Assist with the initial implementation of `TransactionExtension`
@georgepisaltu @gui1117

## Open Question

- Shouldn't we start using `frame`, `#[frame_construct_runtime]` and
`#[derive_impl]` since they've already been proven to work?

## Help needed

- [x] @clangenb to update and re-enable Encointer.

## Action List

- [x] ~Remove any reference to either `NetworkId::Westend` and
`NetworkId::Rococo` and replace with `NetworkId::ByGenesis`~ (moved to a
follow-up PR).
- [x] Upgrade to `stable2412-3`
- [x] Setup filter for pallet-staking to exclude pool members. See
comment
[here](polkadot-fellows/runtimes#608 (comment)).

## Follow-up PRs

- [ ] Refresh weights (to do before this release). ;)
- [ ] Move to XCMv5.
- [ ] Remove `sp-std`.

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: clangenb <37865735+clangenb@users.noreply.github.com>
Co-authored-by: Dónal Murray <donalm@seadanda.dev>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: Alexandre Baldé <alexandre.balde@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Is disabled encointer for now and copied over the weight files from
Polkadot SDK to reduce errors. Will be overwritten by the bench bot
anyways.

## Open Tasks

- [x] Fix remaining errors in snowbridge test code @claravanstaden
- [x] Enable Encointer and fix errors
- [x] Bump to stable 2503-2
- [x] Find all missing storage migrations
- [x] Update Changelog
- [x] Waiting for new polkadot-sdk release with fixed pallet_session
migration
- [x] Waiting for new frame-omni-bencher binary with
paritytech#8265

## Follow Ups:
- Rebench
- Add pallet_revive to Kusama AssetHub
- Bump `transaction_version`

---------

Co-authored-by: Pablo Andrés Dorado Suárez <hola@pablodorado.com>
Co-authored-by: Christian Langenbacher <clangenb+gh@protonmail.ch>
Co-authored-by: claravanstaden <claravanstaden64@gmail.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Dónal Murray <donal.murray@parity.io>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Ankan <ankan.anurag@gmail.com>
The change follows [polkadot-sdk's clippy
usage](https://github.com/paritytech/polkadot-sdk/blob/4173aac8abc7e518d4048306c18d4f2176241206/.github/workflows/checks.yml#L39C1-L40C1)
to also verify feature gated code like `test` or `runtime-benchmarks`

It also fixes current findings (only tests and benchmarks related code)

- [x] Does not require a CHANGELOG entry

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
@dharjeezy dharjeezy marked this pull request as ready for review July 3, 2025 12:52
@dharjeezy dharjeezy requested a review from a team as a code owner July 3, 2025 12:52
Comment on lines 13 to 21
cumulus-pallet-parachain-system = { workspace = true }
cumulus-primitives-core = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-proxy = { workspace = true }
sp-core = { workspace = true }
sp-trie = { workspace = true }
sp-runtime = { workspace = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please upgrade to just use the frame crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when i tried specifying just the frame crate, i had this issue

error: failed to select a version for `polkadot-sdk-frame`.
    ... required by package `polkadot-service v7.0.1 (/Users/dharjeezy/Documents/polkadot-sdk/polkadot/node/service)`
    ... which satisfies path dependency `polkadot-service` (locked to 7.0.1) of package `cumulus-test-service v0.1.0 (/Users/dharjeezy/Documents/polkadot-sdk/cumulus/test/service)`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have been able to get this done successfully @bkchr

Ok(())
}

// TODO: Make upstream public and use that one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this Todo :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have done this


// We always remove all the old items before, thus there should always be space in
// the vector.
let _res = roots.try_push((block, hash));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if the last item block number is already in there. This can happen because we sometimes build multiple parachain blocks on the same relay chain block.

Please also add a test for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have done this

@bkchr
Copy link
Member

bkchr commented Jul 3, 2025

CC @josepot

@josepot
Copy link
Contributor

josepot commented Jul 4, 2025

👋 @dharjeezy

Thanks a lot for porting this work into this repo!

Just an FYI that once this gets merged, I will start working on an improved version of this functionality, just in case that you have some thoughts/ideas about that improvement, or if you want to help me get that work done 🙂.

@dharjeezy dharjeezy requested a review from bkchr July 7, 2025 12:28
…let-from-runtimes

# Conflicts:
#	Cargo.lock
#	polkadot/runtime/westend/Cargo.toml
@dharjeezy
Copy link
Contributor Author

@bkchr can i get your review again here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port remote-proxy pallet to the Polkadot-SDK & make it available on Westend

6 participants