lambdaclass / lambdaclass/lambda_ethereum_consensus

Block isn't descendant of latest finalized block on node restart

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

Nobody has claimed this yet.

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

Description

I stumble upon this issue while needing to stop and rerun the node, the node was running for 1+ day without issues and after restarting it and immediately after syncing the ForkChoice.on_block/2 error: block isn't descendant of latest finalized block appeared and stopped the canonical chain.

  |   | 2025-01-23 12:01:24.017 | [Libp2p] Slot transition |  
  |   | 2025-01-23 12:01:13.178 | [PendingBlocks] Parent block with root:0xe0d..7b46 is invalid, making this block also invalid |  
  |   | 2025-01-23 12:01:12.386 | [Gossip] Block received, block.slot: 6825906. |  
  |   | 2025-01-23 12:01:12.017 | [Libp2p] Slot transition |  
  |   | 2025-01-23 12:01:00.400 | [PendingBlocks] Parent block with root:0xb6a..5797 is invalid, making this block also invalid |  
  |   | 2025-01-23 12:01:00.179 | [Gossip] Block received, block.slot: 6825905. |  
  |   | 2025-01-23 12:01:00.017 | [Libp2p] Slot transition |  
  |   | 2025-01-23 12:00:49.180 | [PendingBlocks] Parent block with root:0xc15..0d66 is invalid, making this block also invalid |  
  |   | 2025-01-23 12:00:49.135 | [Gossip] Block received, block.slot: 6825904. |  
  |   | 2025-01-23 12:00:49.055 | [PendingBlocks] Parent block with root:0x3a8..a00f is invalid, making this block also invalid |  
  |   | 2025-01-23 12:00:49.053 | [PendingBlocks] Saving block as invalid after ForkChoice.on_block/2 error: block isn't descendant of latest finalized block |  
  |   | 2025-01-23 12:00:49.022 | [Fork choice] Failed to add block: block isn't descendant of latest finalized block |  
  |   | 2025-01-23 12:00:48.878 | [Block processing] Computing committees for epoch 213309 |  
  |   | 2025-01-23 12:00:48.817 | [Fork choice] Adding new block |  
  |   | 2025-01-23 12:00:48.744 | [Optimistic Sync] Sync completed. Subscribing to gossip topics. |  
  |   | 2025-01-23 12:00:48.718 | [Optimistic Sync] Range 6825902 - 6825904 downloaded successfully, with 2 blocks and 1 missing. |  
  |   | 2025-01-23 12:00:48.657 | [Optimistic Sync] Blocks remaining: 3 |  
  |   | 2025-01-23 12:00:48.653 | [Optimistic sync] Sending request for slots 6825902 to 6825904 (request size = 3). |  
  |   | 2025-01-23 12:00:48.649 | [Optimistic sync] Performing optimistic sync between slots 6825902 and 6825904, for a total of 3 slots. |  
  |   | 2025-01-23 12:00:48.017 | [Libp2p] Slot transition |  
  |   | 2025-01-23 12:00:36.017 | [Libp2p] Slot transition |  
  |   | 2025-01-23 12:00:33.621 | [Optimistic Sync] Waiting 15.0 seconds to discover some peers before requesting blocks.

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 ForkChoice.on_block/2 and trace the restart path through Optimistic Sync and PendingBlocks using the supplied log sequence. Reproduce a node stop and restart, then follow the handling of blocks around slots 6825902–6825906 and the finalized block. Done means syncing after restart no longer stops the canonical chain with the reported descendant error.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.