Replies: 1 comment 3 replies
-
Great questions! I'll respond to the first question about the permutation checks first and then follow up with a separate response to your other question a bit later. Permutation checks aren’t only used in the range checker, so here’s a general, high-level explanation for why we use them. (I’ll use the bitwise processor as an example, since it’s simpler to illustrate, but the concept is the same). Essentially, they allow us to offload expensive computations to specialized circuits where things can be done more cheaply while still allowing us to prove correct execution. For example, instead of directly executing an expensive operation that could take many cycles, such as a bitwise To enable this in the bitwise case, we have a special “Bitwise co-processor” which is our equivalent of a specialized circuit that will return the result of bitwise operations in a way that:
The co-processor takes in the two inputs and the bitwise operation and then provably computes the result so we could just look it up, which is exactly what we need. (You can read more about that in the bitwise design doc, which you may have seen already). But now we’re left with a problem - we can prove that the bitwise computation is done correctly, but it’s not connected to our main processor yet, so we still need a way to actually “look up” the value and prove that the value we’re using after our lookup is in fact the correct result from that co-processor for the inputs we specified. Permutation checks are what allow us to link these different processors and prove that this lookup is being executed correctly. In theory, this could be done as a permutation check where we generate 2 columns that build up to the same value (but maybe they include their lookup values at different rows), then we prove that their final values are equal. The columns would be built like this:
In practice, we reduce this from 2 columns to 1, so that we have 1 running product trace column where:
The implementation & design of the permutation checks in the range checker are more complicated because the overall design is more complex, but the purpose of the columns is the same, and the implementation follows the same concept (i.e. we use one column instead of two), so in practice we don't actually have separate |
Beta Was this translation helpful? Give feedback.
-
Great work!
I read the latest range check design, and i have several wonderings:
So
x
is one column from trace, we use permutation check to do mutliset-equal comparison withv
? So there will be differentv
s for differentx
s?for long-traces, we can do over 3n arbitrary 16-bit range-checks
. How is this3n
value calculated?Beta Was this translation helpful? Give feedback.
All reactions