diff --git a/encoding/kzg/prover/compute_proof.go b/encoding/kzg/prover/compute_proof.go index 6968dbbb14..07bb5eea26 100644 --- a/encoding/kzg/prover/compute_proof.go +++ b/encoding/kzg/prover/compute_proof.go @@ -183,7 +183,10 @@ func (p *CpuComputer) GetSlicesCoeff(polyFr []fr.Element, dimE, j, l uint64) ([] m := uint64(len(polyFr)) - 1 dim := (m - j) / l - toeV := make([]fr.Element, 2*dimE-1) + // maximal number of unique values from a toeplitz matrix + tDim := 2*dimE - 1 + + toeV := make([]fr.Element, tDim) for i := uint64(0); i < dim; i++ { toeV[i].Set(&polyFr[m-(j+i*l)]) diff --git a/encoding/kzg/prover/encode.go b/encoding/kzg/prover/encode.go index 0c7b68a0a4..680b9ab09f 100644 --- a/encoding/kzg/prover/encode.go +++ b/encoding/kzg/prover/encode.go @@ -5,10 +5,10 @@ import ( "github.com/consensys/gnark-crypto/ecc/bn254/fr" ) -type ProofComputeDevice interface { +type ProofComputer interface { // blobFr are coefficients ComputeCommitment(blobFr []fr.Element) (*bn254.G1Affine, error) ComputeMultiFrameProof(blobFr []fr.Element, numChunks, chunkLen, numWorker uint64) ([]bn254.G1Affine, error) ComputeLengthCommitment(blobFr []fr.Element) (*bn254.G2Affine, error) ComputeLengthProof(blobFr []fr.Element) (*bn254.G2Affine, error) -} \ No newline at end of file +} diff --git a/encoding/kzg/prover/parametrized_prover.go b/encoding/kzg/prover/parametrized_prover.go index c7d8e86567..c62ac8e631 100644 --- a/encoding/kzg/prover/parametrized_prover.go +++ b/encoding/kzg/prover/parametrized_prover.go @@ -20,7 +20,7 @@ type ParametrizedProver struct { *kzg.KzgConfig Ks *kzg.KZGSettings - Computer ProofComputeDevice + Computer ProofComputer } type RsEncodeResult struct {