-
Notifications
You must be signed in to change notification settings - Fork 970
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
Eth1 data voting exception #1464
Comments
|
Alrighty, I'm finished with this and would still like to raise it as an issue. |
You are correct. The current language was assuming that eth1data wasn't updated in state until the end of the period. Because we opportunistically update eth1data in the middle of the voting period if enough votes, we can't rely on it being stable. I agree that some more executable code and some more consensus tests would be useful, but for now I'm going to expedite the change in language through to get it out immediately with |
addressed via clarification in the text in #1469 |
Part of the description for Eth1 Data voting is as follows:
This text uses the
state
variable twice:state.eth1_data.block_hash
when determiningprevious_eth1_distance
.get_eth1_vote(state, previous_eth1_distance)
when settingblock.eth1_data
.I claim that these two
state
variables must be distinct, otherwise, in the best-case voting scenario, an exception is raised (see "Emptyall_eth1_data
exception") .I think it comes down to the following line being unclear (imo):
And to prevent the exception, it should become:
However, what I suggested is still somewhat overwhelming to read. It's my opinion that the second paragraph of Eth1 Data should really be executable code instead of English.
Empty
all_eth1_data
exceptionThis describes an exception that is raised when using the
state
at the current slot (i.e., thestate
for the block being produced) as inputs to bothget_eth1_vote(..)
andprevious_eth1_distance
:get_eth1_data(ETH1_FOLLOW_DISTANCE)
.SLOTS_PER_ETH1_VOTING_PERIOD / 2
slots,state.eth1_data
is set toget_eth1_data(ETH1_FOLLOW_DISTANCE)
(as perprocess_eth1_data
).get_eth1_vote
is called,len(all_eth1_data) == 0
becauseprevious_eth1_distance == ETH1_FOLLOW_DISTANCE
.lambda
in themax
function raises aValueError
becausev
is not inall_eth1_data
.The text was updated successfully, but these errors were encountered: