-
Notifications
You must be signed in to change notification settings - Fork 284
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
Improve block equivocation check for block publishing V2 API #8043
Improve block equivocation check for block publishing V2 API #8043
Conversation
revisit enum names
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.
Looks good, just a few nits but I still not sure on consequences of publishing duplicate
.../src/test/java/tech/pegasys/teku/statetransition/validation/BlockBroadcastValidatorTest.java
Show resolved
Hide resolved
...nsition/src/main/java/tech/pegasys/teku/statetransition/validation/BlockGossipValidator.java
Outdated
Show resolved
Hide resolved
...nsition/src/main/java/tech/pegasys/teku/statetransition/validation/BlockGossipValidator.java
Outdated
Show resolved
Hide resolved
return EQUIVOCATING_BLOCK_FOR_SLOT_PROPOSER; | ||
} | ||
|
||
EquivocationCheckResult performBlockEquivocationCheck(final SignedBeaconBlock block) { |
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.
and also here I think something like performIntermediateBlockEquivocationCheck
will highlight purpose
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.
mm... here I disagree because it is called to do the final equivocation check when building the pipeline in buildValidationPipeline
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.
LGTM
Based on the discussion happening in the issue.
The objective is to make gossip broadcast validation to fail only in case of equivocating blocks (slashable, proposer proposed two different blocks for the same slot) and let it pass when it is the same block root that is causing the gossip ignore.
In case of "already seen", we can say for sure that the block has been seen but we currently don't know anything about blobs. So the current decision is to publish block and blobs in that condition too, and let the libp2p layer to filter the already seen. If detected we log a debug line with the exception:
fixes #8039
Documentation
doc-change-required
label to this PR if updates are required.Changelog