Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get head once when producing block #6612

Closed
twoeths opened this issue Mar 29, 2024 · 1 comment · Fixed by #6617
Closed

Get head once when producing block #6612

twoeths opened this issue Mar 29, 2024 · 1 comment · Fixed by #6617
Labels
meta-bug Issues that identify a bug and require a fix. prio-high Resolve issues as soon as possible.
Milestone

Comments

@twoeths
Copy link
Contributor

twoeths commented Mar 29, 2024

Describe the bug

Consider this scenario:

  • block n - 1 comes really late
  • at slot n, head is block n - 2, we produce block and get SyncAggregate which all voted for block n - 2
  • then block n - 1 come, we get head again it's now block n - 1, we set block n - 1 as parentRoot
  • then block data is inconsistent

When other node receives the block, it gets state from parentRoot and find SyncAggregate signature invalid

Mar-28 17:05:11.000[chain]         ^[[36mverbose^[[39m: Clock slot slot=8735124
Mar-28 17:05:11.082[rest]            ^[[34mdebug^[[39m: Exec req-mlkg x.x.x.x produceBlockV3
Mar-28 17:05:11.164[api]           ^[[36mverbose^[[39m: Assembling block with produceEngineOrBuilderBlock fork=deneb, builderSelection=maxprofit, slot=8735124, isBuilderEnabled=true, isEngineEnabled=true, strictFeeRecipientCheck=false, builderBoostFactor=10

Mar-28 17:05:11.165[chain]         ^[[36mverbose^[[39m: Added block to forkchoice and state cache slot=8735123, root=0x020c02ba62299550591532a0ba6f22b4e5732251de9782a1599b28319f1583dd
Mar-28 17:05:11.232[chain]         ^[[36mverbose^[[39m: New chain head slot=8735123, root=0x020c02ba62299550591532a0ba6f22b4e5732251de9782a1599b28319f1583dd, delaySec=12.23200011253357

Mar-28 17:05:11.233[chain]         ^[[36mverbose^[[39m: After importBlock caching postState without SSZ cache slot=8735123
Mar-28 17:05:11.233[chain]           ^[[34mdebug^[[39m: Imported block slot=8735123, recvToValLatency=0.48000001907348633, recvToValidation=0.5480000972747803, validationTime=0.06800007820129395
Mar-28 17:05:11.233[chain]         ^[[36mverbose^[[39m: Block processed slot=8735123, root=0x020c02ba62299550591532a0ba6f22b4e5732251de9782a1599b28319f1583dd, delaySec=12.233000040054321

Mar-28 17:05:11.442[api]             ^[[34mdebug^[[39m: Produced common block body fork=deneb, builderSelection=maxprofit, slot=8735124, isBuilderEnabled=true, isEngineEnabled=true, strictFeeRecipientCheck=false, builderBoostFactor=100

Expected behavior

We should compute then get head once and use it across produceBlock flow

Steps to reproduce

No response

Additional context

should be done before proposer boost reorg #5125

Operating system

Linux

Lodestar version or commit hash

v1.17.0

@twoeths twoeths added the meta-bug Issues that identify a bug and require a fix. label Mar 29, 2024
@philknows philknows added this to the v1.18.0 milestone Mar 29, 2024
@philknows philknows added the prio-high Resolve issues as soon as possible. label Apr 1, 2024
@philknows
Copy link
Member

Marking high but I see that it's already being worked on :) 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-bug Issues that identify a bug and require a fix. prio-high Resolve issues as soon as possible.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants