Skip to content

feat: simplify single node cl implementation #755

Merged
shaspitz merged 8 commits intomainfrom
simplify-cl
Aug 4, 2025
Merged

feat: simplify single node cl implementation #755
shaspitz merged 8 commits intomainfrom
simplify-cl

Conversation

@shaspitz
Copy link
Copy Markdown
Contributor

@shaspitz shaspitz commented Aug 4, 2025

The current implementation of our consensus layer is exhibiting odd behavior where recently built block timestamps will jump up to 20 minutes ahead of system time. This PR streamlines implementation, removes unnecessary variables, and makes the logic easier to comprehend/debug. After testing, these changes have fixed the issue.

  • bb.lastBlockTime variable was being set independently from bb.executionHead.BlockTime. We now use existing bb.executionHead.BlockTime in-place
  • head variable local to GetPayload was being set independently from bb.executionHead. We now use existing bb.executionHead in-place
  • loadExecutionHead was removed. We now just set bb.executionHead once upon service restart in setExecutionHeadFromRPC and subsequently update bb.executionHead at the end of every FinalizeBlock
  • Block timestamp computation was simplified
  • bb.buildDelayMs removed, bb.buildDelay remains

@shaspitz shaspitz marked this pull request as ready for review August 4, 2025 02:58
Comment thread cl/blockbuilder/blockbuilder.go Outdated
@shaspitz shaspitz merged commit cf71760 into main Aug 4, 2025
6 checks passed
@shaspitz shaspitz deleted the simplify-cl branch August 4, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants