---
tags: ethereum, helios
---
# Helios CL P2P Outline
- Tracking Issue: https://github.com/a16z/helios/issues/59
- Feature PR: https://github.com/a16z/helios/pull/130
- Contribution branch: [https://github.com/a16z/helios/tree/%40refcell/p2p](https://github.com/a16z/helios/tree/%40refcell/p2p)
- Technical guidelines:
- Proposed by Alex: [https://hackmd.io/BihePpvfQ3mSH2MZiVBT1Q](https://hackmd.io/BihePpvfQ3mSH2MZiVBT1Q)
Project requirements
- Implement a connection to the Consensus Layer peer-to-peer network to fetch block data and keep track of the head.
- It should seamlessly switch with the current RPC implementation.
- It should be possible to use the RPC network and the p2p network at the same time.
Implementation Outline
1. Peer Discovery
- Implement a Discovery service whose main task will be that of finding new peers on the network using the Node Discovery v5 protocol.
- Discv5 nodes are identified using ENRs but should also provide the peers `Multiaddress`.
- It should be able to process queries to find new peers on demand.
2. P2P Network
- Implement a P2P Network service that establishes and maintains connections with CL peers capable of providing the necessary CL data.
- Manage peer conections (start/end/request new peers) in order to maintain a stable amount of peers that publish the required topics to keep track of the CL head.
3. Integration
- The above services should be integrated with Helios in a way that allows them to work along the current RPC connection and could be enabled/disabled by a flag during the client setup.
- Make necessary changes in the project’s `ConsensusClient` architecture to achieve this.
Caveats
- I didn’t include peer scoring/reputation management, but in case of this being a project requirement it could be implemented atop the P2P Network service using gossipsub scoring or any other scoring mechanism as well.