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

[Sharding] Fix the EFFECTIVE_BALANCE_MAX_DOWNWARD_DEVIATION constant calculation #2386

Merged
merged 1 commit into from
May 10, 2021

Conversation

Nashatyrev
Copy link
Member

Fix back to the original formula here: 68844f2

@Nashatyrev
Copy link
Member Author

Nashatyrev commented May 5, 2021

However the original formula looks not quite accurate

For example taking default spec constants:

Suppose the max blob gas cost is 9.5Eth,
EFFECTIVE_BALANCE_MAX_DOWNWARD_DEVIATION = 1Eth - 1Eth * 1 / 4 = 0.75Eth
then min_effective_balance = 9.5Eth + 0.75Eth = 10.25Eth

Suppose proposer effective_balance == 10Eth,
Thus his minimal possible balance would be 9.75Eth.
Despite his balance would cover blob gas cost he still would be filtered out by the min_effective_balance =10.25Eth

@Nashatyrev
Copy link
Member Author

The latter is not critical though and could be fixed later after covered with reference tests

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's patch as is and work through the other issue separately.
Thanks!

@djrtwo djrtwo merged commit 1564f62 into ethereum:dev May 10, 2021
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