fix: fix block value calculation in produceBlockV3#6207
Merged
g11tech merged 1 commit intoChainSafe:unstablefrom Dec 22, 2023
Merged
fix: fix block value calculation in produceBlockV3#6207g11tech merged 1 commit intoChainSafe:unstablefrom
produceBlockV3#6207g11tech merged 1 commit intoChainSafe:unstablefrom
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## unstable #6207 +/- ##
=========================================
Coverage 90.35% 90.35%
=========================================
Files 78 78
Lines 8087 8087
Branches 490 490
=========================================
Hits 7307 7307
Misses 772 772
Partials 8 8 |
g11tech
approved these changes
Dec 22, 2023
Member
|
🎉 This PR is included in v1.14.0 🎉 |
ensi321
added a commit
to ensi321/lodestar
that referenced
this pull request
Jan 22, 2024
Fix block value calculation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The previous PR #6136 it introduces
consensusBlockValueand modifies the logic of determining using builder block vs execution block by comparing their values using the direct sum ofexecutionPayloadValueandconsensusBlockValue.This is incorrect because consensus block value is in Gwei while payload value is in Wei. Directly summing the two will result in payload value dominating the entire block value.
Description
Caveat
There is an ongoing discussion in beacon API spec questioning the inconsistency of having different unit (Wei vs Gwei) in payload and CL block value. Will follow up if there is any related change to the spec.