Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanc committed Nov 14, 2024
1 parent c712ba7 commit 76fc855
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions encoding/kzg/prover/icicle/multiframe_proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/Layr-Labs/eigenda/encoding/fft"
"github.com/Layr-Labs/eigenda/encoding/icicle"
"github.com/Layr-Labs/eigenda/encoding/kzg"
"github.com/Layr-Labs/eigenda/encoding/utils/gpu_utils"
"github.com/Layr-Labs/eigenda/encoding/utils/toeplitz"
"github.com/consensys/gnark-crypto/ecc/bn254"
"github.com/consensys/gnark-crypto/ecc/bn254/fr"
Expand Down Expand Up @@ -83,7 +83,7 @@ func (p *KzgMultiProofIcicleBackend) ComputeMultiFrameProof(polyFr []fr.Element,
flattenCoeffStoreFr = append(flattenCoeffStoreFr, coeffStore[i]...)
}

flattenCoeffStoreSf := gpu_utils.ConvertFrToScalarFieldsBytes(flattenCoeffStoreFr)
flattenCoeffStoreSf := icicle.ConvertFrToScalarFieldsBytes(flattenCoeffStoreFr)
flattenCoeffStoreCopy := core.HostSliceFromElements[icicle_bn254.ScalarField](flattenCoeffStoreSf)

var icicleFFTBatch []bn254.G1Affine
Expand Down Expand Up @@ -135,7 +135,7 @@ func (p *KzgMultiProofIcicleBackend) ComputeMultiFrameProof(polyFr []fr.Element,
flatProofsBatchHost := make(core.HostSlice[icicle_bn254.Projective], int(numPoly)*int(dimE))
flatProofsBatchHost.CopyFromDevice(&flatProofsBatch)
flatProofsBatch.Free()
icicleFFTBatch = gpu_utils.HostSliceIcicleProjectiveToGnarkAffine(flatProofsBatchHost, int(p.NumWorker))
icicleFFTBatch = icicle.HostSliceIcicleProjectiveToGnarkAffine(flatProofsBatchHost, int(p.NumWorker))
})

wg.Wait()
Expand Down
3 changes: 3 additions & 0 deletions encoding/rs/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
func (e *Encoder) Decode(frames []Frame, indices []uint64, maxInputSize uint64, params encoding.EncodingParams) ([]byte, error) {
// Get encoder
g, err := e.GetRsEncoder(params)
if err != nil {
return nil, err
}

numSys := encoding.GetNumSys(maxInputSize, g.ChunkLength)

Expand Down
6 changes: 3 additions & 3 deletions encoding/rs/icicle/extend_poly.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package icicle
import (
"sync"

"github.com/Layr-Labs/eigenda/encoding/utils/gpu_utils"
"github.com/Layr-Labs/eigenda/encoding/icicle"
"github.com/consensys/gnark-crypto/ecc/bn254/fr"
"github.com/ingonyama-zk/icicle/v3/wrappers/golang/core"
icicle_bn254 "github.com/ingonyama-zk/icicle/v3/wrappers/golang/curves/bn254"
Expand All @@ -27,11 +27,11 @@ func (g *RsIcicleComputeDevice) ExtendPolyEval(coeffs []fr.Element) ([]fr.Elemen
g.NttCfg.BatchSize = int32(1)
runtime.RunOnDevice(&g.Device, func(args ...any) {
defer wg.Done()
scalarsSF := gpu_utils.ConvertFrToScalarFieldsBytes(coeffs)
scalarsSF := icicle.ConvertFrToScalarFieldsBytes(coeffs)
scalars := core.HostSliceFromElements[icicle_bn254.ScalarField](scalarsSF)
outputDevice := make(core.HostSlice[icicle_bn254.ScalarField], len(coeffs))
ntt.Ntt(scalars, core.KForward, &g.NttCfg, outputDevice)
evals = gpu_utils.ConvertScalarFieldsToFrBytes(outputDevice)
evals = icicle.ConvertScalarFieldsToFrBytes(outputDevice)
})

wg.Wait()
Expand Down

0 comments on commit 76fc855

Please sign in to comment.