-
Notifications
You must be signed in to change notification settings - Fork 193
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
Use serialized bytes for commitments proto #851
Use serialized bytes for commitments proto #851
Conversation
@@ -9,24 +9,13 @@ message G1Commitment { | |||
bytes y = 2; | |||
} | |||
|
|||
message G2Commitment { |
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.
shouldn't be used other than in BlobCommitment
in this file, which isn't in production use
// The A1 element of the Y coordinate of G2 point. | ||
bytes y_a1 = 4; | ||
} | ||
|
||
// BlobCommitment represents commitment of a specific blob, containing its | ||
// KZG commitment, degree proof, the actual degree, and data length in number of symbols. | ||
message BlobCommitment { |
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.
only used in v2 protos, not in production use
@@ -7,7 +7,8 @@ service Encoder { | |||
rpc EncodeBlob(EncodeBlobRequest) returns (EncodeBlobReply) {} | |||
} | |||
|
|||
// BlomCommitments contains the blob's commitment, degree proof, and the actual degree | |||
// BlobCommitments contains the blob's commitment, degree proof, and the actual degree | |||
// DEPRECATED: use common.BlobCommitment instead |
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.
Copying this existing scheme in common
instead of moving because this is currently being used by encoders
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.
Once we are fully on v2 we can remove this?
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.
Yes!
G2Commitment length_commitment = 2; | ||
G2Commitment length_proof = 3; | ||
uint32 data_length = 4; | ||
bytes commitment = 1; |
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.
nit: can we make sure the spacing is consistent in the file
@@ -7,7 +7,8 @@ service Encoder { | |||
rpc EncodeBlob(EncodeBlobRequest) returns (EncodeBlobReply) {} | |||
} | |||
|
|||
// BlomCommitments contains the blob's commitment, degree proof, and the actual degree | |||
// BlobCommitments contains the blob's commitment, degree proof, and the actual degree | |||
// DEPRECATED: use common.BlobCommitment instead |
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.
Once we are fully on v2 we can remove this?
cc0f8b2
to
9856181
Compare
Why are these changes needed?
Instead of specifying each field of G1/G2 commitment, use serialized bytes to represent them like it does for encoding today.
Checks