-
Notifications
You must be signed in to change notification settings - Fork 738
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
Sidecar inclusion updates #4941
Sidecar inclusion updates #4941
Conversation
8697583
into
sigp:sidecar-inclusion-proof
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.
Nice catch on the updated gossip rules.
I had some clarifications on the descended from finalized rules
if !fork_choice.is_finalized_checkpoint_or_descendant(block_parent_root) { | ||
if chain | ||
.store | ||
.block_exists(&block_parent_root) |
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.
I think this condition should be after the proposer signature verification.
Else it would be possible for an attacker to spam us with useless blobs with bogus non-canonical parent roots and make us do a bunch of database reads.
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.
So this one I just copied from block_verification.rs
. It's also before the proposer signature check, although I'm not sure why. I was thinking It might be nice to consolidate the blob_verifcation
and block_verifcation
code because we can do a lot of the same checks over SignedBlockHeader
.
{ | ||
return Err(GossipBlobError::NotFinalizedDescendant { block_parent_root }); | ||
} else { | ||
return Err(GossipBlobError::BlobParentUnknown(blob_sidecar)); |
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.
I'm not completely sure I understand requesting the parent in this case.
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.
Similar to the other comment, I was following the lead of block_verification
, I think here it's because we're checking if the parent root exists, not the block root related to the current message
Issue Addressed
There are a few gossip rules we needed to add/update, they're included here:
before:
after:
Future Improvements
There's more and more overlap between gossip blob and block gossip verification, it'd be nice if we could unify all overlapping logic