-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91becb6
commit a194d13
Showing
9 changed files
with
124 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Separate OpCode, Separate AIRs | ||
|
||
This chapter explains how Stwo enables composition of multiple AIRs, particularly useful for complex computations with distinct operations. | ||
|
||
## AIR Composition | ||
|
||
Stwo allows you to: | ||
|
||
- Define separate AIRs for different operations | ||
- Compose them efficiently | ||
- Maintain modularity and reusability | ||
|
||
## Benefits of Separation | ||
|
||
1. **Modularity** | ||
|
||
- Each operation has its own AIR | ||
- Easier to test and verify | ||
- Simpler to maintain | ||
|
||
2. **Optimization** | ||
|
||
- Specialized constraints per operation | ||
- Efficient lookup table usage | ||
- Better proof composition | ||
|
||
3. **Flexibility** | ||
- Mix and match operations | ||
- Add new operations easily | ||
- Reuse existing AIRs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# How to Write an AIR using Stwo Abstractions | ||
|
||
This guide walks through the process of creating a custom AIR using Stwo's abstractions and tools. | ||
|
||
## AIR Structure | ||
|
||
An AIR in Stwo consists of: | ||
|
||
1. Trace columns | ||
2. Transition constraints | ||
3. Boundary constraints | ||
4. Lookup tables (optional) | ||
|
||
## Best Practices | ||
|
||
When writing an AIR: | ||
|
||
1. Keep constraints simple and modular | ||
2. Use lookup tables for repeated patterns | ||
3. Optimize field operations | ||
4. Consider composition with other AIRs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Lookup Abstraction | ||
|
||
Stwo provides powerful abstractions for implementing efficient lookup tables in AIRs. | ||
|
||
## Overview | ||
|
||
Lookup tables in Stwo allow for: | ||
|
||
- Efficient verification of value membership | ||
- Reduced polynomial degree | ||
- Composition of multiple tables | ||
- (planned)GKR integration | ||
|
||
## Performance Considerations | ||
|
||
- Table size vs. proof size tradeoffs | ||
- Optimal table composition strategies | ||
- Memory usage optimization | ||
- Lookup batch processing |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Simple M31 AIR Example | ||
|
||
This chapter presents a complete example of implementing a simple AIR over the Mersenne31 field. | ||
|
||
## Problem Description | ||
|
||
We'll implement an AIR that proves knowledge of a sequence where each element is the square of the previous element. | ||
|
||
## Implementation | ||
|
||
## Step-by-Step Explanation | ||
|
||
1. **Column Definition**: Single column for the sequence values | ||
2. **Transition Constraint**: Each value is the square of the previous | ||
3. **Boundary Constraint**: Sets the initial value | ||
4. **Proving**: Generates a proof of the sequence | ||
5. **Verification**: Checks the proof's validity |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Stwo As a Universal AIR Prover/Verifier | ||
|
||
Stwo is designed as a universal framework for proving and verifying Algebraic Intermediate Representations (AIRs). This chapter explains how Stwo serves as a foundation for various zero-knowledge proof applications. | ||
|
||
## Universal AIR Framework | ||
|
||
Stwo provides a flexible framework that allows developers to: | ||
|
||
- Define custom AIRs for specific computational tasks | ||
- Leverage optimized proving mechanisms | ||
- Utilize efficient lookup tables | ||
- Compose multiple AIRs together | ||
|
||
## Core Components | ||
|
||
The universal AIR framework consists of: | ||
|
||
1. **AIR Definition Layer** | ||
|
||
- Custom constraint systems | ||
- Trace generation | ||
- Polynomial commitments | ||
|
||
2. **Proving Layer** | ||
|
||
- Circle STARK proving system | ||
- Efficient Mersenne31 field operations | ||
- Lookup table optimizations | ||
|
||
3. **Verification Layer** |
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.