Skip to content

Distributed cell proofs #9343

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

Merged
merged 12 commits into from
Apr 15, 2025
Merged

Conversation

zilm13
Copy link
Contributor

@zilm13 zilm13 commented Apr 11, 2025

PR Description

Distributed cell proofs as of:
ethereum/execution-apis#630
ethereum/EIPs#9378
ethereum/consensus-specs#4128
ethereum/consensus-specs#4187

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@zilm13 zilm13 marked this pull request as ready for review April 14, 2025 22:45
@@ -22,6 +22,7 @@
import tech.pegasys.teku.spec.datastructures.type.SszKZGCommitment;
import tech.pegasys.teku.spec.datastructures.type.SszKZGProof;

// TODO: FULU with cell proofs
Copy link
Member

Choose a reason for hiding this comment

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

My understanding is that the only meaningful change in this object was the now strict length of all list fields? What is this TODO about?

Copy link
Member

Choose a reason for hiding this comment

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

Also, do we need to update BlobsBundleSchema with the update size for the proofs (FIELD_ELEMENTS_PER_EXT_BLOB * MAX_BLOB_COMMITMENTS_PER_BLOCK)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't have builder specs (or maybe I've not seen it yet), not sure
I don't want to change BlobsBundleSchema, I've separate BlobsCellBundleSchema

public List<DataColumnSidecar> constructDataColumnSidecars(
@VisibleForTesting
@Deprecated
public List<DataColumnSidecar> constructDataColumnSidecarsOld(
Copy link
Member

Choose a reason for hiding this comment

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

This is only used by tests now. Can we get rid of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In separate pr please

@@ -94,7 +94,7 @@ void sanityTest() throws Exception {
Stream.generate(dataStructureUtil::randomValidBlob).limit(blobCount).toList();
BeaconBlock block = blockResolver.addBlock(10, blobCount);
List<DataColumnSidecar> sidecars =
miscHelpers.constructDataColumnSidecars(createSigned(block), blobs, kzg);
miscHelpers.constructDataColumnSidecarsOld(createSigned(block), blobs, kzg);
Copy link
Member

Choose a reason for hiding this comment

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

?

@@ -130,7 +130,7 @@ void sanityTest() {
List<Blob> blobs = Stream.generate(dataStructureUtil::randomValidBlob).limit(1).toList();
BeaconBlock block = blockResolver.addBlock(10, 1);
List<DataColumnSidecar> sidecars =
miscHelpers.constructDataColumnSidecars(createSigned(block), blobs, kzg);
miscHelpers.constructDataColumnSidecarsOld(createSigned(block), blobs, kzg);
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this?

Copy link
Contributor Author

@zilm13 zilm13 Apr 15, 2025

Choose a reason for hiding this comment

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

I don't see other way to construct proofs for fixtures. And we need proofs to construct valid DataColumnSidecars. Did I miss other way to do this? Deprecated mark is mostly to avoid anyone to call this in production

@@ -102,6 +103,13 @@ public KZGProof computeBlobKzgProof(final Bytes blob, final KZGCommitment kzgCom
throw new RuntimeException("LibPeerDASKZG library doesn't support computeBlobKzgProof");
}

// TODO: test
Copy link
Member

Choose a reason for hiding this comment

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

Do you plan to test it as part of this PR? Otherwise it would be good to add a ticket link here so we know we won't miss it.

Comment on lines +117 to 118
@Deprecated(since = "Use computeCells instead, computeCellsAndProof is not for production")
List<KZGCellAndProof> computeCellsAndProofs(Bytes blob);
Copy link
Member

Choose a reason for hiding this comment

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

Is this method needed? Why can't we delete it?

@@ -102,21 +102,27 @@ public KZGProof computeBlobKzgProof(final Bytes blob, final KZGCommitment kzgCom
return ckzg4844Delegate.computeBlobKzgProof(blob, kzgCommitment);
}

@Override
public List<KZGCell> computeCells(final Bytes blob) {
// TODO: replace with RustKZG when available
Copy link
Member

Choose a reason for hiding this comment

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

Where are we tracking this? We are probably gonna forget...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's done, just outdated todo, thank you for catching it

@zilm13
Copy link
Contributor Author

zilm13 commented Apr 15, 2025

So debts, I want to do in separate PR:

  • cleanup tests, removing computeCellsAndProofs
  • add computeCells tests
  • add fulu block production tests
  • builder bid fulu compatibleness with cell kzg proofs

@lucassaldanha lucassaldanha merged commit ec1f8f4 into Consensys:das Apr 15, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants