Redo spec of state circuit#118
Conversation
miha-stopar
left a comment
There was a problem hiding this comment.
Nice!! Only a couple of nitpicks and questions.
|
Another doubt I have for the state circuit is how to extract the number of operations that have happened, so that the prover can't introduce extra operations that are not used in the EVM circuit.
We must take into account that for State Tree operations we're introducing artificial writes with One idea that comes to my mind is to add an advice column that counts the number of rows with What do people think of this? |
NOthing but the below check confirms that every row has to be used by the evm proof.
I was thinking to count the number of elements in the RW table in the zkevm and then the l1 smartcontract confirm that the polynomial contains exactly that many elements. I know Han has been thinking about this more so maybe has a better idea :) |
Originally Barry proposes to use degree check (by underlying PCS) on the My naive thought is to let both State circuit and EVM circuit to consume the same public input |
han0110
left a comment
There was a problem hiding this comment.
All look great, only with some outdated docs are wrong and should be removed.
At the point when we are implmenting the l1 verifier we can consider these two options. For now as long as we have a solution we are confident will work i think we are good to go. |
b145f36 to
0258fe5
Compare
|
I have added tests for situations that don't pass the constraints. Should I update |
690f3cf to
92eda55
Compare
After a discussion with Han I understood that the Nevertheless one of the changes I made is to introduce a new key column so that address values stay in a single column. If this change is approved, |
- Update the state proof document
- Write the spec of the state circuit in python from scratch following
the current `rw_table` design.
- Add state circuit tests
- List of changes:
- Renamed key and aux columns so start with index 0, in order to
make it more readable when working with code were we have arrays
called `keys`. This way `key0` == `keys[0]`.
- Add a new key column so that we have a cloumn exclusive for
address keys, which allows us to reuse the key order constraints
for addresses for all operations.
- Add the boilerplate for the missing operations
- Remove value2 column (used for `valuePrev`) in some Write
operations
the current
rw_tabledesign.make it more readable when working with code were we have arrays
called
keys. This waykey0==keys[0].address keys, which allows us to reuse the key order constraints
for addresses for all operations.
valuePrev) in some Writeoperations