Updated docs

This commit is contained in:
Bruno Skvorc 2019-08-27 14:52:23 +02:00
parent 5c24438a54
commit b6ca634a00
4 changed files with 44 additions and 39 deletions

View File

@ -5,29 +5,19 @@ title: Getting Started with Nimbus
This document will explain how to install, test, and run Nimbus on your local machine. To learn about what Nimbus is, see the [intro post](https://our.status.im/nimbus-for-newbies/).
## Installing prerequisites
If you are on Windows, instead of using the commands below you can also use our [pre-configured Vagrant box](https://github.com/status-im/nim-vagrant) if you prefer to run things in a Linux environment.
We use Makefiles to quickly and easily build our binaries. Before you begin, please make sure you have [RocksDB installed](https://github.com/status-im/nimbus#rocksdb). On Windows, you can skip this step and instead rely on the "WINDOWS ONLY" part of the process below:
```bash
git clone https://github.com/status-im/nimbus
cd nimbus
make update # Downloads and builds submodules, dependencies, and even Nim itself
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<
./env.sh bash # Optional, but useful. Sets the current shell's environment to use the version of Nim language the `make update deps` command just built
```
### Building and Running Nimbus
To run Nimbus in Ethereum 1.0 mode:
```bash
git clone https://github.com/status-im/nimbus
cd nimbus
make update
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<
make nimbus
./build/nimbus
```
@ -41,10 +31,19 @@ The beacon chain simulation runs several beacon nodes on the local machine, atta
Enter the Ethereum 2.0 realm of Nimbus:
```bash
cd vendor/nim-beacon-chain
git clone https://github.com/status-im/nim-beacon-chain
cd nim-beacon-chain
make update
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<
make
make test
```
There, use this submodule's Make commands. To run the simulation:
To run the simulation:
```bash
make eth2_network_simulation

View File

@ -7,23 +7,28 @@ title: Creating your own Nimbus testnet
All beacon nodes joining your custom testnet MUST be compiled with the same beacon chain constants - i.e. if a node is compiled with 8 slots per epoch, one with 16 slots per epoch will not be compatible with it. With that in mind, let's do this step of building the basic beacon node binary from within `vendor/nim-beacon-chain`, and let's also build the tool that can generate validator keys.
If you haven't cloned Nimbus already, do it now:
> Note that you need Go 1.12+ installed to build the libp2p Go daemon!
If you haven't cloned the beacon chain implementation already, do it now:
```bash
git clone https://github.com/status-im/nimbus
cd nimbus
git clone https://github.com/status-im/nim-beacon-chain
cd nim-beacon-chain
make update
cd vendor/nim-beacon-chain
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<
```
Then let's build the binaries of the tools we'll need.
```bash
export NIMFLAGS="-d:release -d:SECONDS_PER_SLOT=30 -d:SHARD_COUNT=8 -d:SLOTS_PER_EPOCH=8" \
export NIMFLAGS="-d:release -d:SECONDS_PER_SLOT=6 -d:SHARD_COUNT=8 -d:SLOTS_PER_EPOCH=64" \
&& make beacon_node validator_keygen
```
This will place the `beacon_node` binary and the `validator_keygen` tool in `build` in the current folder, i.e. `vendor/nim-beacon-chain`.
This will place the `beacon_node` binary and the `validator_keygen` tool in `build/` in the current folder.
Let's generate the folders where the node will store its data and then add the validator keys in there. I picked 500 keys.

View File

@ -13,15 +13,14 @@ Here is the full process if you're starting from scratch, without even Nim insta
```bash
# Ensure you have rocksdb installed before running this!
git clone https://github.com/status-im/nimbus
cd nimbus
make update deps # this might take a few minutes
git clone https://github.com/status-im/nim-beacon-chain
cd nim-beacon-chain
make update # this might take a few minutes
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<
cd vendor/nim-beacon-chain # All Ethereum 2.0 functionality is in here
make testnet0
./build/testnet0_node # this launches the testnet0-specific node you just built
```
@ -29,8 +28,8 @@ make testnet0
Here is the full process if you've already run testnet0 before but might be stuck with old source code or old, incompatible cache.
```bash
cd nimbus
make update deps # update dependencies
cd nim-beacon-chain
make update # update dependencies
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
@ -38,7 +37,7 @@ make fetch-dlls # WINDOWS ONLY
cd vendor/nim-beacon-chain
make clean-testnet0 testnet0 # clean cache and rebuild binary
./scripts/testnet0.sh # this launches the testnet0-specific node you just built
./build/testnet0_node # this launches the testnet0-specific node you just built
```
Congratulations, you should now be joining us - your node will start syncing with the current state of our beacon chain. Once you're in sync, you should also start proposing your own blocks and providing attestations - exciting! You are now among [Ethereum 2.0 Nimbus pioneers](https://gitcoin.co/kudos/1160/nimbus_pilot)!

View File

@ -7,17 +7,19 @@ Testnet1 is a cutting edge highly breakable in-flux testnet we use to test new f
## Joining Nimbus Testnet 1
_Note: Works only on non-Windows right now. If on Windows, consider using our [Vagrant box](https://github.com/status-im/nim-vagrant)._
Before following the instructions below, please make sure you have Go installed. Follow [official instructions](https://golang.org/doc/install) and make sure it's above version 1.12. This is required because we build the Libp2p Go daemon.
```bash
git clone https://github.com/status-im/nimbus
cd nimbus
git clone https://github.com/status-im/nim-beacon-chain
cd nim-beacon-chain
git fetch
git checkout devel
make update deps
cd vendor/nim-beacon-chain
make update
# >>> WINDOWS ONLY <<<
make fetch-dlls # WINDOWS ONLY
# >>> WINDOWS ONLY <<<
make clean-testnet1 testnet1
./scripts/testnet1.sh
```