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

Incorporate ts-tests to starlight #673

Merged
merged 37 commits into from
Sep 10, 2024

Conversation

girazoki
Copy link
Collaborator

@girazoki girazoki commented Sep 2, 2024

This PR adds a bunch of typescript tests to the starlight runtime which were missing. In general I took inspiration of those things that are already being tested in dancebox, so that involved the following test structure re-organization:

common-xcm -> common-xcm-parachain (as they are xcm tests that run under a parachain context)
common-tanssi -> common-tanssi-parachain (tests for tanssi in parachain mode, i.e., dancebox & flashbox)
common-tanssi contains now tests for tanssi in both relay and parachain mode
common-all -> common-all-parachain  (tests that run for all parachains, i.e., dancebox flashbox and templates)
common-all  now contains tests that run for all chains (starlight, dancebox, flashbox, and templates)

Additional changes to the starlight runtime:

I had to modify some parts of the genesis preconfiguration to include:

  • A relay-side registration when we inject container-chains, which involved mocking the head state. This works for dev tests (as we are doing nothing with the head-state) and worked with zombienet (because it overrides it). However a better way of handling this will be proposed in a separate PR.

  • Modification of pallet-treasury to only allow spends in the local native token.

  • Removal of some of the starlight pallets that were not playing any role: pallet-indices and pallet-recovery

  • Removal in starlight of the filter call to pallet-identity as the motivation for this was that the identity system chain which we dont have

TODOs for future PRs:

  • wasmtime-precompiled argument to spend less time in testing
  • sanitization in genesis, specially for the case of the head-state
  • More typescript tests for starlight, specially regarding inclusion of candidates and incoming XCM messages

Copy link
Contributor

github-actions bot commented Sep 2, 2024

Coverage Report

(master)

@@                             Coverage Diff                             @@
##           master   girazoki-incorporate-tests-to-starlight      +/-   ##
===========================================================================
+ Coverage   67.48%                                    70.31%   +2.83%     
  Files         264                                       264              
+ Lines       47895                                     47946      +51     
===========================================================================
+ Hits        32321                                     33711    +1390     
- Misses      15574                                     14235    -1339     
Files Changed Coverage
/runtime/dancebox/src/weights/pallet_treasury.rs 60.29% (+33.82%) 🔼
/solo-chains/client/cli/src/command.rs 42.79% (+42.79%) 🔼
/solo-chains/node/tanssi-relay/src/main.rs 100.00% (+100.00%) 🔼
/solo-chains/node/tanssi-relay-service/src/chain_spec.rs 29.17% (+29.17%) 🔼
/solo-chains/node/tanssi-relay-service/src/dev_service.rs 88.18% (+88.18%) 🔼
/solo-chains/runtime/starlight/src/genesis_config_presets.rs 53.24% (+31.64%) 🔼
/solo-chains/runtime/starlight/src/lib.rs 65.88% (+37.59%) 🔼

Coverage generated Tue Sep 10 08:28:25 UTC 2024

@girazoki girazoki added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. breaking Needs to be mentioned in breaking changes labels Sep 4, 2024
@girazoki girazoki marked this pull request as ready for review September 5, 2024 13:34
@girazoki girazoki merged commit ba51da9 into master Sep 10, 2024
38 checks passed
@girazoki girazoki deleted the girazoki-incorporate-tests-to-starlight branch September 10, 2024 08:35
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 D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants