Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCM Update #1043

Merged
merged 12 commits into from
Oct 12, 2023
Merged

XCM Update #1043

merged 12 commits into from
Oct 12, 2023

Conversation

gitofdeepanshu
Copy link
Contributor

@gitofdeepanshu gitofdeepanshu commented Oct 7, 2023

Pull Request Summary
This PR is in continuation with #996 and updates xcm precompile and pallet-xcm
Issue - #1037

Changes

  • add support for native token transfer in transfer function of xcm precompile
  • use xtokens for all token transfers in precompile
  • remove custom-fork of pallet-xcm and use the official pallet-xcm by Parity.

To Do

  • remove the usage of reserve_withdraw_assets from tests
  • pallet_xcm transfer calls block ( removed from this PR, will be done later)

Check list

  • added or updated unit tests
  • updated Astar official documentation
  • added OnRuntimeUpgrade hook for precompile revert code registration
  • updated spec version
  • updated semver

@gitofdeepanshu gitofdeepanshu added shiden related to shiden runtime astar Related to Astar shibuya related to shibuya runtime This PR/Issue is related to the topic “runtime”. labels Oct 8, 2023
@gitofdeepanshu
Copy link
Contributor Author

/bench astar-dev pallet_xcm

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/6453476552.
Please wait for a while.
Branch: feat/xcm-precompile-update-2
SHA: 1e920cf

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Benchmarks have been finished.
You can download artifacts if exists https://github.com/AstarNetwork/Astar/actions/runs/6453476552.

@gitofdeepanshu gitofdeepanshu marked this pull request as ready for review October 10, 2023 04:40
@gitofdeepanshu gitofdeepanshu marked this pull request as draft October 10, 2023 05:43
@gitofdeepanshu gitofdeepanshu marked this pull request as ready for review October 10, 2023 09:18
runtime/shibuya/src/weights/pallet_xcm.rs Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

What about reserve_transfer_assets usage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the usage of reserve_transfer_assets from parachain calls in tests.

precompiles/xcm/src/lib.rs Outdated Show resolved Hide resolved
precompiles/xcm/src/lib.rs Show resolved Hide resolved
precompiles/xcm/src/tests.rs Outdated Show resolved Hide resolved
precompiles/xcm/src/tests.rs Show resolved Hide resolved
@gitofdeepanshu gitofdeepanshu changed the title XCM Precompile Update XCM Update Oct 11, 2023
precompiles/xcm/src/lib.rs Outdated Show resolved Hide resolved
precompiles/xcm/src/lib.rs Outdated Show resolved Hide resolved
precompiles/xcm/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@Dinonard Dinonard left a comment

Choose a reason for hiding this comment

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

No more substantial comments, but we need to discuss first whether to block old calls immediately or later.

precompiles/xcm/src/lib.rs Show resolved Hide resolved
Copy link
Member

@Dinonard Dinonard left a comment

Choose a reason for hiding this comment

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

Forgot about this one in runtime .toml files:

# TODO: remove this once we get rid of `pallet-xcm` fork & double dep
polkadot-runtime = { workspace = true, optional = true }

Please remove this now.

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/types/dapps-staking/src 0% 0%
precompiles/utils/macro/src 0% 0%
precompiles/utils/src/testing 38% 0%
chain-extensions/types/xvm/src 0% 0%
chain-extensions/pallet-assets/src 0% 0%
chain-extensions/types/assets/src 0% 0%
pallets/dynamic-evm-base-fee/src 81% 0%
pallets/collator-selection/src 69% 0%
pallets/xc-asset-config/src 53% 0%
precompiles/sr25519/src 79% 0%
precompiles/assets-erc20/src 76% 0%
pallets/dapps-staking/src/pallet 85% 0%
precompiles/dapps-staking/src 93% 0%
precompiles/substrate-ecdsa/src 78% 0%
precompiles/utils/src 55% 0%
chain-extensions/xvm/src 0% 0%
pallets/dapps-staking/src 81% 0%
pallets/ethereum-checked/src 48% 0%
precompiles/xcm/src 75% 0%
pallets/contracts-migration/src 0% 0%
primitives/src 62% 0%
primitives/src/xcm 66% 0%
chain-extensions/dapps-staking/src 0% 0%
pallets/unified-accounts/src 80% 0%
pallets/block-reward/src 85% 0%
pallets/xvm/src 40% 0%
precompiles/xvm/src 75% 0%
Summary 56% (2192 / 3880) 0% (0 / 0)

Minimum allowed line rate is 50%

@gitofdeepanshu gitofdeepanshu merged commit 58780ad into master Oct 12, 2023
8 checks passed
@gitofdeepanshu gitofdeepanshu deleted the feat/xcm-precompile-update-2 branch October 12, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astar Related to Astar runtime This PR/Issue is related to the topic “runtime”. shibuya related to shibuya shiden related to shiden runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants