@@ -8,14 +8,44 @@ import (
8
8
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
9
9
)
10
10
11
+ // CircuitAssignment is an implementation of [wizard.ProverAction]. As such, it
12
+ // embodies the action of assigning the full-recursion Plonk circuit columns.
11
13
type CircuitAssignment fullRecursionCtx
12
14
13
- func (c CircuitAssignment ) Run (run * wizard.ProverRuntime ) {
14
- c .PlonkInWizard .ProverAction .Run (run , WitnessAssigner (c ))
15
+ // ConsistencyCheck is an implementation of [wizard.VerifierAction]. As such it
16
+ // is responsible for checking that the public inputs of the full-recursion
17
+ // Plonk circuit are assigned to values that are consistent with (1) the public
18
+ // inputs of the wrapping wizard protocol and with the inputs of the
19
+ // self-recursion wizard.
20
+ type ConsistencyCheck struct {
21
+ fullRecursionCtx
22
+ isSkipped bool
15
23
}
16
24
25
+ // ReplacementAssignment is a [wizard.ProverAction] implementation. It assigns
26
+ // the queries and columns that are "replaced" in the wizard. In essence, this
27
+ // concerns the main grail polynomial evaluation (the grail query) and the
28
+ // Merkle roots assignment. These have to be replaced so that they can be
29
+ // refered to by the self-recursion. Otherwise, they would be swallowed by the
30
+ // recursion Plonk circuit.
17
31
type ReplacementAssignment fullRecursionCtx
18
32
33
+ // LocalOpeningAssignment assigns the local openings made over the Plonk PI.
34
+ // These are needed in order to (1) perform the consistency check (2) replace
35
+ // the "old" and recursed public inputs of the original wizard by new ones.
36
+ type LocalOpeningAssignment fullRecursionCtx
37
+
38
+ // ResetFsActions is a [wizard.FsHook] responsible for tweaking the FS state as
39
+ // required by the self-recursion process.
40
+ type ResetFsActions struct {
41
+ fullRecursionCtx
42
+ isSkipped bool
43
+ }
44
+
45
+ func (c CircuitAssignment ) Run (run * wizard.ProverRuntime ) {
46
+ c .PlonkInWizard .ProverAction .Run (run , WitnessAssigner (c ))
47
+ }
48
+
19
49
func (c ReplacementAssignment ) Run (run * wizard.ProverRuntime ) {
20
50
params := run .GetUnivariateParams (c .PolyQuery .QueryID )
21
51
run .AssignUnivariate (c .PolyQueryReplacement .QueryID , params .X , params .Ys ... )
@@ -34,8 +64,6 @@ func (c ReplacementAssignment) Run(run *wizard.ProverRuntime) {
34
64
}
35
65
}
36
66
37
- type LocalOpeningAssignment fullRecursionCtx
38
-
39
67
func (c LocalOpeningAssignment ) Run (run * wizard.ProverRuntime ) {
40
68
for i := range c .LocalOpenings {
41
69
run .AssignLocalPoint (
@@ -45,11 +73,6 @@ func (c LocalOpeningAssignment) Run(run *wizard.ProverRuntime) {
45
73
}
46
74
}
47
75
48
- type ConsistencyCheck struct {
49
- fullRecursionCtx
50
- isSkipped bool
51
- }
52
-
53
76
func (c * ConsistencyCheck ) Run (run * wizard.VerifierRuntime ) error {
54
77
55
78
var (
@@ -168,11 +191,6 @@ func (c *ConsistencyCheck) IsSkipped() bool {
168
191
return c .isSkipped
169
192
}
170
193
171
- type ResetFsActions struct {
172
- fullRecursionCtx
173
- isSkipped bool
174
- }
175
-
176
194
func (r * ResetFsActions ) Run (run * wizard.VerifierRuntime ) error {
177
195
finalFsCirc := run .GetLocalPointEvalParams (r .LocalOpenings [1 ].ID ).Y
178
196
run .FS .SetState ([]field.Element {finalFsCirc })
0 commit comments