diff --git a/constraint/bls12-377/system.go b/constraint/bls12-377/system.go index 91bfd65069..bcd9ab9225 100644 --- a/constraint/bls12-377/system.go +++ b/constraint/bls12-377/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/bls12-381/system.go b/constraint/bls12-381/system.go index 5390eb44fb..911294fd9f 100644 --- a/constraint/bls12-381/system.go +++ b/constraint/bls12-381/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/bls24-315/system.go b/constraint/bls24-315/system.go index 4f44e6b72c..5bdb86eda6 100644 --- a/constraint/bls24-315/system.go +++ b/constraint/bls24-315/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/bls24-317/system.go b/constraint/bls24-317/system.go index 149c208e88..2d9baec5d6 100644 --- a/constraint/bls24-317/system.go +++ b/constraint/bls24-317/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/bn254/system.go b/constraint/bn254/system.go index edb67f5753..48c0eca7b7 100644 --- a/constraint/bn254/system.go +++ b/constraint/bn254/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/bw6-633/system.go b/constraint/bw6-633/system.go index f71a6406cb..4b6715f7d6 100644 --- a/constraint/bw6-633/system.go +++ b/constraint/bw6-633/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/bw6-761/system.go b/constraint/bw6-761/system.go index 4b7d2a7096..7909122cf8 100644 --- a/constraint/bw6-761/system.go +++ b/constraint/bw6-761/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/constraint/tinyfield/system.go b/constraint/tinyfield/system.go index 5075e76415..dceacfe31d 100644 --- a/constraint/tinyfield/system.go +++ b/constraint/tinyfield/system.go @@ -43,10 +43,14 @@ type system struct { field } +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) } diff --git a/internal/generator/backend/template/representations/system.go.tmpl b/internal/generator/backend/template/representations/system.go.tmpl index e3fa05bb6f..cb3715fac1 100644 --- a/internal/generator/backend/template/representations/system.go.tmpl +++ b/internal/generator/backend/template/representations/system.go.tmpl @@ -25,11 +25,14 @@ type system struct { field } - +// NewR1CS is a constructor for R1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See groth16.NewCS(...) instead. func NewR1CS(capacity int) *R1CS { return newSystem(capacity, constraint.SystemR1CS) } +// NewSparseR1CS is a constructor for SparseR1CS. It is meant to be use by gnark frontend only, +// and should not be used by gnark users. See plonk.NewCS(...) instead. func NewSparseR1CS(capacity int) *SparseR1CS { return newSystem(capacity, constraint.SystemSparseR1CS) }