-
Notifications
You must be signed in to change notification settings - Fork 975
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
EIP-7045: Increase max attestation inclusion slot #3360
Conversation
d542350
to
786ccbe
Compare
Co-authored-by: Potuz <[email protected]>
|
||
### Block processing | ||
|
||
#### Modified `process_attestation` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how much it matters, but in the previous feature-specific spec, the mentioned changes propagated up to process_operation
than process_block
. It's a little unnecessary, but wanted to point that out
Why do we do this only for the target timeliness flag only but not the source timeliness flag as well? I saw this line if is_matching_source and inclusion_delay <= integer_squareroot(SLOTS_PER_EPOCH): |
We want validators to be rewarded for correct FFG vote no matter when it makes it on chain -- so anytime in the maximum range. Source correctness reward "splits the difference" between the timeliness of head and the timeliness of target in the chances to get rewarded when included on chain. This doesn't change that consideration |
Raised during the call: are there designated aggregators listening on the right subnet that can pick up these attestations when they come late? |
Proposers are already and would continue to be the aggregators of last resort for late or non-previously-picked-up attestations. This is clearly imperfect due to a given stretch of proposers not having perfect coverage off attestation subnets, but 7045 is a strict improvement by giving both more time and more potential proposers to pick up missing attestations. Altered networking, late aggregators, etc is orthogonal to the issue of extending this deadline, as the problem currently exists with the 32-slot inclusion deadline and at least is stable if not improvved with the extended deadline here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself:
The fork-choice on_attestation
validation only requires assert target.epoch in [current_epoch, previous_epoch]
, where the current epoch is the computed with store
. So it should be irrelevant to this change.
This PR looks good to me. Just some proofread comments. 👍
ethereum#3360 effectively extends the valid lifetime of an attestation/aggregate to 2 epochs - this means that an aggregate that was published at the beginning of a slot now is valid per the gossip rules up to 2 epochs later. Then net effect of the above change is that peers are allowed to republish old aggregates and attestations and libp2p will not stop the spread with the settings we recommend - instead the messages will have to be stopped with the "attestation cover rule" or similar, even though they have been observed already. Significant amounts of this kind of spam have been observed on the aggregate channel in particular leading to a 5x increase in aggregate traffic as some clients republish these old messages in spite of the "attestation cover rule" which should have stopped them - this simple change will provide an additional layer of protection against such bugs.
Pretty much a two line change in the state transition spec:
process_attestation
validly including in it's range) -- changeAs well as the modificaiton of the p2p gossip conditions to support this.
The rest is generally copy paste functions and a lot of boiler plate.
As for testing, I've made the relevant
process_attestation
tests be for themax_inclusion_slot
which is spec/fork aware. As well as adding one explicit test forSLOTS_PER_EPOCH
inclusion that should be valid for all forkstodo: