Reflect reviews#35
Merged
Merged
Conversation
rot256
approved these changes
Oct 20, 2025
| - [AIR Development](air-development/index.md) | ||
|
|
||
| - [Writing a Simple AIR](air-development/writing-a-simple-air/index.md) | ||
| - [First Breath of AIR](air-development/writing-a-simple-air/index.md) |
| </figure> | ||
|
|
||
| When we implement this in Stwo, the traces of each component will look like [Figure 2](#fig-component-trace) above. Each component has its own original and LogUp traces, and each the inputs and outputs of each component are connected by lookups. Since the scheduling component sets the LogUp value as a positive multiplicity and the computing component sets the same value as a negative multiplicity, the verifier can simply check that the sum of the two LogUp columns is zero. Note that we combine the input and output randomly (as $\dfrac{1}{Z - x \cdot \alpha^0 - (x^5+1) \cdot \alpha^1}$) to form a single lookup. This is because we want to ensure that each input is paired with the correct output. If we add the input and output as separate lookups (as $\dfrac{1}{Z - x} + \dfrac{1}{Z - (x^5+1)}$), a malicious prover can switch the output with a different row and still come up with a valid proof. For example, the following traces would be valid: | ||
| When we implement this in Stwo, the traces of each component will look like [Figure 2](#fig-component-trace) above. Each component has its own original and LogUp traces, and the inputs and outputs of each component are connected by lookups. Since the scheduling component sets the LogUp value as a positive multiplicity and the computing component sets the same value as a negative multiplicity, the verifier can simply check that the sum of the two LogUp columns is zero. Note that we combine the input and output randomly as |
Member
There was a problem hiding this comment.
Note that we combine the input and output randomly as:
Nit, is the combination of the (input,output) tuple not just
| When precomputing twiddles, we need to set the `log_size` of the domain to `log_num_rows + LOG_CONSTRAINT_EVAL_BLOWUP_FACTOR + config.fri_config.log_blowup_factor`. Simply put, `log_num_rows + LOG_CONSTRAINT_EVAL_BLOWUP_FACTOR` corresponds to the log degree of the composition polynomial and `config.fri_config.log_blowup_factor` is required to run FRI on the composition polynomial. | ||
|
|
||
| Note, however, that this is not a precise explanation, since we do not commit directly to the composition polynomial. Instead, we commit to the quotient polynomial $Q(x,y)$, which is computed by dividing the composition polynomial $C(x,y)$ by the vanishing polynomial $V(x,y)$. The vanishing polynomial vanishes (i.e. evaluates to 0) over the trace domain and thus has a degree of `1 << log_num_rows`. We can therefore calculate the size of the domain that we need as `(1 << (log_num_rows + LOG_CONSTRAINT_EVAL_BLOWUP_FACTOR) - 1 << log_num_rows) * (1 << config.fri_config.log_blowup_factor)`. However, since the size of the domain needs to be a power of 2, we will need to use the value `1 << (log_num_rows + LOG_CONSTRAINT_EVAL_BLOWUP_FACTOR + config.fri_config.log_blowup_factor)` unless `LOG_CONSTRAINT_EVAL_BLOWUP_FACTOR <= 1`. Thus, Stwo simply requires that the maximum domain size is to the value we defined above: the degree of the composition polynomial multiplied by the FRI blowup factor. | ||
| ```` |
Member
There was a problem hiding this comment.
I think there is one too many ` here
mellowcroc
force-pushed
the
jason/reflect-reviews-3
branch
from
October 23, 2025 05:58
0b3ecd3 to
4052c29
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.