lambdaclass / lambdaclass/lambda_ethereum_consensus

PendingBlock + Blobs module API enhancement

Open
#1,406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactor
Dominant language
Elixir
Stars
109
Forks
41
PR merge metrics
No merged PRs in 30d

Description

There are some not-so-straightforward interactions between BlobSideCar calls PendingBlocks with added complexity due to the need of passing a callback to `

# lib/lambda_ethereum_consensus/p2p/gossip/blob_sidecar.ex
PendingBlocks.process_blobs(store, {:ok, [blob]})

# lib/lambda_ethereum_consensus/beacon/pending_blocks.ex
BlobDownloader.request_blobs_by_root(
    missing_blobs,
    &process_blobs/2,
    @download_retries
  )

...

def process_blobs(store, {:ok, blobs}) do

We need to rework the API to be more polished. We want to be able to let pending block know that a blob was downloaded without using an API that appears to point to other purpose.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/lambda_ethereum_consensus/p2p/gossip/blob_sidecar.ex and lib/lambda_ethereum_consensus/beacon/pending_blocks.ex, tracing PendingBlocks.process_blobs/2 and BlobDownloader.request_blobs_by_root/3. Rework the interaction so PendingBlocks can be notified when a blob is downloaded without an API that suggests another purpose; confirm the resulting API is consistent across these call sites.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.