lambdaclass / lambdaclass/lambda_ethereum_consensus
Refactor libp2p port's supervision tree
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 109
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
From https://github.com/lambdaclass/lambda_ethereum_consensus/pull/324#discussion_r1371536270:
I still find this interaction weird and not very elixir-like. Initializing a different module from here and not from a supervisor, or the other's module init is something that seems race-condition-like.
About P2P.IncomingRequestHandler's init:
https://github.com/lambdaclass/lambda_ethereum_consensus/blob/33012b8ca3839945dbdf8d0b72fd4440780e022a/lib/lambda_ethereum_consensus/p2p/incoming_request_handler.ex#L16-L30
We should refactor the consumer processes so any failure from the port or the processes is handled correctly.
Also https://github.com/lambdaclass/lambda_ethereum_consensus/pull/324#discussion_r1371542943
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the discussion in PR 324 and the init implementation in lib/lambda_ethereum_consensus/p2p/incoming_request_handler.ex, especially lines 16-30. Trace how the libp2p port and consumer processes are initialized and supervised, then determine how failures should propagate and be handled correctly. Done means the supervision tree no longer relies on race-condition-like initialization and process or port failures are handled consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- distributed-systems, networking
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100