Try   HackMD

EPF - Final Update

The EPF third cohort has come to an end. This is my final update for the project and a general overview of the steps taken.

Project Abstract

The goal of this project is to enable Helios to retrieve Consensus Layer data directly from the peer-to-peer network, rather than relying on a centralized provider.

To achieve this, I began implementing cl-p2p-setup, a minimal Rust-based setup that enables a connection to the consensus layer p2p network.

I decided to go in this direction to abstract the feature from the complexity of the helios codebase and only deal with libp2p in an isolated environment. This increased the speed of development for the actual networking aspect, and was easier to check if I was going in the correct direction.

However, some code decisions didn’t take into account some of the Helios structure or libraries being used, leading to the need of refactoring some code to achieve compatibility.

Current State

The project currently has the following capabilities:

  • Connecting to the consensus layer peer-to-peer network
  • Finding peers using the Node Discovery v5 protocol
  • Subscribing to GossipSub topics
  • Communicating with peers using the Req/Res Protocol
  • Utilizing the Identity protocol

There are still some compatibility issues with clients that need to be resolved. Currently, Lighthouse is the only client that works without any issues with the network connection.

Next Steps

There are several tasks that need to be completed to finish the implementation:

  • Adapt the current codebase to meet Helios standards.
  • Implement a peer manager to maintain a stable number of connected peers.
  • Adjust the current Helios architecture to work with multiple network connections.

EPF Takeaways

It's really nice to realize that it's possible to contribute to the protocol with small to medium-sized projects that go in different directions. There are many different topics and technologies to choose from, so you have a lot of options for where to work.

Writing documentation for your ongoing work is beneficial not only for other developers to understand what you are doing, but also for yourself to revisit your thought process. This helps ensure that the decisions taken were appropriate and can lead to the discovery of possible issues.

Based on the suggestions of Mario and Josh, I will continue to post updates until this project is completed!

Resources