ChainSafe / ChainSafe/lodestar
glamsterdam-devnet-3: Error emitting head event
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 156
Description
### Describe the bug
```
May-13 12:54:32.177[chain] ^[[34mdebug^[[39m: Persisted payload envelope to db slot=49499, root=0xe09df13588696915ac25f7c86dc76ea840b396e11c99f14b3eabf8e3b79f3861
May-13 12:54:32.180[chain] ^[[36mverbose^[[39m: Added block to forkchoice and state cache slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648
May-13 12:54:32.180[chain] ^[[34mdebug^[[39m: Error emitting head event slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648 - No block for root 0x520751fee46df3a574f0df42d0c9f7d67aefea69ee02d111570f2e51dccb4d43
Error: No block for root 0x520751fee46df3a574f0df42d0c9f7d67aefea69ee02d111570f2e51dccb4d43
at ForkChoice.getDependentRoot (file:///usr/src/lodestar/packages/fork-choice/src/forkChoice/forkChoice.ts:1419:15)
at BeaconChain.importBlock (file:///usr/src/lodestar/packages/beacon-node/src/chain/blocks/importBlock.ts:286:52)
at runNextTicks (node:internal/process/task_queues:65:5)
at listOnTimeout (node:internal/timers:567:9)
at processTimers (node:internal/timers:541:7)
at BeaconChain.processBlocks (file:///usr/src/lodestar/packages/beacon-node/src/chain/blocks/index.ts:138:9)
at JobItemQueue.runJob (file:///usr/src/lodestar/packages/beacon-node/src/util/queue/itemQueue.ts:149:22)
May-13 12:54:32.181[chain] ^[[36mverbose^[[39m: New chain head slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648, delaySec=728.180999994278
May-13 12:54:32.181[chain] ^[[36mverbose^[[39m: After importBlock caching postState without SSZ cache slot=49500
May-13 12:54:32.181[chain] ^[[36mverbose^[[39m: Block processed slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648, delaySec=728.180999994278
May-13 12:54:32.182[chain] ^[[34mdebug^[[39m: Persist block to hot DB slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648, inputType=no-data, numBlobs=0
May-13 12:54:32.196[chain] ^[[34mdebug^[[39m: Persisted blockInput to db slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648
May-13 12:54:32.196[chain] ^[[34mdebug^[[39m: BlockInputCache.prune deleted cached BlockInputs deletedCount=1
May-13 12:54:32.196[chain] ^[[34mdebug^[[39m: Pruned block input slot=49500, root=0x1b02a28246fe854f34a6e702d6e02d28fae37fcebab6db6e3a998f83b46c5648
May-13 12:54:32.216[chain] ^[[36mverbose^[[39m: Execution payload imported slot=49500, builderInde@@@
```
### Expected behavior
no error
### Steps to reproduce
_No response_
### Additional context
_No response_
### Operating system
Linux
### Lodestar version or commit hash
glamsterdam-devnet-3
Contributor guide
Research direction
Start by tracing ForkChoice.getDependentRoot in packages/fork-choice/src/forkChoice/forkChoice.ts and its call from BeaconChain.importBlock in packages/beacon-node/src/chain/blocks/importBlock.ts. Follow the block-processing path shown in packages/beacon-node/src/chain/blocks/index.ts and investigate why the dependent root is unavailable. Done means the reported head-event error no longer occurs during the devnet scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100