2019-09-01 15:02:49 +00:00
This folder contains scripts for launching the nimbus beacon chain node in a configuration appropriate for [interop ](https://github.com/ethereum/eth2.0-pm/tree/master/interop ).
## Building
In general, follow the build instructions of `nim-beacon-chain` as documented in the main repo - make sure to set up your build environment with all necessary system libraries as documented there:
2019-09-10 21:55:58 +00:00
### Prerequisites
2019-09-27 16:17:03 +00:00
:warning: To build nimbus, you need to have the `go` compiler (for go-libp2p-daemon), `rocksdb` and `pcre` installed - see [../ ](main repo ) for instructions.
2019-09-10 21:55:58 +00:00
2019-09-01 15:02:49 +00:00
```bash
# Clone repo
2019-09-04 21:38:01 +00:00
export GIT_LFS_SKIP_SMUDGE=1 # skip LFS
2019-09-01 15:02:49 +00:00
git clone https://github.com/status-im/nim-beacon-chain.git
cd nim-beacon-chain
make # prepare build system (cloning the correct submodules)
2019-09-02 14:18:21 +00:00
make update deps # build dependencies
2019-09-01 15:02:49 +00:00
```
## Running
Look in the scripts for options - the default config is a small setup using the `minimal` state spec.
```
2019-09-10 21:55:58 +00:00
cd multinet
2019-09-05 10:19:08 +00:00
2019-09-10 21:55:58 +00:00
# Create a new genesis 10s in the future
./make_genesis.sh
2019-09-01 15:02:49 +00:00
2019-09-10 21:55:58 +00:00
# You can now start the clients
./run_nimbus.sh
./run_trinity.sh
2019-09-01 15:02:49 +00:00
./run_lighthouse.sh
2019-09-10 21:55:58 +00:00
# Or do all in one step, with multitail
USE_MULTITAIL=1 ./run_all.sh
2019-09-27 16:17:03 +00:00
# The client scripts take optional arguments:
# ./script.sh <start_validator_num> <number_of_validators> <total_validators>
./run_nimbus.sh 0 20 40 # run nimbus with 20 validators, starting from 0, on a 40-validator network
2019-09-01 15:02:49 +00:00
```
## Diagnostics
```bash
# Nimbus genesis state
less data/state_snapshot.json
# Lighthouse genesis state
2019-09-02 10:31:14 +00:00
curl localhost:5052/beacon/state?slot=0 | python -m json.tool | sed 's/"0x/"/' > /tmp/lighthouse_state.json
# Format nimbus the same
cat data/state_snapshot.json | python -m json.tool | sed 's/"0x/"/' > /tmp/nimbus_state.json
diff -uw /tmp/nimbus_state.json /tmp/lighthouse_state.json
2019-09-01 15:02:49 +00:00
```