From 607752680e315524f7a25de8e9c0a30b26d5fc82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20=C5=A0kvorc?= Date: Tue, 26 Mar 2019 17:38:30 +0100 Subject: [PATCH] Create README.md --- scripts/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/README.md diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 000000000..4e3516be7 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,32 @@ +_Work in progress. Things may and probably will break for the foreseeable future. Do not rely on this for anything._ + +## Connecting to Testnet + +To connect to a short-lived testnet we may or may not have running at the moment, use the `connect_to_testnet` script like so: + +```bash +scripts/connect_to_testnet.sh testnet0 +``` + +## Running your own testnet + +The `beacon_node` binary has a `createTestnet` command. + +```bash + nim c -r beacon_chain/beacon_node \ + --network=$NETWORK_NAME \ + --dataDir=$DATA_DIR/node-0 \ + createTestnet \ + --networkId=$NETWORK_ID \ + --validatorsDir=$NETWORK_DIR \ + --numValidators=$VALIDATOR_COUNT \ + --firstUserValidator=$FIRST_USER_VALIDATOR \ + --outputGenesis=$NETWORK_DIR/genesis.json \ + --outputNetwork=$NETWORK_DIR/$NETWORK_FLAVOUR-network.json \ + --bootstrapAddress=$PUBLIC_IP \ + --genesisOffset=600 # Delay in seconds +``` + +Replace ENV vars with values that make sense to you. + +Full tutorial coming soon.