Open chungquantin opened 4 months ago
Thanks for the feedback! We will definitely include this. We have a discussion here https://github.com/r0gue-io/pop-cli/issues/129 where we are discussing what's the best UX for this new feature you are proposing among other functionalities.
As discussed here: https://github.com/r0gue-io/pop-cli/issues/129
Use the pop up chain
command to run a solo chain
Hey @AlexD10S, I received a request of this feature, wonder if it is added to the v0.3.0 release? Because I could not see it on my local.
No, this feature has not been included yet. We need to discuss the UX on how to include this @brunopgalvao
I do agree with @chungquantin
Substrate solochain should be a complete vertical within Pop CLI.
The following should be added:
- Generate a new parachain, pallet or smart contract
+ Generate a new solochain, parachain, pallet or smart contract
Usage: pop new
pop new <COMMAND>
Commands:
parachain Generate a new parachain
+ solochain Generate a new solochain
pallet Generate a new pallet
contract Generate a new smart contract
help Print this message or the help of the given subcommand(s)
- Launch a local network or deploy a smart contract
+ Launch a local network, run a solochain, or deploy a smart contract
Usage: pop up
pop up <COMMAND>
Commands:
parachain Launch a local network
+ solochain Run a solochain
contract Deploy a smart contract
help Print this message or the help of the given subcommand(s)
As well as in the future, make solochain feature-complete in Pop CLI, meaning that when we include features such as pop add pallet
for parachains, we also support solochains.
Having support for Substrate solochains will strength the Pop CLI appchain narrative, is desired by the community, and will help spread the power of Substrate to newcomers.
In regards to https://github.com/r0gue-io/pop-cli/issues/129, the pop up
command should be able to detect the CWD and see if it is within a parachain directory, a solochain directory, or a smart contract directory (similar to pop build
) and launch the appropriate configuration reading the zombienet network config file simply by running pop up [OPTIONS]
. pop up parachain [OPTIONS]
and pop up solochain [OPTIONS]
commands would still be available incase the devs would like to specify [OPTIONS] manually through the CLI.
Additionally, there should be some reserved pop up
commands w/ pre-configured network files, such as:
pop up polkadot [OPTIONS]
- spins up latest version of polkadot relay chain
Additional input to the design of the solochain, we can have a template repository called base-solochain
but we must reorganize the templates somehow to have everything built on top of the base-solochain
:
base-solochain
as a foundational templatebase-parachain
= base-solochain
+ parachain-plugin
(plugin added to automatically convert the solochain to a parachain)asset-solochain
= base-solochain
+ asset-plugin
contract-solochain
= base-solochain
+ contract-plugin
asset-parachain
= base-solochain
+ parachain-plugin
+ asset-plugin
I have used pop-cli
for Substrate educational purposes and pop up parachain
will be a bit overkill for the newcomers of the polkadot ecosystem because they have no context of the parachain yet.
I can confirm that this vertical (solochain) will be the onboarding platform for PBA students as their curriculum starts with working with Substrate solochains.
I can confirm that this vertical (solochain) will be the onboarding platform for PBA students as their curriculum starts with working with Substrate solochains.
Technically, it shouldn't be very complex. The key question is how we want to integrate it from a UX perspective and which solochain templates we want to offer. Kian from Parity also shared the two new templates they are supporting (https://github.com/r0gue-io/pop-cli/issues/238):
https://github.com/paritytech/polkadot-sdk-minimal-template https://github.com/paritytech/polkadot-sdk-solochain-template
Right now, pop only has an option to create a contract or a parachain with
pop new parachain
. From my perspective, to make POP completes, we should add an option to create a solochainpop new solochain
. Then incremental steps can be added to the CLI to turn the solochain to a parachain.