Network setup update (#2999)
* cp * cp * Update docs/the_nimbus_book/src/faq.md Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com> * Update docs/the_nimbus_book/src/faq.md Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com> * Update docs/the_nimbus_book/src/networking.md Co-authored-by: Jacek Sieka <jacek@status.im> * Update docs/the_nimbus_book/src/networking.md Co-authored-by: Jacek Sieka <jacek@status.im> * Update docs/the_nimbus_book/src/networking.md Co-authored-by: Jacek Sieka <jacek@status.im> * Update docs/the_nimbus_book/src/networking.md Co-authored-by: Jacek Sieka <jacek@status.im> * Update docs/the_nimbus_book/src/networking.md Co-authored-by: Jacek Sieka <jacek@status.im> * fix links * new line * extip edits * update read logs * cp * cp Co-authored-by: Ștefan Talpalaru <stefantalpalaru@yahoo.com> Co-authored-by: Jacek Sieka <jacek@status.im>
This commit is contained in:
parent
421bf936ff
commit
c3c8e27011
|
@ -38,6 +38,7 @@
|
||||||
- [Graffiti the blockchain](./graffiti.md)
|
- [Graffiti the blockchain](./graffiti.md)
|
||||||
- [Optimise for profitability](./profits.md)
|
- [Optimise for profitability](./profits.md)
|
||||||
- [Monitor the health of your node](./health.md)
|
- [Monitor the health of your node](./health.md)
|
||||||
|
- [Networking](./networking.md)
|
||||||
|
|
||||||
# Guides
|
# Guides
|
||||||
- [Grafana and Prometheus](./metrics-pretty-pictures.md)
|
- [Grafana and Prometheus](./metrics-pretty-pictures.md)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
### How do I check which version of Nimbus I'm currently running?
|
### How do I check which version of Nimbus I'm currently running?
|
||||||
|
|
||||||
If you'v enabled RPC, the version is available via
|
If you've enabled RPC, the version is available via
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -d '{"jsonrpc":"2.0","method":"get_v1_node_version","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 -s
|
curl -d '{"jsonrpc":"2.0","method":"get_v1_node_version","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 -s
|
||||||
|
@ -13,19 +13,6 @@ curl -d '{"jsonrpc":"2.0","method":"get_v1_node_version","params":[],"id":1}' -H
|
||||||
|
|
||||||
You can also run `build/nimbus_beacon_node --version`
|
You can also run `build/nimbus_beacon_node --version`
|
||||||
|
|
||||||
### How do I fix the discovered new external address warning log?
|
|
||||||
|
|
||||||
```
|
|
||||||
WRN 2021-03-15 02:23:37.569+00:00 Discovered new external address but ENR auto update is off topics="discv5"...
|
|
||||||
```
|
|
||||||
|
|
||||||
It's possible that your ISP has changed your IP address without you knowing.
|
|
||||||
|
|
||||||
The first thing to do it to try relaunching the beacon node with with `--enr-auto-update:true` (pass it as an option in the command line).
|
|
||||||
|
|
||||||
If this doesn't fix the problem, the next thing to do is to check your external (public) IP address and detect open ports on your connection - you can use [https://www.yougetsignal.com/tools/open-ports/](https://www.yougetsignal.com/tools/open-ports/ ). Note that Nimbus `TCP` and `UDP` ports are both set to `9000` by default.
|
|
||||||
|
|
||||||
See [here](./health.md#set-up-port-forwarding), for how to set up port forwarding.
|
|
||||||
|
|
||||||
### Why are metrics not working?
|
### Why are metrics not working?
|
||||||
|
|
||||||
|
@ -59,6 +46,26 @@ To add an additional validator, just follow [the same steps](./keys.md) as you d
|
||||||
|
|
||||||
> Note that a single Nimbus instance is able to handle multiple validators.
|
> Note that a single Nimbus instance is able to handle multiple validators.
|
||||||
|
|
||||||
|
## Networking
|
||||||
|
|
||||||
|
### How can I improve my peer count?
|
||||||
|
|
||||||
|
See [here](./networking.md).
|
||||||
|
|
||||||
|
### How do I fix the discovered new external address warning log?
|
||||||
|
|
||||||
|
```
|
||||||
|
WRN 2021-03-15 02:23:37.569+00:00 Discovered new external address but ENR auto update is off topics="discv5"...
|
||||||
|
```
|
||||||
|
|
||||||
|
It's possible that your ISP has changed your dynamic IP address without you knowing.
|
||||||
|
|
||||||
|
The first thing to do it to try relaunching the beacon node with `--enr-auto-update` (pass it as an option in the command line).
|
||||||
|
|
||||||
|
If this doesn't fix the problem, the next thing to do is to check your external (public) IP address and detect open ports on your connection - you can use [https://www.yougetsignal.com/tools/open-ports/](https://www.yougetsignal.com/tools/open-ports/ ). Note that Nimbus `TCP` and `UDP` ports are both set to `9000` by default.
|
||||||
|
|
||||||
|
See [here](./health.md#set-up-port-forwarding), for how to set up port forwarding.
|
||||||
|
|
||||||
## Folder Permissions
|
## Folder Permissions
|
||||||
|
|
||||||
To protect against key loss, Nimbus requires that files and directories be owned by the user running the application. Furthermore, they should not be readable by others.
|
To protect against key loss, Nimbus requires that files and directories be owned by the user running the application. Furthermore, they should not be readable by others.
|
||||||
|
@ -157,15 +164,15 @@ Limiting the maximum stake to 32 ETH encourages decentralization of power as it
|
||||||
|
|
||||||
> Remember that a validator’s vote is weighted by the amount it has at stake.
|
> Remember that a validator’s vote is weighted by the amount it has at stake.
|
||||||
|
|
||||||
## Can I stop my validator for a few days and then start it back up again?
|
### Can I stop my validator for a few days and then start it back up again?
|
||||||
|
|
||||||
Yes but, under normal conditions, you will lose an amount of ETH roughly equivalent to the amount of ETH you would have gained in that period. In other words, if you stood to earn ≈0.01 ETH, you would instead be penalised ≈0.01 ETH.
|
Yes but, under normal conditions, you will lose an amount of ETH roughly equivalent to the amount of ETH you would have gained in that period. In other words, if you stood to earn ≈0.01 ETH, you would instead be penalised ≈0.01 ETH.
|
||||||
|
|
||||||
## I want to switch my validator keys to another machine, how long do I need to wait to avoid getting slashed?
|
### I want to switch my validator keys to another machine, how long do I need to wait to avoid getting slashed?
|
||||||
|
|
||||||
We recommend waiting 2 epochs (around 15 minutes), before restarting Nimbus on a different machine.
|
We recommend waiting 2 epochs (around 15 minutes), before restarting Nimbus on a different machine.
|
||||||
|
|
||||||
## When should I top up my validator's balance?
|
### When should I top up my validator's balance?
|
||||||
|
|
||||||
The answer to this question very much depends on how much ETH you have at your disposal.
|
The answer to this question very much depends on how much ETH you have at your disposal.
|
||||||
|
|
||||||
|
@ -173,7 +180,7 @@ You should certainly top up if your balance is close to 16 ETH: this is to ensur
|
||||||
|
|
||||||
At the other end of the spectrum, if your balance is closer to 31 ETH, it's probably not worth your while adding the extra ETH required to get back to 32.
|
At the other end of the spectrum, if your balance is closer to 31 ETH, it's probably not worth your while adding the extra ETH required to get back to 32.
|
||||||
|
|
||||||
## When can I withdraw my funds, and what's the difference between exiting and withdrawing?
|
### When can I withdraw my funds, and what's the difference between exiting and withdrawing?
|
||||||
|
|
||||||
You can signal your intent to stop validating by signing a voluntary exit message with your validator.
|
You can signal your intent to stop validating by signing a voluntary exit message with your validator.
|
||||||
|
|
||||||
|
|
|
@ -2,76 +2,7 @@
|
||||||
|
|
||||||
The most important thing for the the health, performance and stablity of your node and the overall network is the strength of your node's network connectivity / peer count.
|
The most important thing for the the health, performance and stablity of your node and the overall network is the strength of your node's network connectivity / peer count.
|
||||||
|
|
||||||
## Monitor your Peer count
|
See [here](./networking.md) for our networking related tips and tricks.
|
||||||
|
|
||||||
If your Peer count is low (less than `20`) and/or you repeatedly see the following warning:
|
|
||||||
```
|
|
||||||
WRN 2021-05-08 12:59:26.669+00:00 Peer count low, no new peers discovered topics="networking" tid=1914 file=eth2_network.nim:963 discovered_nodes=9 new_peers=0 current_peers=1 wanted_peers=160
|
|
||||||
```
|
|
||||||
|
|
||||||
It probably means that your computer is not reachable from the outside. This means you won't be able to accept any incoming peer connections.
|
|
||||||
|
|
||||||
If you're on a home network, the fix here is to set up port forwarding.
|
|
||||||
|
|
||||||
## Set up port forwarding
|
|
||||||
|
|
||||||
If you're running on a home network and want to ensure you are able to receive incoming connections you may need to set up port forwarding (though some routers automagically set this up for you).
|
|
||||||
|
|
||||||
|
|
||||||
> **Note:** If you are running your node on a virtual public cloud (VPC) instance, you can safely ignore this section.
|
|
||||||
|
|
||||||
While the specific steps required vary based on your router, they can be summarised as follows:
|
|
||||||
|
|
||||||
|
|
||||||
1. Determine your [public IP address](./health.md#public-ip-address)
|
|
||||||
2. Determine your [private IP address](./health.html#private-ip-address)
|
|
||||||
3. Browse to the management website for your home router (typically [http://192.168.1.1)](http://192.168.1.1)
|
|
||||||
4. Log in as admin / root
|
|
||||||
5. Find the section to configure port forwarding
|
|
||||||
6. Configure a port forwarding rule with the following values:
|
|
||||||
- External port: `9000`
|
|
||||||
- Internal port: `9000`
|
|
||||||
- Protocol: `TCP`
|
|
||||||
- IP Address: Private IP address of the computer running Nimbus
|
|
||||||
7. Configure a second port forwarding rule with the following values:
|
|
||||||
- External port: `9000`
|
|
||||||
- Internal port: `9000`
|
|
||||||
- Protocol: `UDP`
|
|
||||||
- IP Address: Private IP address of the computer running Nimbus
|
|
||||||
|
|
||||||
### Determine your public IP address
|
|
||||||
|
|
||||||
To determine your public IP address, visit [http://v4.ident.me/](http://v4.ident.me/) or run this command:
|
|
||||||
|
|
||||||
```
|
|
||||||
curl v4.ident.me
|
|
||||||
```
|
|
||||||
|
|
||||||
### Determine your private IP address
|
|
||||||
|
|
||||||
To determine your private IP address, run the appropriate command for your OS:
|
|
||||||
|
|
||||||
**Linux:**
|
|
||||||
|
|
||||||
```
|
|
||||||
ip addr show | grep "inet " | grep -v 127.0.0.1
|
|
||||||
```
|
|
||||||
|
|
||||||
**Windows:**
|
|
||||||
|
|
||||||
```
|
|
||||||
ipconfig | findstr /i "IPv4 Address"
|
|
||||||
```
|
|
||||||
|
|
||||||
**macOS:**
|
|
||||||
|
|
||||||
```
|
|
||||||
ifconfig | grep "inet " | grep -v 127.0.0.1
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Check open ports on your connection
|
|
||||||
Use [this tool](https://www.yougetsignal.com/tools/open-ports/) to check your external (public) IP address and detect open ports on your connection (Nimbus TCP and UDP ports are both set to `9000` by default).
|
|
||||||
|
|
||||||
## Keep track of your attestation effectiveness
|
## Keep track of your attestation effectiveness
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,138 @@
|
||||||
|
# Network setup
|
||||||
|
|
||||||
|
Nimbus will automatically connect to peers based on the health and quality of peers that it's already connected to. Depending on the network and the number of validators attached to the the node, Nimbus may need anywhere from 10 to 60 peers connected to operate well.
|
||||||
|
|
||||||
|
In addition to making outgoing connections, the beacon node node works best when others can connect to the node - this speeds up the process of finding good peers.
|
||||||
|
|
||||||
|
To allow incoming connections, the peer must be reachable via a public IP address.
|
||||||
|
|
||||||
|
By default, Nimbus uses UPnP to set up port forwarding and detect your external IP address. If you do not have UPnP enabled, you may need to pass additional command-line options to the node, as detailed below.
|
||||||
|
A collection of tips and tricks to help improve your network connectivity.
|
||||||
|
|
||||||
|
## Monitor your Peer count
|
||||||
|
|
||||||
|
If your Peer count is low (less than `15`) and/or you repeatedly see the following warning:
|
||||||
|
```
|
||||||
|
WRN 2021-05-08 12:59:26.669+00:00 Peer count low, no new peers discovered topics="networking" tid=1914 file=eth2_network.nim:963 discovered_nodes=9 new_peers=0 current_peers=1 wanted_peers=160
|
||||||
|
```
|
||||||
|
|
||||||
|
It means that Nimbus was unable to find a sufficient number of peers to guarantee stable operation, and you may miss attestations and blocks as a result.
|
||||||
|
|
||||||
|
Most commonly, this happens when your computer is not reachable from the outside and therefore won't be able to accept any incoming peer connections.
|
||||||
|
|
||||||
|
If you're on a home network, the fix here is to [set up port forwarding](./networking.md#set-up-port-forwarding) (this may require you to [pass the extip option](./networking.md#pass-the-extip-option) and [set enr-auto-update](./networking.md#set-enr-auto-update)).
|
||||||
|
|
||||||
|
The first step however, is to check for incoming connections.
|
||||||
|
|
||||||
|
## Check for incoming connections
|
||||||
|
|
||||||
|
To check if you have incoming connections set, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -s http://localhost:8008/metrics | grep libp2p_open_streams
|
||||||
|
```
|
||||||
|
|
||||||
|
In the output, look for a line that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
libp2p_open_streams{type="ChronosStream",dir="in"}
|
||||||
|
```
|
||||||
|
|
||||||
|
If there are no `dir=in` chronosstreams , incoming connections are not working.
|
||||||
|
|
||||||
|
> **N.B** you need to run the client with the `--metrics` option enabled in order for this to work
|
||||||
|
|
||||||
|
## Pass the extip option
|
||||||
|
If you have a static public IP address, use the `--nat:extip:$EXT_IP_ADDRESS` option to pass it to the client, where `$EXT_IP_ADDRESS` is your public IP. For example, if your public IP address is `1.2.3.4`, you'd run:
|
||||||
|
|
||||||
|
```
|
||||||
|
./run-prater-beacon-node.sh --nat:extip:1.2.3.4
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note that this should also work with a dynamic IP address. But you will probably also need to pass `enr-auto-update` as an option to the client.
|
||||||
|
|
||||||
|
## Set enr auto update
|
||||||
|
|
||||||
|
The `--enr-auto-update` feature keeps your external IP address up to date based on information received from other peers on the network. This option is useful with ISPs that assign IP addresses dynamically.
|
||||||
|
|
||||||
|
In practice this means relaunching the beacon node with `--enr-auto-update:true` (pass it as an option in the command line).
|
||||||
|
|
||||||
|
## Set up port forwarding
|
||||||
|
|
||||||
|
If you're running on a home network and want to ensure you are able to receive incoming connections you may need to set up port forwarding (though some routers automagically set this up for you).
|
||||||
|
|
||||||
|
|
||||||
|
> **Note:** If you are running your node on a virtual public cloud (VPC) instance, you can safely ignore this section.
|
||||||
|
|
||||||
|
While the specific steps required vary based on your router, they can be summarised as follows:
|
||||||
|
|
||||||
|
1. Determine your [public IP address](./networking.md#determine-your-public-ip-address)
|
||||||
|
2. Determine your [private IP address](./networking.md#determine-your-private-ip-address)
|
||||||
|
3. Browse to the management website for your home router (typically [http://192.168.1.1](http://192.168.1.1))
|
||||||
|
4. Log in as admin / root
|
||||||
|
5. Find the section to configure port forwarding
|
||||||
|
6. Configure a port forwarding rule with the following values:
|
||||||
|
- External port: `9000`
|
||||||
|
- Internal port: `9000`
|
||||||
|
- Protocol: `TCP`
|
||||||
|
- IP Address: Private IP address of the computer running Nimbus
|
||||||
|
7. Configure a second port forwarding rule with the following values:
|
||||||
|
- External port: `9000`
|
||||||
|
- Internal port: `9000`
|
||||||
|
- Protocol: `UDP`
|
||||||
|
- IP Address: Private IP address of the computer running Nimbus
|
||||||
|
|
||||||
|
### Determine your public IP address
|
||||||
|
|
||||||
|
To determine your public IP address, visit [http://v4.ident.me/](http://v4.ident.me/) or run this command:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl v4.ident.me
|
||||||
|
```
|
||||||
|
|
||||||
|
### Determine your private IP address
|
||||||
|
|
||||||
|
To determine your private IP address, run the appropriate command for your OS:
|
||||||
|
|
||||||
|
**Linux:**
|
||||||
|
|
||||||
|
```
|
||||||
|
ip addr show | grep "inet " | grep -v 127.0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
**Windows:**
|
||||||
|
|
||||||
|
```
|
||||||
|
ipconfig | findstr /i "IPv4 Address"
|
||||||
|
```
|
||||||
|
|
||||||
|
**macOS:**
|
||||||
|
|
||||||
|
```
|
||||||
|
ifconfig | grep "inet " | grep -v 127.0.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Check open ports on your connection
|
||||||
|
|
||||||
|
Use [this tool](https://www.yougetsignal.com/tools/open-ports/) to check your external (public) IP address and detect open ports on your connection (Nimbus TCP and UDP ports are both set to `9000` by default).
|
||||||
|
|
||||||
|
## Reading the logs
|
||||||
|
|
||||||
|
`No peers for topic, skipping publish...`
|
||||||
|
|
||||||
|
This is printed when the client lacks quality peers to publish attestations to - this is the most important indication that the node is having trouble keeping up. If you see this, you are missing attestations.
|
||||||
|
|
||||||
|
`Peer count low, no new peers discovered...`
|
||||||
|
|
||||||
|
This is a sign that you may be missing attestations.
|
||||||
|
|
||||||
|
`No external IP provided for the ENR...`
|
||||||
|
|
||||||
|
This message basically means that the software did not manage to find a public IP address (by either looking at your routed interface IP address, and/or by attempting to get it from your gateway through UPnP or NAT-PMP).
|
||||||
|
|
||||||
|
`Discovered new external address but ENR auto update is off...`
|
||||||
|
|
||||||
|
It's possible that your ISP has changed your IP address without you knowing. The first thing to do it to try relaunching the beacon node with with `--enr-auto-update:true` (pass it as an option in the command line).
|
||||||
|
|
||||||
|
If this doesn't fix the problem, the next thing to do is to check your external (public) IP address and detect open ports on your connection - you can use [this site](https://www.yougetsignal.com/tools/open-ports/ ). Note that Nimbus `TCP` and `UDP` ports are both set to `9000` by default. See above for how to set up port forwarding.
|
||||||
|
|
Loading…
Reference in New Issue