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

Core assignation wired to collatorAssignment #629

Merged
merged 55 commits into from
Aug 7, 2024

Conversation

girazoki
Copy link
Collaborator

@girazoki girazoki commented Jul 17, 2024

Removes core-time traces and uses instead collator-assignation as a source of truth to assign cores. Currently the way it works is:

  • parachains get the first 0..n-1 cores, where n is the number of parachains served for this session
  • parathreads get the rest of the cores until configuration.num_cores

In order to seamlessly test this, I had to add the possibility of registering a parachain and invulnerables (collators) from genesis in the tanssi-registrar. Now you can see this works by running the appropriate zombienet suite.

Important: this only works because

  • Parachain block production is not for now in charge of the tanssi-collators (ergo, we only care that the parachain has collators assigned in the runtime, nothing else)
  • We are assigning Alice and Bob as invulnerables and these have already registered keys. pallet-session does not allow to register session-keys that are not part of active first validator set on genesis.

Whenever we constrcut the solo-chain aware collator node, this will fail. We will need an alternative solution for being able to inject the collator keys at genesis.

Todos for this PR:

[x] Rust integration tests

@girazoki girazoki added D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes labels Jul 19, 2024
Copy link
Contributor

github-actions bot commented Jul 19, 2024

Coverage Report

(master)

@@                                 Coverage Diff                                  @@
##           master   wiring-core-assignation-with-collator-assignment      +/-   ##
====================================================================================
+ Coverage   65.95%                                             66.11%   +0.16%     
  Files         263                                                263              
+ Lines       45208                                              45754     +546     
====================================================================================
+ Hits        29813                                              30246     +433     
+ Misses      15395                                              15508     +113     
Files Changed Coverage
/primitives/traits/src/lib.rs 82.95% (-1.14%) 🔽
/solo-chains/runtime/starlight/src/genesis_config_presets.rs 23.56% (+2.18%) 🔼
/solo-chains/runtime/starlight/src/lib.rs 22.25% (+2.25%) 🔼
/solo-chains/runtime/starlight/src/tests/common/mod.rs 95.94% (+0.55%) 🔼

Coverage generated Tue Aug 6 09:10:32 UTC 2024

@girazoki girazoki marked this pull request as ready for review July 29, 2024 16:52
@girazoki girazoki requested a review from ParthDesai August 2, 2024 14:30
@girazoki girazoki merged commit 5394912 into master Aug 7, 2024
37 checks passed
@girazoki girazoki deleted the wiring-core-assignation-with-collator-assignment branch August 7, 2024 08:14
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 D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants