Local Development
You can test your node or application easily with setting up local network. Use multi-node localnet, you can test Settlus more thoroughly with multiple nodes. You can reset the chain to the Genesis point, modify the code within Settlus directly, change any parameters, understand how Settlus operates, and test the impacts of these changes. If you want to run Settlus with multi node configuration, it is running on Docker by default. Single node configuration is powered by Ignite CLI.
Prerequisites
Single Node Configuration
Settlus utilizes Ignite CLI to simplify blockchain development process. Learn more on Ignite CLI page.
Install necessary dependencies
Set config
config.yml file contains necessary initial config for initializing Settlus through Ignite CLI. You can change the relevant parameter in order to test Settlus.
Run the chain
serve
command installs dependencies, builds, initializes, and starts your blockchain in development. Learn about various options on ignite cli command reference.
Alternatively, if you build locally, simply run the below command with the relevant options where the binary is located after initialization:
Multi Node Configuration
Build Localnet
As mentioned above, if you are changing some codes or parameters directly from original code, you must build your own docker image.
and you will get the image tagged with settlus/localnet
. The initial parameters can currently be changed by modifying the file before building the image. In the future, it will be available to separately configure the parameters through a config file.
Start & Setting up Localnet
You can start the multi-node localnet with just one line command.
The local network runs on your Docker, with specifications defined in the docker-compose.yml file. After executing the command, a .testnets
folder will be created in your cloned repository. By default, Localnet operates with four nodes, and their configurations and volumes are stored in the respective .testnets/node{x}
folders.
Stop Localnet
To clean up the localnet work, run the command:
It will stop and remove the running Docker process. And it will also delete the .testnets
folder created by the start command. If you want to persist the status of blockchain, you should copy the .testnets
folder in another location before you run the stop command.
Last updated