lambdaclass / lambdaclass/lambda_ethereum_consensus
Serve blocks for the latest `MIN_EPOCHS_FOR_BLOCK_REQUESTS` epochs
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 109
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
We added https://github.com/lambdaclass/lambda_ethereum_consensus/pull/1092 to keep our db small but this breaks the spec. We should remove this logic.
Instead, we should be able to serve block up until MIN_EPOCHS_FOR_BLOCK_REQUESTS epochs
As part of this ticket, we should remove blocks older than MIN_EPOCHS_FOR_BLOCK_REQUESTS
We should also backfill the local block database to at least epoch current_epoch - MIN_EPOCHS_FOR_BLOCK_REQUESTS to be fully compliant with BlocksByRange requests when starting from a recent weak subjectivity checkpoint.
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 by reviewing PR 1092 and the linked consensus-specs BlocksByRange rationale to locate the block-serving, pruning, and database backfill paths. Done means serving blocks through the latest MIN_EPOCHS_FOR_BLOCK_REQUESTS epochs, removing older blocks, and backfilling from a recent weak subjectivity checkpoint to the required epoch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- database, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100