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 instructions weights should comply with evm foreign assets #2883

Merged
merged 35 commits into from
Aug 15, 2024

Conversation

librelois
Copy link
Collaborator

What does it do?

With the introduction of evm foreign assets, 3 XCM instructions cost more when they handle evm foreign assets, theses instructions are:

  • WithdrawAsset
  • DepositAsset
  • TransferAsset

We currently charge only 200 000 cpu-time weights and 7242 proof size bytes, we should charge based on hardcoded gas limit for evm foreign assets operations instead.

What important points reviewers should know?

This PR need to add the new pallet-moonbeam-foreign-assets on moonriver and moonbeam because with have the same XCM benchmarks pallet for all runtimes.

The configuration of the pallet-moonbeam-foreign-assets on moonriver and moonbeam prohibit the creation of evm foreign assets, with type AssetIdFilter = Nothing;

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@librelois librelois added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit breaking Needs to be mentioned in breaking changes labels Jul 29, 2024
Copy link
Contributor

github-actions bot commented Jul 31, 2024

Coverage Report

@@                Coverage Diff                 @@
##           master   elois-xcm-fees      +/-   ##
==================================================
- Coverage   80.97%           80.96%   -0.01%     
  Files         282              282              
+ Lines       81590            81614      +24     
==================================================
+ Hits        66065            66071       +6     
+ Misses      15525            15543      +18     
Files Changed Coverage
/client/rpc/manual-xcm/src/lib.rs 88.46% (+0.46%) 🔼
/pallets/moonbeam-foreign-assets/src/lib.rs 68.18% (-1.49%) 🔽
/runtime/moonbeam/src/lib.rs 46.92% (-0.22%) 🔽
/runtime/moonbeam/src/xcm_config.rs 52.63% (-1.72%) 🔽
/runtime/moonriver/src/lib.rs 47.14% (-0.23%) 🔽
/runtime/moonriver/src/xcm_config.rs 50.53% (-1.64%) 🔽

Coverage generated Thu Aug 15 12:46:03 UTC 2024

Comment on lines 728 to 729
// TODO generate weights
type WeightInfo = ();
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO

Comment on lines 741 to 742
// TODO generate weights
type WeightInfo = ();
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO

Agusrodri
Agusrodri previously approved these changes Aug 13, 2024
@librelois librelois merged commit 7806562 into master Aug 15, 2024
37 checks passed
@librelois librelois deleted the elois-xcm-fees branch August 15, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants