nimbus-eth2/docker/dist
Jacek Sieka 233d756518
Logging and startup improvements (#3038)
* Logging and startup improvements

Color support for released binaries!

* startup scripts no longer log to file by default - this only affects
source builds - released binaries don't support file logging
* add --log-stdout option to control logging to stdout (colors, json)
* detect tty:s vs redirected logs and log accordingly
* add option to disable log colors at runtime
* simplify several "common" logs, showing the most important information
earlier and more clearly
* remove line numbers / file information / tid - these take up space and
are of little use to end users
  * still enabled in debug builds and tools
* remove `testnet_servers_image` compile-time option
* server images, released binaries and compile-from-source now offer
the same behaviour and features
* fixes https://github.com/status-im/nimbus-eth2/issues/2326
* fixes https://github.com/status-im/nimbus-eth2/issues/1794
* remove instanteneous block speed from sync message, keeping only
average

before:

```
INF 2021-10-28 16:45:59.000+02:00 Slot start                                 topics="beacnde" tid=386429 file=nimbus_beacon_node.nim:884 lastSlot=2384027 wallSlot=2384028 delay=461us84ns peers=0 head=75a10ee5:3348 headEpoch=104 finalized=cd6804ba:3264 finalizedEpoch=102 sync="wwwwwwwwww:0:0.0000:0.0000:00h00m (3348)"
INF 2021-10-28 16:45:59.046+02:00 Slot end                                   topics="beacnde" tid=386429 file=nimbus_beacon_node.nim:821 slot=2384028 nextSlot=2384029 head=75a10ee5:3348 headEpoch=104 finalizedHead=cd6804ba:3264 finalizedEpoch=102 nextAttestationSlot=-1 nextProposalSlot=-1 nextActionWait=n/a
```

after:

```
INF 2021-10-28 22:43:23.033+02:00 Slot start                                 topics="beacnde" slot=2385815 epoch=74556 sync="DDPDDPUDDD:10:5.2258:01h19m (2361088)" peers=37 head=eacd2dae:2361096 finalized=73782:a4751487 delay=33ms687us715ns
INF 2021-10-28 22:43:23.291+02:00 Slot end                                   topics="beacnde" slot=2385815 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 head=eacd2dae:2361096
```

* fix comment

* documentation updates

* mention `--log-file` may be deprecated in the future
* update various docs
2021-11-02 18:06:36 +01:00
..
base_image dist: cross-build ARM64 on Debian-10.10 (#2944) 2021-10-03 16:41:35 +02:00
binaries update docker-compose.yml examples 2021-10-01 14:28:23 +03:00
Dockerfile.amd64
Dockerfile.arm dist: faster builds for ARM and ARM64 2021-03-15 14:38:39 +02:00
Dockerfile.arm64 dist: cross-build ARM64 on Debian-10.10 (#2944) 2021-10-03 16:41:35 +02:00
Dockerfile.macos Merge stable into unstable 2021-05-20 13:50:40 +03:00
Dockerfile.macos-arm64 Merge stable into unstable 2021-05-20 13:50:40 +03:00
Dockerfile.win64
README-Windows.md.tpl bin dist related docs (#2684) 2021-07-05 12:31:25 +02:00
README.md.tpl bin dist related docs (#2684) 2021-07-05 12:31:25 +02:00
entry_point.sh Logging and startup improvements (#3038) 2021-11-02 18:06:36 +01:00

README.md.tpl

# Binary Nimbus beacon node distribution

This binary distribution of the Nimbus eth2 package is compiled
in a [reproducible way](https://reproducible-builds.org/) from source files
hosted at https://github.com/status-im/nimbus-eth2.

The tarball containing this README uses the following naming scheme:

```bash
nimbus-eth2_<TARGET OS>_<TARGET CPU>_<VERSION>_<GIT COMMIT>.tar.gz
```

For a more complete and up-to-date documentation, please refer to the [Nimbus book](https://status-im.github.io/nimbus-eth2/).

## Reproducing the build

Besides the generic build requirements, you also need [Docker](https://www.docker.com/).

```bash
git clone https://github.com/status-im/nimbus-eth2.git
cd nimbus-eth2
git checkout GIT_COMMIT
make update
make dist
```

## Significant differences from self-built binaries

No `-march=native`.

## Running a Pyrmont node

With default options:

```bash
./run-pyrmont-beacon-node.sh
```

The script will forward all supplied options to the beacon node executable:

```bash
./run-pyrmont-beacon-node.sh --log-level=DEBUG --tcp-port=9050
```

To monitor the Eth1 validator deposit contract, you'll need to pair
the Nimbus beacon node with a Web3 provider capable of serving Eth1
event logs. This could be a locally running Eth1 client such as Geth
or a cloud service such as Infura. For more information please see
our setup guides:

https://status-im.github.io/nimbus-eth2/eth1.html

By default, the script will ask you to enter a web3 provider URL interactively,
but this can be bypassed by specifying a websocket `WEB3_URL` environment variable:

```bash
WEB3_URL="<YOUR_WEB3_URL>" ./run-pyrmont-beacon-node.sh
```

## Running a mainnet node

`run-mainnet-beacon-node.sh` is a similar script intended for connecting to mainnet.
All the same conventions apply:

```bash
# using a local Geth instance
WEB3_URL="ws://localhost:8545" ./run-mainnet-node.sh --max-peers=150
```

## Running a Prater node

`run-prater-beacon-node.sh` is a similar script intended for connecting to the Prater
testnet. All the same conventions apply:

```bash
# using a local Geth instance
WEB3_URL="ws://localhost:8545" ./run-prater-node.sh --max-peers=150
```