-
Notifications
You must be signed in to change notification settings - Fork 973
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
Won't honest validators update ETH1 data every two voting periods? #2012
Comments
So the issue here is the definition of Although this transition to the next slot is described explicitly in attestation production, it is just assumed in the block production. I'll make the update to ensure it is explicit, although clients must already be using this logic otherwise they would be producing malformed blocks! Thank you! |
Thank you for responding. I think there is an unwanted edge-case/side-effect of the proposed solution. |
So the clearing of votes happens on the transition between two epochs. Between the slot where Because we use the state at the slot we are trying to prepare a block for, then for the 0th slot in the period, we'll see no votes in the state. |
This issue was raised because it was possible to vote for the same block in two successful voting periods because of block overlapping. The solution was to add the following condition:
get_eth1_data(block).deposit_count >= state.eth1data.deposit_count
(#1836)I think that the current implementation of Honest Validator's
get_eth1_vote
, where the validator follows the majority's vote, will result in eth1data being oftentimes updated every two voting periods instead of every period. This is assuming that most validators have a reasonably up-to-date view of the Ethereum 1 chain.Perhaps a visual representation will make it easier to understand.
Additional explanation:
0x1
is valid duringP2
because its timestamp is within the valid range (2 090 000 < 2 099 000 < 2 190 000
).P2/S2
's proposer sees only the vote fromP2/S1
. This is because in order to obtain the correct state for proposals (which is the state atP2/S1
), the state transition function had to transition fromP1/S4
toP2/S1
which cleared all votes fromP1
.P3
andP4
,P5
andP6
etc.A possible solution would be to check if the vote is cast in the first slot of a voting period. If yes, ignore the majority vote and propose a new block.
The text was updated successfully, but these errors were encountered: