lambdaclass / lambdaclass/lambda_ethereum_consensus
`recompute_head` executes only after the first epoch
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 109
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
On syncing, the head root is set to the checkpoint state block root, but never recalculated throughout the current epoch, it statrs to be recalculated just after the initial one has ended.
This could be seen in the logs, as it never shows the root change for the first couple of minutes:
INFO 19:09:21.187 [Fork choice] Adding new block slot=10997347 root=0x1ed..752a
INFO 19:09:35.494 [Fork choice] Block processed. Recomputing head.
INFO 19:09:35.703 [Fork choice] Added new block slot=10997347 root=0x1ed..752a
INFO 19:09:35.704 [Fork choice] Recomputed head slot=10997344 root=0x61a..c919
INFO 19:09:35.704 [Fork choice] Block processing time: 14.307s | Recompute head time: 0.175s
INFO 19:09:35.706 [Fork choice] Adding new block slot=10997348 root=0x674..df69
INFO 19:09:50.037 [Fork choice] Block processed. Recomputing head.
INFO 19:09:50.291 [Fork choice] Added new block slot=10997348 root=0x674..df69
INFO 19:09:50.291 [Fork choice] Recomputed head slot=10997344 root=0x61a..c919
INFO 19:09:50.291 [Fork choice] Block processing time: 14.331s | Recompute head time: 0.206s
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 tracing the sync path that sets the head root and the fork-choice path that recomputes it, using the reported logs to compare behavior before and after the first epoch. Done means the head root is recalculated and can change during the current epoch rather than only after the initial epoch ends.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- blockchain, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100