Skip to content

KLYN74R/NetRunner

Repository files navigation

Intro

This is the collection of files & scripts that should be used to help with local testnet management





1. Before run - you should build the Klyntar core

See https://docs.klyntar.org/build-core-and-join-network/run-kly-node

2. After build, omit the last part about preparing configs and genesis:

alt text

3. Switch to branch in core dev_cloud

git checkout dev_cloud

4. Now clone this repository in some another directory

git clone https://github.com/KLYN74R/NetRunner.git

cd NetRunner

5. Prepare netrunner configs

See netrunner_configs.json

{
    "corePath":"/full/path/to/KlyntarCore/klyn74r.js",
    "mode":"testnet",
    "testnetDir":"TESTNET_V5"
}

Depending on network size - switch testnetDir to 3 possible options:

  1. TESTNET_V2
  2. TESTNET_V5
  3. TESTNET_V21



6. Launch testnet with a single shard and 2 validators

  1. Your netrunner_configs.json should look like this:
{
    "corePath":"/full/path/to/KlyntarCore/klyn74r.js",
    "mode":"testnet",
    "testnetDir":"TESTNET_V2",
    "nodesIdsToDisable":[]
}
  1. Then call
node setup.js

This should prepare directories for nodes of your testnet

  1. Now update the timestamp

Change the timestamp for the first epoch for each node in your network

node update_timestamp_in_genesis.js
  1. Finally - run your network

Just from a single shell

node runner.js 



7. Launch testnet with a 3 shards and 5 validators

Your netrunner_configs.json should look like this:

{
    "corePath":"/full/path/to/KlyntarCore/klyn74r.js",
    "mode":"testnet",
    "testnetDir":"TESTNET_V5",
    "nodesIdsToDisable":[]
}

Then repeat:

node setup.js

node update_timestamp_in_genesis.js

node runner.js



8. Launch testnet with a single shard and 21 validators (almost prod)

Your netrunner_configs.json should look like this:

{
    "corePath":"/full/path/to/KlyntarCore/klyn74r.js",
    "mode":"testnet",
    "testnetDir":"TESTNET_V21",
    "nodesIdsToDisable":[]
}

Then repeat:

node setup.js

node update_timestamp_in_genesis.js

node runner.js

About

Repo to help with network running

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published