-
Notifications
You must be signed in to change notification settings - Fork 278
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
Remove point-at-infinity for proofs/commitments #8063
Conversation
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.
Is there a way to get a test for it?
@@ -20,8 +20,8 @@ | |||
public class BlobSidecarsByRootRequestMessageSchema | |||
extends AbstractSszListSchema<BlobIdentifier, BlobSidecarsByRootRequestMessage> { | |||
|
|||
// Size validation according to the spec (MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK) is | |||
// done in the RPC handler | |||
// Size validation according to the spec (MAX_REQUEST_BLOCKS_DENEB * |
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.
This message means we don't throw in constructor if it exceeds (MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK), we will have spec check later. So here we cap it by 2048 and later check that it's 6, so this comment is made for understanding why don't we cap here on 6 and where is actual validation.
So I'd revert this file change.
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.
Oh, I see. I misread that. Will revert that change!
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.
this line where actual validation happens
Line 86 in 94d3782
if (request.size() > maxRequestBlobSidecars) { |
Yes, I think so. I will work on that. |
@jtraglia it would be good to have it in spec tests. We could be not alone |
Good idea. I'll look into that. To back that up, mev-boost had the same issue: |
I chatted with a coworker and we think it would be best to remove the infinity value from the two classes. It shouldn't be necessary in clients; it should only be needed internally in the KZG library. Would it be okay for me to remove these? |
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
Merged, thank you @jtraglia |
PR Description
I noticed that
KZGProof
andKZGCommitment
were using the wrong point-at-infinity bytes. It was 48 zero bytes and it should have been0xc0
followed by 47 zero bytes. See theG1_POINT_AT_INFINITY
constant here:https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/polynomial-commitments.md#constants
I've made this mistake several times myself. It's the uncompressed bytes which are all zero; the compressed bytes include the "infinity" flag. This only appears to have been used in test code, so no worries.
BlobSidecar#toLogString
should print the abbreviated commitment.Documentation
doc-change-required
label to this PR if updates are required.Changelog