lurk-rs
lurk-rs copied to clipboard
Make MemoSet provable with Lurk
Once #1004 merges, the next step is to allow making proofs of calls to a query from Lurk. This issues tries to itemize the tasks needed to accomplish this. The first version to tackle will simply support factorial
as implemented by DemoQuery
.
- [ ] Make MemoSet proving configurable — so this work doesn't prevent the status quo from continuing to function exactly as-is.
- [ ] Add two new registers alongside existing CEK:
transcript
andmemoset
(the latter is the multiset acc associated with the deferred proofs). - [ ] Add constraints to the primary reduction circuit so that the transition from
Outermost
toTerminal
continuations can only be performed if the MemoSet conditions are met. This is very important. The conditions are:- [ ]
memoset
must be empty, which in this case means equal to zero. - [ ]
transcript
must equal the globalr
value that has been dynamically allocated for this proof. - NOTE: Both of the above are accomplished by
CircuitScope::finalize()
.
- [ ]
- [ ] Create coprocessor that can prove blocks (of some
rc
) offactorial
queries, by callingDemoCircuitQuery::synthesize_eval()
on a query known to befactorial
. This will need to handle padding when fewer thanrc
queries must be proved. - [ ] Enhance evaluation to create a
Scope
and thread through reduction. - [ ] Enhance reduction to support
factorial
with calls toDemoQuery::eval()
. - [ ] Enhance proving to include the logic in
CircuitScope::synthesize()
- [ ] Create a
CircuitScope
fromScope
- [ ] Prove insertion of toplevel queries as part of normal reduction proving (i.e. inline the call to
synthesize_toplevel_query
as the circuit equivalent ofQuery::eval()
. - [ ] Prove the queries themselves, by sequencing as many repetitions of the (in this case)
factorial
circuit as are required (depending on that circuit'src
and the total number of such queries used). - [ ] Prove the final transition to
Terminal
continuation.
- [ ] Create a