Skip to content

Conversation

@james-prysm
Copy link
Contributor

What type of PR is this?

Uncomment one line below and remove others.

Bug fix
Feature
Documentation
Other

What does this PR do? Why is it needed?

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

// - either enough sidecars to reconstruct the blobs.git a
//
// The skipKzgProofs parameter indicates whether to skip expensive KZG proof computations (post-Fulu optimization).
func ReconstructBlobs(block blocks.ROBlock, verifiedDataColumnSidecars []blocks.VerifiedRODataColumn, indices []int, skipKzgProofs bool) ([]*blocks.VerifiedROBlob, error) {
Copy link
Contributor

@nalepae nalepae Oct 21, 2025

Choose a reason for hiding this comment

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

We should not return a verified blob sidecar with a missing blob proof.
It breaks the promise of what is a verified blob sidecar.

@nalepae
Copy link
Contributor

nalepae commented Oct 21, 2025

Regarding the KZG blob proof:

  • For the blob_sidecars beacon API, transforming data column sidecars to blob sidecars continues to make sense.
  • For the blob beacon API, we can go from data column sidecars, but no need to transform them to blob sidecars, because we only need the blobs. ==> We can simply retrieve cells from the columns 0..63 and return them to the caller.

Regarding the KZG cell proofs:
We never need to compute them actually for the blob or blob_sidecars beacon API. So,

  • If we already have in the DB the data column sidecars 0..63: Let's load them from the DB, then extract the cells (and the commitments for the blob_sidecar beacon API)
  • If we don't have all the data columns sidecars 0..63: Let's load all data column sidecars sidecars we have in the, and only reconstruct the cells (and NOT the proofs)


// ComputeCellsAndKZGProofs computes the cells and cells KZG proofs from a given blob.
func ComputeCellsAndKZGProofs(blob *Blob) (CellsAndProofs, error) {
func ComputeCellsAndKZGProofs(blob *Blob) ([]Cell, []Proof, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This return triggered a lot of test changes

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