-
Notifications
You must be signed in to change notification settings - Fork 40
feat(up): add support for launching networks without network config files #523
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
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #523 +/- ##
==========================================
+ Coverage 78.69% 79.34% +0.65%
==========================================
Files 101 106 +5
Lines 23922 25828 +1906
Branches 23922 25828 +1906
==========================================
+ Hits 18825 20494 +1669
- Misses 2886 3047 +161
- Partials 2211 2287 +76
🚀 New features to boost your workflow:
|
7d70d0d to
cad5ad0
Compare
e39f4bd to
b4847b8
Compare
AlexD10S
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, this is a really useful feature that makes it much easier for developers to spin up complex local environments. It also opens the door to building a more interactive setup guide or UI, which could really help newcomers onboard more smoothly.
I noticed that in the code you’re introducing the term Parachain again for new structs and methods. Do you think this could be refactored or renamed after the inital refactored we started a month ago.
Just a couple of minor nitpicks:
- The description example:
pop up kusama --port 8833 --parachain asset-hub:9977,pop:9944doesn't seem to work. Runningpop up kusama --helpshows thatpopisn’t listed as a supported parachain:
-p, --parachain <PARACHAIN>
The parachain(s) to be included. An optional parachain identifier and/or port can be affixed
via #id and :port specifiers (e.g. `asset-hub#1000:9944`) [possible values: asset-hub,
bridge-hub, coretime, people]
- The
#id:portformat (e.g.,asset-hub#1000:9944) could be a bit confusing for newcomers. I don’t have a better idea to support a list, but longer-term, an interactive guide or wizard could make this much more approachable.
Once this is merged, it would be worth updating the documentation https://learn.onpop.io/appchains.
ccc1fe8 to
92ab011
Compare
I'm not sure it warrants a UI tbh, at least not anytime soon. A UI makes sense for some contexts (e.g. call, where there are many possible calls and many parameters), but slapping a UI on something for the sake of it, when it can be improved to be simpler and therefore more powerful has more value. I would personally rather use shell history/auto-completes with simple commands, than be confronted with a complex UI that I need to interact with for a few minutes each time.
As discussed separately, will refactor to use 'rollup'.
This is intentional. There is no deployment on Kusama, there is no reserved para on Kusama, there is no runtime specifically targeting Kusama. I updated the example commands in the PR description to remove pop from the kusama example.
Perhaps, but anyone that has familiarity with urls should know that ports are specified via :port and fragment identifiers via #hash. This general approach is already used in pop-cli/crates/pop-cli/src/commands/up/network.rs Lines 39 to 40 in 1c4797d
|
e377c9b to
168b557
Compare
2dc3a2a to
af3d4ac
Compare
AlexD10S
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing my points and answering my questions, everything looks good to me. Great work on this! I just left two comments, but they're minor nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks awesome. This feature improves the experience a lot because users don't need a network file to launch a network. I left a few nitpicks / improvements.
The PR is quite big so there might be things overseen, I still need to test the functionality but other than that, I am happy to approve if everything works well.
Edit: I have a few concerns on how the command can be used here:
Based on the example usage:
pop up paseo -p asset-hub,pop -r stable2412-4
pop up kusama --port 8833 --parachain asset-hub:9944 -r stable2412-4
pop up polkadot --port 8833 --parachain asset-hub:9977,pop#3395:9944 -r stable2412-4
pop up westend -p asset-hub
Would it be cleaner to follow the below command design?
pop up --relay kusama:8833 --para asset-hub:9944 -r stable2412-4
Here we can keep it consistent between the relaychain parameter and parachain parameter. And no new commands introduced. (I know it breaks the overall design of the PR but just something to consider imo).
Another point is the -r tag, why not -v tag for the version?
pop up kusama --port 8833 --parachain asset-hub:9944 -v stable2412-4
Co-authored-by: Tin Chung <[email protected]>
Co-authored-by: Tin Chung <[email protected]>
Co-authored-by: Tin Chung <[email protected]>
Co-authored-by: Tin Chung <[email protected]>
Co-authored-by: Tin Chung <[email protected]>
Co-authored-by: Tin Chung <[email protected]>
Co-authored-by: Tin Chung <[email protected]>
Technically it would be
if you look at the existing options for |
…red archive contents refactor(sourcing): introduce archivefilespec struct for defining required archive contents
a031f07 to
332ee1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for applying my feedback. Functionalities work well. Can't wait to see this feature used in production.
Edit: try runtime test is failing, probably due to the runtime used in the tests upgraded. We can fix it in a separate PR to avoid nuances.
Improvements to the
pop upcommand to enable the launching of networks with supported parachains without the need for network configuration files. A 'supported' parachain is simply one that is added to theParachainenum within thepop-parachainscrate, simply so that we can know how to source the binaries/chain-spec-generators for the chain to launch it as quickly as possible.Goal
Support as much of the configuration in https://github.com/r0gue-io/pop-node/blob/main/networks/devnet.toml as possible:
Example usage:
The last arg explicitly specifies the relay binary version to work around current issues with
stable2503and thev1.4.3release of Paseo. They would ordinarily not be required. Everything 'just works' on Westend.Notes:
pop up network, eliminating the need for--file/-f.TODOs:
popshould auto-add asset-hub as a dependency, fund sovereign account on AH, notify user if AH not specified[sc-3612]