crypto/kzg4844: rename method

This commit is contained in:
Marius van der Wijden 2025-03-13 16:30:53 +01:00 committed by MariusVanDerWijden
parent cd439798bd
commit 05b48a9ba7
4 changed files with 10 additions and 10 deletions

View file

@ -149,15 +149,15 @@ func VerifyBlobProof(blob *Blob, commitment Commitment, proof Proof) error {
return gokzgVerifyBlobProof(blob, commitment, proof) return gokzgVerifyBlobProof(blob, commitment, proof)
} }
// ComputeCells returns the KZG cell proofs that are used to verify the blob against // ComputeCellProofs returns the KZG cell proofs that are used to verify the blob against
// the commitment. // the commitment.
// //
// This method does not verify that the commitment is correct with respect to blob. // This method does not verify that the commitment is correct with respect to blob.
func ComputeCells(blob *Blob) ([]Proof, error) { func ComputeCellProofs(blob *Blob) ([]Proof, error) {
if useCKZG.Load() { if useCKZG.Load() {
return ckzgComputeCells(blob) return ckzgComputeCellProofs(blob)
} }
return gokzgComputeCells(blob) return gokzgComputeCellProofs(blob)
} }
// CalcBlobHashV1 calculates the 'versioned blob hash' of a commitment. // CalcBlobHashV1 calculates the 'versioned blob hash' of a commitment.

View file

@ -132,11 +132,11 @@ func ckzgVerifyBlobProof(blob *Blob, commitment Commitment, proof Proof) error {
return nil return nil
} }
// ckzgComputeCells returns the KZG cell proofs that are used to verify the blob against // ckzgComputeCellProofs returns the KZG cell proofs that are used to verify the blob against
// the commitment. // the commitment.
// //
// This method does not verify that the commitment is correct with respect to blob. // This method does not verify that the commitment is correct with respect to blob.
func ckzgComputeCells(blob *Blob) ([]Proof, error) { func ckzgComputeCellProofs(blob *Blob) ([]Proof, error) {
ckzgIniter.Do(ckzgInit) ckzgIniter.Do(ckzgInit)
_, proofs, err := ckzg4844.ComputeCellsAndKZGProofs((*ckzg4844.Blob)(blob)) _, proofs, err := ckzg4844.ComputeCellsAndKZGProofs((*ckzg4844.Blob)(blob))

View file

@ -61,10 +61,10 @@ func ckzgVerifyBlobProof(blob *Blob, commitment Commitment, proof Proof) error {
panic("unsupported platform") panic("unsupported platform")
} }
// ckzgComputeCells returns the KZG cell proofs that are used to verify the blob against // ckzgComputeCellProofs returns the KZG cell proofs that are used to verify the blob against
// the commitment. // the commitment.
// //
// This method does not verify that the commitment is correct with respect to blob. // This method does not verify that the commitment is correct with respect to blob.
func ckzgComputeCells(blob *Blob) ([]Proof, error) { func ckzgComputeCellProofs(blob *Blob) ([]Proof, error) {
panic("unsupported platform") panic("unsupported platform")
} }

View file

@ -97,11 +97,11 @@ func gokzgVerifyBlobProof(blob *Blob, commitment Commitment, proof Proof) error
return context.VerifyBlobKZGProof((*gokzg4844.Blob)(blob), (gokzg4844.KZGCommitment)(commitment), (gokzg4844.KZGProof)(proof)) return context.VerifyBlobKZGProof((*gokzg4844.Blob)(blob), (gokzg4844.KZGCommitment)(commitment), (gokzg4844.KZGProof)(proof))
} }
// gokzgComputeCells returns the KZG cell proofs that are used to verify the blob against // gokzgComputeCellProofs returns the KZG cell proofs that are used to verify the blob against
// the commitment. // the commitment.
// //
// This method does not verify that the commitment is correct with respect to blob. // This method does not verify that the commitment is correct with respect to blob.
func gokzgComputeCells(blob *Blob) ([]Proof, error) { func gokzgComputeCellProofs(blob *Blob) ([]Proof, error) {
gokzgIniter.Do(gokzgInit) gokzgIniter.Do(gokzgInit)
_, proofs, err := context.ComputeCellsAndKZGProofs((*gokzg4844.Blob)(blob), 0) _, proofs, err := context.ComputeCellsAndKZGProofs((*gokzg4844.Blob)(blob), 0)