mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
crypto/kzg4844: rename method
This commit is contained in:
parent
cd439798bd
commit
05b48a9ba7
4 changed files with 10 additions and 10 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue