My last update was based on the implementation of the Req/Res Protocol module for the Consensus Layer peer-to-peer setup project. Some changes were still pending for this to be fully functional so that will be the main topic of this update
The work for this feature took place in this pull request:
I worked on implementing the required responses for each request. This is a code snippet for the match arm of a new RPC event:
I only match the event of the RPC message since the other data is not relevant for the message processing. The following is the RPCReceived::Request
match arm:
For each request I use the send_response
method of the RPC and build the specific RPCResponse
for it.
I spent quite some time doing small fixes during the debugging stage. But after some time I got it working. This is the output of a local lighthouse node:
In the lighthouse client, the first step after connecting to a new peer is to request the metadata. In the above snippet, we can see that this metadata has been received successfully! 🎉🎊🎉🎊
Eventually you’ll be disconnected for the node having “Too many peers”, this clearly shows the need of a peer manager.
However, in the real world scenario I still get disconnected without the protocol being used, so I need to start looking at:
I laid out a document with possible contributions to the current state of this project.
This is for any contributor interested on contributing to this new feature.
While exploring the helios codebase, I noticed this issue:
I’m aware that I need to refactor some parts of the code to be compatible with some of the current or future helios crates or standards. So I decided to check out the Alex Stokes’ Ethereum Consensus repository.
I noticed that the P2P Interface types were only implemented for the phase0 specs, so I reached out to Alex and asked about how could this be implemented. These are the links for the issue and pull request:
My first priority will be to test locally with other CL clients to see if any other errors come up. But also I need to implement the peer manager to keep a stable amount of peers.