diff --git a/encoding/kzg/prover/parametrized_prover.go b/encoding/kzg/prover/parametrized_prover.go index 0657cfd2d8..e2f1956ca4 100644 --- a/encoding/kzg/prover/parametrized_prover.go +++ b/encoding/kzg/prover/parametrized_prover.go @@ -19,7 +19,6 @@ type ParametrizedProver struct { *rs.Encoder *kzg.KzgConfig - Ks *kzg.KZGSettings Fs *fft.FFTSettings Ks *kzg.KZGSettings @@ -164,7 +163,7 @@ func (g *ParametrizedProver) Encode(inputFr []fr.Element) (*bn254.G1Affine, *bn2 lengthCommitmentResult.Duration, lengthProofResult.Duration, proofsResult.Duration, - len(g.Srs.G2), + g.SRSOrder, g.SRSOrder-uint64(len(inputFr)), ) } diff --git a/encoding/kzg/prover/prover.go b/encoding/kzg/prover/prover.go index d07344be26..9f93fe89ea 100644 --- a/encoding/kzg/prover/prover.go +++ b/encoding/kzg/prover/prover.go @@ -287,9 +287,9 @@ func (g *Prover) newProver(params encoding.EncodingParams) (*ParametrizedProver, return &ParametrizedProver{ Encoder: encoder, KzgConfig: g.KzgConfig, - Srs: g.Srs, - G2Trailing: g.G2Trailing, Fs: fs, + Ks: ks, + SFs: sfs, FFTPointsT: fftPointsT, UseGpu: g.UseGpu, Computer: computer, diff --git a/encoding/test/main.go b/encoding/test/main.go index ab538d798b..d343760fe4 100644 --- a/encoding/test/main.go +++ b/encoding/test/main.go @@ -98,7 +98,7 @@ func TestKzgRs() { // create encoding object p, _ := prover.NewProver(kzgConfig, true) - p.UseGpu = false + p.UseGpu = true params := encoding.EncodingParams{NumChunks: numNode, ChunkLength: uint64(numSymbols) / uint64(numSys)} enc, _ := p.GetKzgEncoder(params)