Launch a local network
How to get our parachain running on localhost
Last updated
How to get our parachain running on localhost
Last updated
A minimum local dev network consists of 2 relay chain nodes and 1 parachain node. To launch it, there're two ways (taking litentry as an example, litmus is similar):
make sure docker and yarn are installed
cd litentry-parachain
make launch-docker-litentry
Both parity/polkadot
and litentry/litentry-parachain
images will be pulled from upstream automatically. Additionally, parachain-launch will be installed and used to generate chain-specs and docker-compose files.
The generated files will be under docker/generated-litentry/
.
Wait a while until you see such logs:
Up to this point the network is launched successfully.
You should be able to connect to the chain websocket via browser:
When finished with the dev network, run make clean-docker-litentry
to stop the docker containers and tidy things up
Only when option 1 doesn't work and you suspect the docker-image went wrong. In this case we could try to launch the dev network with raw binaries.
On Linux host:
you should have the locally compiled ./target/release/litentry-collator
binary.
run make launch-binary-litentry
On Non-Linux host:
you should have locally compiled binaries, for both polkadot
and litentry-collator
run ./scripts/launch-local-binary.sh litentry <path-to-polkadot-bin> <path-to-litentry-parachain-bin>
Likewise, when finished with the dev network, run make clean-binary
to stop the processes and tidy things up.
Note this command should work for both litentry and litmus.
The default leasing duration for parachain is 1 day, in case you want to extend it (even after it's downgraded to parathread), simply do a forceLease
via sudo
, it should be upgraded to parachain soon again and start to produce blocks.
You can also refer to README on https://github.com/litentry/litentry-parachain