Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove ComputeCommitments which is unused.
  • Loading branch information
roberto-bayardo committed Nov 11, 2022
commit 7601916ab5905a88e7a2241406e3e2402db10647
15 changes: 0 additions & 15 deletions core/types/data_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,21 +296,6 @@ func (blobs Blobs) copy() Blobs {
return cpy
}

// Return KZG commitments and versioned hashes that correspond to these blobs
func (blobs Blobs) ComputeCommitments() ([]KZGCommitment, []common.Hash, bool) {
commitments := make([]KZGCommitment, len(blobs))
versionedHashes := make([]common.Hash, len(blobs))
for i, blob := range blobs {
frs, ok := blob.ToKZGBlob()
if !ok {
return nil, nil, false
}
commitments[i] = KZGCommitment(kzg.BlobToKZGCommitment(frs))
versionedHashes[i] = common.Hash(kzg.KZGToVersionedHash(kzg.KZGCommitment(commitments[i])))
}
return commitments, versionedHashes, true
}

// Return KZG commitments, versioned hashes and the aggregated KZG proof that correspond to these blobs
func (blobs Blobs) ComputeCommitmentsAndAggregatedProof() (commitments []KZGCommitment, versionedHashes []common.Hash, aggregatedProof KZGProof, err error) {
commitments = make([]KZGCommitment, len(blobs))
Expand Down