# To start up testnet docker
make up
# Check docker logs
make logs
# Notice: Check out `Makefile` for available standalone-testnet docker commandsTo ensure the testnet is starting to work, visit the telemetry to see if all validators are syncing blocks
http://localhost:5000- Config
localStreamUrlandremoteStreamUrlMap/developmentinconfig/common.js; - Run
npm run devto start rUNanode in development mode, or runnpm run releaseto get packed rUNanode and run in production mode;
- After starting rUNanode software, go to
choose networkpage; - Select
Self hosted netoption in the dropdown list; - Upload the genesis file (
src/genesis/local/local.json); - Go to the next page (Ensure
rUNanodeblockchain data folder has been cleared whenever the testnet blockchain folder is cleared);
Go to CENNZnet/Polkadot UI for token deposit, manual with more details can be found here
http://localhost:3000Standalone testnet can be configured via genesis json file (for example: src/genesis/local/local.json):
{
"staking": {
"sessionsPerEra": 5 // The number can be decreased to shorten Era period, to test rewarding, validator entering/exiting, etc in a fast way
}
}NOTICE:
- rUNanode and testnet must share the same genesis file;
- Whenever genesis file is reconfigured, both rUNanode and testnet blockchain folders have to be cleared;
The testnet blockchain data folder is in runanode/target/* which has been git-ignored. to clean up testnet blockchain data:
rm -rf target/**# remove CENNZnet chain data
cd ~/Library/Application\ Support/Substrate/chains
rm -rf testnet-nameSometimes you may want host testnet on one machine, and multiple nodes can connect with it in an intranet:
- Use
src/genesis/local/intra-testnet.jsonas a genesis file template, replacexx.xx.xx.xxwith the ip address of your testnet hosting machine; - In
docker-compose.yml, replace--chain=/mnt/genesis/local/local.jsonwith--chain=/mnt/genesis/local/intra-testnet.json; - Follow the same steps of configuring standalone testnet in your local machine;
runanode/genesis/local.json is the standalone testnet genesis file, which is derived from https://github.com/cennznet/cennznet/tree/master/genesis/rimu/readable.json.
Whenever cennznet/cennznet is upgraded, or cennznet/genesis/* has changes, we need to update the genesis file templates in rUNanode repository.
|-- genesis
|-- local
|-- intra-testnet.json (For setting up testnet on a machine with specific IP address)
|-- local.json (For setting up testnet on local machine)
|-- docker-compose.yml (For configuring testnet docker and start validator nodes)
|-- Makefile (Testnet docker commands)