Launch a local network
How to get our parachain running on localhost
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):

using docker images (preferred)

  1. 1.
    make sure docker and yarn are installed
  2. 3.
    cd litentry-parachain
  3. 4.
    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:
logs showing that the network is launched successfully
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

using raw binaries

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/ 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.

extend the leasing period

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.
polkadot-js extrinsic to extend the leasing period
You can also refer to README on