Below you can find the guide how to setup local Swisstronik testnet with one or multiple validators using Docker
Single validator testnet
Apple M1 and M2 are not supported, even using QEMU. To fix it, we're working on fork of hardhat with enabled encryption which will simulate Swisstronik node behaviour
For convenient development and testing of your dApps we've prepared the ghcr.io/sigmagmbh/swisstronik-chain:latest Docker image which contains preconfigured network with one validator.
Before starting a local testnet run following command to generate genesis.json file with initial state of blockchain and multiple validator configs
This command will create .testnets folder with validator private keys, configuration, etc.
Now you can start your local testnet using Docker and docker-compose by running command below from root directory of clonedswisstronik-chain repo:
The command above will run docker containers in the background using docker-compose. You will see created network and containers
Stop local testnet
Once you are done, execute:
Logging
To see what happening inside node you can use following command:
The logs will look like:
You can disregard the Can't add peer's address to addrbook warning. As long as the blocks are being produced and the app hashes are the same for each node, there should not be any issues.