Skip to content
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

Merged
merged 7 commits into from
May 15, 2023
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Mar 4, 2023

@github-actions github-actions bot added c-update Modifies an existing proposal s-review This EIP is in Review t-core labels Mar 4, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented Mar 4, 2023

✅ All reviewers have approved.

@github-actions
Copy link

github-actions bot commented Mar 4, 2023

The commit 366b28a (as a parent of bb8db28) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Mar 4, 2023
EIPS/eip-4844.md Outdated Show resolved Hide resolved
@g11tech g11tech marked this pull request as ready for review March 15, 2023 09:56
@g11tech g11tech requested a review from eth-bot as a code owner March 15, 2023 09:56
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Mar 15, 2023
EIPS/eip-4844.md Outdated Show resolved Hide resolved
EIPS/eip-4844.md Outdated Show resolved Hide resolved
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]
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

@asn-d6 asn-d6 Mar 22, 2023

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer commitments to kzgs.

Copy link
Contributor Author

@g11tech g11tech Mar 22, 2023

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

Copy link
Contributor Author

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)

Copy link
Contributor Author

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

Copy link
Contributor Author

@g11tech g11tech Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i also rename blob_versioned_hashes to versioned_hashes in BlobTransactionType? @Inphi @asn-d6 @dankrad

asn-d6
asn-d6 previously approved these changes Mar 29, 2023
Copy link
Contributor

@asn-d6 asn-d6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Inphi
Inphi previously approved these changes Apr 12, 2023
@g11tech g11tech dismissed stale reviews from Inphi and asn-d6 via 32c1fe7 April 13, 2023 07:02
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:]
Copy link
Contributor

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.

Suggested change
return BLOB_COMMITMENT_VERSION_KZG + sha256(commitment)[1:]
return VERSIONED_HASH_VERSION_KZG + sha256(commitment)[1:]

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

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.

@g11tech
Copy link
Contributor Author

g11tech commented May 12, 2023

rebase via UI @Inphi could you take a look/re-approve now that you are in authors list 😆

@hwwhww
Copy link
Contributor

hwwhww commented May 15, 2023

It might be off the scope of this PR, but there are some more CL specs changes that are not synced.
e.g., the type of Blob was changed to ByteVector[BYTES_PER_FIELD_ELEMENT * FIELD_ELEMENTS_PER_BLOB] in ethereum/consensus-specs#3038

Copy link
Contributor

@asn-d6 asn-d6 left a 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!

@eth-bot eth-bot enabled auto-merge (squash) May 15, 2023 10:00
Copy link
Collaborator

@eth-bot eth-bot left a 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...

@eth-bot eth-bot merged commit 84f6136 into ethereum:master May 15, 2023
@g11tech
Copy link
Contributor Author

g11tech commented May 15, 2023

sounds good, will open an update for bringing naming convention uptodate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-review Waiting on author to review c-update Modifies an existing proposal s-review This EIP is in Review t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants