0fc2022a0e
Starting from [Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md), forks are based on timestamps rather than block heights (see PR #6238). This PR extends [EIP-2124](https://eips.ethereum.org/EIPS/eip-2124) Fork ID to include timestamp-based blocks. See also https://github.com/ethereum/go-ethereum/pull/25878. Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de> |
||
---|---|---|
.. | ||
database | ||
observer | ||
reports | ||
utils | ||
main.go | ||
README.md |
Observer - P2P network crawler
Observer crawls the Ethereum network and collects information about the nodes.
Build
make observer
Run
observer --datadir ... --nat extip:<IP> --port <PORT>
Where IP
is your public IP, and PORT
has to be open for incoming UDP traffic.
See observer --help
for available options.
Report
To get the report about the currently known network state run:
observer report --datadir ...
Description
Observer uses discv4 protocol to discover new nodes. Starting from a list of preconfigured "bootnodes" it uses FindNode to obtain their "neighbor" nodes, and then recursively crawls neighbors of neighbors and so on. Each found node is re-crawled again a few times. If the node fails to be pinged after maximum attempts, it is considered "dead", but still re-crawled less often.
A separate "diplomacy" process is doing "handshakes" to obtain information about the discovered nodes. It tries to get RLPx Hello and Eth Status from each node. The handshake repeats a few times according to the configured delays.