Skip to content

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
@github-actions
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) ⚠️

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Coverage Report

@@                        Coverage Diff                         @@
##           master   pablo/test/foreign-assets-tests     +/-   ##
==================================================================
  Coverage   74.79%                            74.79%   0.00%     
  Files         400                               400             
  Lines      101212                            101212             
==================================================================
  Hits        75696                             75696             
  Misses      25516                             25516             
Files Changed Coverage

Coverage generated Tue May 13 14:00:39 UTC 2025

@pLabarta pLabarta marked this pull request as ready for review February 4, 2025 17:05
@RomarQ RomarQ marked this pull request as draft May 13, 2025 13:28
@RomarQ
Copy link
Contributor

RomarQ commented Jul 18, 2025

@pLabarta do we still want this?

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.

3 participants