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

Refactor Container chain spawner logic in separate crate #637

Merged
merged 7 commits into from
Jul 30, 2024

Conversation

nanocryk
Copy link
Contributor

Move logic related to starting embeded container chain node to a dedicated crate.
Adds a POC spawning of container chain node inside rpc provider command to ensure it can be called properly with available information.

@nanocryk nanocryk added a0-pleasereview Pull request needs code review. B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. not-breaking Does not need to be mentioned in breaking changes labels Jul 25, 2024
Copy link
Contributor

github-actions bot commented Jul 25, 2024

Coverage Report

(master)

@@                                 Coverage Diff                                 @@
##           master   jeremy-refactor-spawner-logic-in-separate-crate      +/-   ##
===================================================================================
- Coverage   66.88%                                            66.69%   -0.19%     
+ Files         255                                               260       +5     
+ Lines       44587                                             44710     +123     
===================================================================================
  Hits        29819                                             29819              
+ Misses      14768                                             14891     +123     
Files Changed Coverage
/container-chains/nodes/simple/src/command.rs 26.22% (-4.74%) 🔽
/node/src/chain_spec/mod.rs 100.00% (+31.48%) 🔼
/node/src/cli.rs 62.96% (+39.35%) 🔼
/node/src/command.rs 38.72% (+10.76%) 🔼
/node/src/service.rs 23.43% (+3.46%) 🔼

Coverage generated Tue Jul 30 09:44:43 UTC 2024

@girazoki
Copy link
Collaborator

@nanocryk the stagenet job fails because of #638, but I dont know why the dancebox specs job fails, can you take a look if it fails locally?

let para_id = cli.run.parachain_id.unwrap_or(2000);

let (_cc_task_manager, _cc_client, _cc_backend) =
tc_service_container_chain::service::start_node_impl_container(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question about this, we probably need to start this with very different arguments for frontier-like nodes anhd non-frontier-like nodes (specially related to the rpc-nodes). Are we going to be able to do so?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or maybe we can wire the ethereum ones to their own rpc-setup, but we for sure need to make sure not to spawn a non-ethereum registered chain in that case.

So start_node_impl_container is likely usable for substrate chains + collators but not for ethereum-nodes

relay_chain_interface,
client,
keystore,
ParaId::from(2001),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can ask the orchestrator chain about its own para-id somehow. Is there a runtime-api that we can query for this instead of hardcoding?

Copy link
Contributor

@tmpolaczyk tmpolaczyk left a comment

Choose a reason for hiding this comment

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

This refactor is great, love it

Copy link
Collaborator

@girazoki girazoki left a comment

Choose a reason for hiding this comment

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

good job @nanocryk

@nanocryk nanocryk merged commit 8947ce5 into master Jul 30, 2024
37 checks passed
@nanocryk nanocryk deleted the jeremy-refactor-spawner-logic-in-separate-crate branch July 30, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a0-pleasereview Pull request needs code review. B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants