substrate-docs
substrate-docs copied to clipboard
Replace `polkadot-launch` content with parachain-launch & zombinet
Motivation
launch is going away
We need to replace polkadot-launch throughout the docs, there is better tooling now, some community maintained and generally better UX tool to test things out in a similar fashion.
https://github.com/open-web3-stack/parachain-launch
- [ ] asses if zero docker knowledge is needed, we don't want to have users need anything but the ability to run commands as instructed to get things working and iterating on.
- [ ] ensure running against local binaries is possible and document here and upstream
- [ ] If very simple, perhaps make a local image (would require and extra how-to on building docker images for any substrate project)
https://github.com/paritytech/zombienet
https://hackmd.io/uJHjSDhvQICEvm87m9970A
Considerations
- [ ] Replace or add new config files to the parachain template that is AFAIK unmaintained.
This is great that we are moving in favor of Zombienet. One update I would suggest would be to modify instructions on creating Docker images in respective repos (polkadot, cumulus) to add the --platform=linux/amd64 flag so that these instructions are compatible with M1 chips. So the whole script would look something like:
cumulus (https://github.com/paritytech/cumulus#build--launch-rococo-collators)
$ docker run --rm -it -w /shellhere/cumulus \
-v $(pwd):/shellhere/cumulus \
--platform=linux/amd64 paritytech/ci-linux:production cargo build --release --locked -p polkadot-parachain
sudo chown -R $(id -u):$(id -g) target/
polkadot (https://github.com/paritytech/polkadot#build-from-source-with-docker)
git checkout <latest tagged release>
docker run --rm -it -w /shellhere/polkadot \
-v $(pwd):/shellhere/polkadot \
--platform=linux/amd64 paritytech/ci-linux:production cargo build --release
sudo chown -R $(id -u):$(id -g) target/
Created a PR on Cumulus: https://github.com/paritytech/cumulus/pull/1336
Here is a working config for Zombienet with 4 validators, "rockmine" common goods chain, and contracts parachain. This config uses local binaries and is working:
[relaychain]
default_command = "./polkadot"
default_args = [ "-lparachain=debug" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "alice"
validator = true
[[relaychain.nodes]]
name = "bob"
validator = true
[[relaychain.nodes]]
name = "charlie"
validator = true
[[relaychain.nodes]]
name = "dave"
validator = true
[[parachains]]
id = 1000
cumulus_based = true
chain="statemine-local"
[parachains.collator]
name = "statemine-local"
command = "./polkadot-parachain-rockmine"
args = ["-lparachain=debug"]
[[parachains]]
id = 1002
cumulus_based = true
chain="contracts-rococo-dev"
[parachains.collator]
name = "contracts"
command = "./polkadot-parachain"
args = ["-lparachain=debug"]
For the
polkadot-parachain-rockminebinary, I had to find and replace instances ofkusamain the chainspec.rs file withrococo.