0

Ethereum 2.0 nodes communicate through a libp2p network. Two indicators of talking to "correct" nodes on the same network are the "fork digest" and the "fork version" parameters.

How can I easily get the Ethereum 2.0 network's fork digest and fork version?

1

Both the fork version and the fork digest are part of the eth2 field included in every node's ENR.

To extract it, you can use the ENR Viewer or any other ENR decoding tool. This screenshot shows the ENR for a node on the Spadina test network:

screenshot of the enr viewer

The eth2 field contains the following: 0x09fb0a1200000002ffffffffffffffff

  • The first four bytes are the fork digest 09 fb 0a 12
  • The next four bytes are the fork version 00 00 00 02
  • The next four bytes are the "next" fork version ff ff ff ff (upcoming forks, here: none)
  • The next four bytes is the "next" fork epoch ff ff ff ff (upcoming forks, here: none)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.