You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Icicle integration for the Groth16/BN254 backend is out of date and does not currently compile, and the version of icicle that gnark depends on is old.
Description
Trying to build gnark with -tags=icicle fails due to accumulated changes in the rest of the gnark internal API that were not reflected in the Icicle backend. See the specific compile errors mentioned in "Actual Behavior" below.
Additionally, the icicle dependency used by gnark is currently commit ingonyama-zk/icicle@97f0079 (specified in go.mod here, indirectly from the iciclegnark dependency), which means that the current instructions specified here do not work for gnark: the current version of the icicle Go bindings create static libraries like libingo_curve_bn254.a and libingo_field_bn254.a while the older version that gnark relies on creates a shared library libbn254.so and the build process is documented here instead. It would be very nice if the gnark integration could be updated to support the latest icicle version as well, besides simply fixing the compile errors mentioned in this issue, though that probably requires Ingonyama to make the respective updates to the iciclegnark package.
Expected Behavior
The code should compile without errors and generated proofs should verify correctly.
Actual Behavior
Building with -tags=icicle gives the following compile errors:
# github.com/consensys/gnark/backend/groth16/bn254/icicle [github.com/consensys/gnark.test]
backend/groth16/bn254/icicle/icicle.go:44:30: cannot use pk.Domain.CosetTableInv (value of type func() ([]"github.com/consensys/gnark-crypto/ecc/bn254/fr".Element, error)) as []"github.com/consensys/gnark-crypto/ecc/bn254/fr".Element value in argument to iciclegnark.CopyToDevice
backend/groth16/bn254/icicle/icicle.go:47:30: cannot use pk.Domain.CosetTable (value of type func() ([]"github.com/consensys/gnark-crypto/ecc/bn254/fr".Element, error)) as []"github.com/consensys/gnark-crypto/ecc/bn254/fr".Element value in argument to iciclegnark.CopyToDevice
backend/groth16/bn254/icicle/icicle.go:160:73: commitmentInfo[i].HintID undefined (type constraint.Groth16Commitment has no field or method HintID)
Possible Fix
I tried fixing this locally in this commit wwared@186e9de
However, even though this enabled me to compile gnark with Icicle support (linking against the older version at commit ingonyama-zk/icicle@97f0079), proofs generated with this would fail to verify with panic: pairing doesn't match, so this attempted fix is either wrong or incomplete.
Steps to Reproduce
Run go test -tags=icicle on the repository root of current master, or attempt to build a gnark-using program by passing -tags=icicle to the build/run command line.
Context
I am trying to generate a proof using GPU acceleration for a circuit defined on the latest gnark. It's not easy for me to revert to an older gnark version.
Your Environment
gnark version used: HEAD@master (db299ce as of writing)
gnark-crypto version used: Whichever one is used by default (v0.12.2-0.20240504013751-564b6f724c3b according to go.mod)
go version: 1.22.3
Operating System and version: Linux 6.6.30
The text was updated successfully, but these errors were encountered:
The Icicle integration for the Groth16/BN254 backend is out of date and does not currently compile, and the version of icicle that gnark depends on is old.
Description
Trying to build gnark with
-tags=icicle
fails due to accumulated changes in the rest of the gnark internal API that were not reflected in the Icicle backend. See the specific compile errors mentioned in "Actual Behavior" below.Additionally, the icicle dependency used by gnark is currently commit ingonyama-zk/icicle@97f0079 (specified in go.mod here, indirectly from the iciclegnark dependency), which means that the current instructions specified here do not work for gnark: the current version of the icicle Go bindings create static libraries like
libingo_curve_bn254.a
andlibingo_field_bn254.a
while the older version that gnark relies on creates a shared librarylibbn254.so
and the build process is documented here instead. It would be very nice if the gnark integration could be updated to support the latest icicle version as well, besides simply fixing the compile errors mentioned in this issue, though that probably requires Ingonyama to make the respective updates to the iciclegnark package.Expected Behavior
The code should compile without errors and generated proofs should verify correctly.
Actual Behavior
Building with
-tags=icicle
gives the following compile errors:Possible Fix
I tried fixing this locally in this commit wwared@186e9de
However, even though this enabled me to compile gnark with Icicle support (linking against the older version at commit ingonyama-zk/icicle@97f0079), proofs generated with this would fail to verify with
panic: pairing doesn't match
, so this attempted fix is either wrong or incomplete.Steps to Reproduce
go test -tags=icicle
on the repository root of current master, or attempt to build a gnark-using program by passing-tags=icicle
to the build/run command line.Context
I am trying to generate a proof using GPU acceleration for a circuit defined on the latest gnark. It's not easy for me to revert to an older gnark version.
Your Environment
HEAD@master
(db299ce as of writing)v0.12.2-0.20240504013751-564b6f724c3b
according togo.mod
)The text was updated successfully, but these errors were encountered: