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

Test 🧪: add gas/weight tests for Foreign Assets calls #3176

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

pLabarta
Copy link
Contributor

@pLabarta pLabarta commented Feb 4, 2025

What does it do?

This PR adds tests for checking weight and gas costs associated with creating and interacting with Foreign Assets. On the Substrate side it checks the weights for creation, freeze, unfreeze and changing the XCM location. On the EVM side it just checks gas costs associated with a simple transfer.

What important points should reviewers know?

The key aspect of these tests is checking that the costs are not over the block limits and seem reasonable. This comes after detecting an issue in the benchmarks for these calls that caused much higher weights than the actual used storage and compute time.

Is there something left for follow-up PRs?

This PR does not consider XCM tests for interacting with the new implementation of Foreign Assets. These should be added to #3104.

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?

@pLabarta pLabarta added B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime code (so can't be audited) labels Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2420 KB (no changes) 🚨

Moonbeam runtime: 2404 KB (no changes) 🚨

Moonriver runtime: 2392 KB (no changes) ✅

Compared to latest release (runtime-3401)

Moonbase runtime: 2420 KB (+388 KB compared to latest release) 🚨

Moonbeam runtime: 2404 KB (+392 KB compared to latest release) 🚨

Moonriver runtime: 2392 KB (+380 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Coverage Report

@@                        Coverage Diff                         @@
##           master   pablo/test/foreign-assets-tests     +/-   ##
==================================================================
  Coverage   74.59%                            74.59%   0.00%     
  Files         380                               380             
  Lines       96029                             96029             
==================================================================
  Hits        71632                             71632             
  Misses      24397                             24397             
Files Changed Coverage

Coverage generated Tue Feb 4 17:50:25 UTC 2025

@pLabarta pLabarta marked this pull request as ready for review February 4, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B0-silent Changes should not be mentioned in any release notes D2-notlive PR doesn't change runtime code (so can't be audited)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant