-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Update EIP-4844: Decouple blobs #6610
Conversation
✅ All reviewers have approved. |
The commit 366b28a (as a parent of bb8db28) contains errors. |
EIPS/eip-4844.md
Outdated
@@ -334,7 +334,7 @@ class BlobTransactionNetworkWrapper(Container): | |||
# BLSFieldElement = uint256 | |||
blobs: List[Vector[BLSFieldElement, FIELD_ELEMENTS_PER_BLOB], LIMIT_BLOBS_PER_TX] | |||
# KZGProof = Bytes48 | |||
kzg_aggregated_proof: KZGProof | |||
blob_proofs: List[KZGProof, MAX_TX_WRAP_KZG_COMMITMENTS] |
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.
A bit redundant to call it blob_proofs
. Let's call it proofs
.
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.
added it on the lines of blob_kzgs
, should we also rename it to just kzgs
?
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.
IMO kzgs
is ambiguous because it's not clear if it refers to proofs or commitments.
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.
then renaming them to commitments
is a good idea?
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 it is a good idea, but probably in a separate PR.
I was originally mistaken that you were gonna introduce another kzgs
naming with this PR, but since it refers to something that already exists, please disregard my previous comment.
I don't have a strong opinion about blob_kzgs
vs kzgs
. But I guess if you go with proofs
it also makes sense to go with kzgs
.
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.
Prefer commitments
to kzgs
.
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.
updated, can rename blob_kzgs to commitments in a followup PR
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.
Here is the followup PR build on top of this current branch: g11tech#1 (can update target to this repo once this PR merges)
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 have merged the followup changes to this PR on the request from @Inphi
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.
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
def kzg_to_versioned_hash(kzg: KZGCommitment) -> VersionedHash: | ||
return BLOB_COMMITMENT_VERSION_KZG + sha256(kzg)[1:] | ||
def kzg_to_versioned_hash(commitment: KZGCommitment) -> VersionedHash: | ||
return BLOB_COMMITMENT_VERSION_KZG + sha256(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.
Suggest renaming all BLOB_COMMITMENT_VERSION_KZG
to VERSIONED_HASH_VERSION_KZG
as CL specs.
return BLOB_COMMITMENT_VERSION_KZG + sha256(commitment)[1:] | |
return VERSIONED_HASH_VERSION_KZG + sha256(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.
umm ... BLOB_COMMITMENT_VERSION_KZG
makes more sense to me as its the version of the commitment scheme
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 the rationale was the version of VersionedHash
. I'm not sure what's the scenario of changing VERSIONED_HASH_VERSION_*
but not just changing the commitment scheme though.
It should be unified to one of the names anyway.
/cc @asn-d6 @dankrad any thoughts?
And kzg_to_versioned_hash
was also renamed to kzg_commitment_to_versioned_hash
.
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.
No strong opinion here. I think both variants are reasonable.
I would go with @hwwhww suggestions to make it the same with consensus-specs.
Co-authored-by: dankrad <[email protected]>
Co-authored-by: dankrad <[email protected]>
rebase via UI @Inphi could you take a look/re-approve now that you are in authors list 😆 |
It might be off the scope of this PR, but there are some more CL specs changes that are not synced. |
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.
Let's get this merged finally! Sorry for the delays.
@g11tech is there a chance you can also open another PR to further synchronize the EIP with the consensus-specs in terms of function names and type changes. I think consensus-specs is a bit ahead on this (due to the unittests) and we should get the EIP to catch up. Thanks!
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.
All Reviewers Have Approved; Performing Automatic Merge...
sounds good, will open an update for bringing naming convention uptodate |
Decouple the blobs as per