Skip to content

Commit

Permalink
feat: add missing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mellowcroc committed Feb 14, 2025
1 parent 91becb6 commit a194d13
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 17 deletions.
14 changes: 7 additions & 7 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Clarify that Stwo-Cairo is a "particular application" of Stwo.

- [Quickstart](getting-started/quickstart.md)
- [Installation](getting-started/installation.md)
- [Programming]
- [Bootloading]
- [Programming](getting-started/programming.md)
- [Bootloading](getting-started/bootloading.md)
- [Troubleshooting](getting-started/troubleshooting.md)

# AIR Development

- [Stwo As a "Universal AIR Prover/Verifier"]
- [How to Write an AIR using Stwo abtractions]
- ["Maya's Simple M31 AIR" example]
- [Lookup Abstraction]
- [Seperate OpCode, Seperate AIRs] (composition of AIRs)
- [Stwo As a "Universal AIR Prover/Verifier"](air-development/universal-air.md)
- [How to Write an AIR using Stwo abtractions](air-development/how-to-write-an-air.md)
- [Simple M31 AIR" example](air-development/simple-m31-air-example.md)
- [Lookup Abstraction](air-development/lookups.md)
- [Seperate OpCode, Seperate AIRs](air-development/air-composition.md)

# Cairo as a Stwo AIR

Expand Down
30 changes: 30 additions & 0 deletions src/air-development/air-composition.md
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
21 changes: 21 additions & 0 deletions src/air-development/how-to-write-an-air.md
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
19 changes: 19 additions & 0 deletions src/air-development/lookups.md
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
17 changes: 17 additions & 0 deletions src/air-development/simple-m31-air-example.md
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
30 changes: 30 additions & 0 deletions src/air-development/universal-air.md
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.
10 changes: 0 additions & 10 deletions src/roadmap.md

This file was deleted.

0 comments on commit a194d13

Please sign in to comment.