This is the collection of files & scripts that should be used to help with local testnet management
See https://docs.klyntar.org/build-core-and-join-network/run-kly-node
git checkout mode_1And install web1337 by running:
pnpm installThis is to generate mock transactions and fill the blocks
git clone https://github.com/KlyntarNetwork/NetRunner.git
cd NetRunnerSee netrunner_configs.json
{
"corePath":"/full/path/to/KlyntarCore/klyntar_core.js",
"mode":"testnet",
"testnetDir":"TESTNET_V5"
}Depending on network size - switch testnetDir to 3 possible options:
TESTNET_V2TESTNET_V5TESTNET_V21
- Your
netrunner_configs.jsonshould look like this:
{
"corePath":"/full/path/to/KlyntarCore/klyntar_core.js",
"mode":"testnet",
"testnetDir":"TESTNET_V2",
"nodesIdsToDisable":[]
}- Then call
node setup.jsThis should prepare directories for nodes of your testnet
- Now update the timestamp
Change the timestamp for the first epoch for each node in your network
node update_timestamp_in_genesis.js- Finally - run your network
Just from a single shell
node runner.js Your netrunner_configs.json should look like this:
{
"corePath":"/full/path/to/KlyntarCore/klyntar_core.js",
"mode":"testnet",
"testnetDir":"TESTNET_V5",
"nodesIdsToDisable":[]
}Then repeat:
node setup.js
node update_timestamp_in_genesis.js
node runner.jsYour netrunner_configs.json should look like this:
{
"corePath":"/full/path/to/KlyntarCore/klyntar_core.js",
"mode":"testnet",
"testnetDir":"TESTNET_V21",
"nodesIdsToDisable":[]
}Then repeat:
node setup.js
node update_timestamp_in_genesis.js
node runner.jsPM2 allows you to run services in the background, monitor server resource usage, write logs, and more.
PM2 is the recommended way to run and maintain a node (regular and validator) for Klyntar
To run & work with a testnet you can use these simple commands:
pm2 start runner2.jsYou will see the following
pm2 monit runner2pm2 logs runner2pm2 logs --lines <N> --nostream runner2pm2 stop runner2


