mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-10 05:35:28 +00:00
There are a few locations in the code that compare the current epoch to the various FORK_EPOCH constants and branch off into fork-specific code. When a new fork is introduced, it is sometimes forgotten to update all of those branch locations. This patch introduces a compile-time check that ensures that all branches need to be covered exhaustively. This is done by replacing if-elif structures with case expressions.
Networking
This folders hold a collection of modules to:
- configure the Eth2 P2P network
- discover, connect, and maintain quality Eth2 peers
Data received is handed other to the ../gossip_processing
modules for validation.
Security concerns
- Collusion: part of the peer selection must be kept random. This avoids peers bringing all their friends and colluding against a beacon node.
- Denial-of-service: The beacon node must provide ways to handle burst of data that may come:
- from malicious nodes trying to DOS us
- from long periods of non-finality, creating lots of forks, attestations, forks