1
1
package fullrecursion_test
2
2
3
3
import (
4
+ "fmt"
4
5
"testing"
5
6
6
7
"github.com/consensys/linea-monorepo/prover/crypto/ringsis"
7
8
"github.com/consensys/linea-monorepo/prover/maths/common/smartvectors"
8
9
"github.com/consensys/linea-monorepo/prover/protocol/compiler/fullrecursion"
9
10
"github.com/consensys/linea-monorepo/prover/protocol/compiler/globalcs"
11
+ "github.com/consensys/linea-monorepo/prover/protocol/compiler/innerproduct"
10
12
"github.com/consensys/linea-monorepo/prover/protocol/compiler/localcs"
11
13
"github.com/consensys/linea-monorepo/prover/protocol/compiler/lookup"
14
+ "github.com/consensys/linea-monorepo/prover/protocol/compiler/mimc"
15
+ "github.com/consensys/linea-monorepo/prover/protocol/compiler/permutation"
16
+ "github.com/consensys/linea-monorepo/prover/protocol/compiler/specialqueries"
17
+ "github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
18
+ "github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter/sticker"
12
19
"github.com/consensys/linea-monorepo/prover/protocol/compiler/univariates"
13
20
"github.com/consensys/linea-monorepo/prover/protocol/compiler/vortex"
14
21
"github.com/consensys/linea-monorepo/prover/protocol/ifaces"
@@ -35,21 +42,59 @@ func TestLookup(t *testing.T) {
35
42
run .AssignColumn ("B" , smartvectors .ForTest (1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ))
36
43
}
37
44
38
- comp := wizard .Compile (
39
- define ,
40
- lookup .CompileLogDerivative ,
41
- localcs .Compile ,
42
- globalcs .Compile ,
43
- univariates .CompileLocalOpening ,
44
- univariates .Naturalize ,
45
- univariates .MultiPointToSinglePoint (8 ),
46
- vortex .Compile (2 , vortex .ForceNumOpenedColumns (4 ), vortex .WithSISParams (& ringsis .StdParams )),
47
- fullrecursion .FullRecursion (true ),
48
- )
49
-
50
- proof := wizard .Prove (comp , prove )
51
-
52
- if err := wizard .Verify (comp , proof ); err != nil {
53
- t .Fatalf ("verifier failed: %v" , err )
45
+ suites := [][]func (* wizard.CompiledIOP ){
46
+ {
47
+ lookup .CompileLogDerivative ,
48
+ localcs .Compile ,
49
+ globalcs .Compile ,
50
+ univariates .CompileLocalOpening ,
51
+ univariates .Naturalize ,
52
+ univariates .MultiPointToSinglePoint (8 ),
53
+ vortex .Compile (2 , vortex .ForceNumOpenedColumns (4 ), vortex .WithSISParams (& ringsis .StdParams )),
54
+ fullrecursion .FullRecursion (true ),
55
+ },
56
+ {
57
+ lookup .CompileLogDerivative ,
58
+ localcs .Compile ,
59
+ globalcs .Compile ,
60
+ univariates .CompileLocalOpening ,
61
+ univariates .Naturalize ,
62
+ univariates .MultiPointToSinglePoint (8 ),
63
+ vortex .Compile (2 , vortex .ForceNumOpenedColumns (4 ), vortex .WithSISParams (& ringsis .StdParams )),
64
+ fullrecursion .FullRecursion (true ),
65
+ mimc .CompileMiMC ,
66
+ specialqueries .RangeProof ,
67
+ lookup .CompileLogDerivative ,
68
+ specialqueries .CompileFixedPermutations ,
69
+ permutation .CompileGrandProduct ,
70
+ innerproduct .Compile ,
71
+ sticker .Sticker (1 << 8 , 1 << 16 ),
72
+ splitter .SplitColumns (1 << 16 ),
73
+ localcs .Compile ,
74
+ globalcs .Compile ,
75
+ univariates .CompileLocalOpening ,
76
+ univariates .Naturalize ,
77
+ univariates .MultiPointToSinglePoint (1 << 16 ),
78
+ vortex .Compile (2 , vortex .ForceNumOpenedColumns (4 ), vortex .WithSISParams (& ringsis .StdParams )),
79
+ fullrecursion .FullRecursion (true ),
80
+ },
81
+ }
82
+
83
+ for i , s := range suites {
84
+
85
+ t .Run (fmt .Sprintf ("case-%v" , i ), func (t * testing.T ) {
86
+
87
+ comp := wizard .Compile (
88
+ define ,
89
+ s ... ,
90
+ )
91
+
92
+ proof := wizard .Prove (comp , prove )
93
+
94
+ if err := wizard .Verify (comp , proof ); err != nil {
95
+ t .Fatalf ("verifier failed: %v" , err )
96
+ }
97
+ })
98
+
54
99
}
55
100
}
0 commit comments