Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
45c9c4f
challenger: add `observe_base_as_algebra_element ` to `FieldChallenge…
tcoratger Nov 18, 2025
fc1c39e
Add Preprocessed trace setup and VKs (#1150)
sai-deng Nov 18, 2025
77d4f38
monty31: const assert in dot product (#1154)
tcoratger Nov 19, 2025
a677ca6
Add preprocessed column support in batch-STARK (#1151)
sai-deng Nov 19, 2025
b1f8c02
Make generate_trace_rows_for_perm public (#1159)
4l0n50 Nov 24, 2025
dab374b
challenger: add unit tests for `observe_base_as_algebra_element` (#1155)
tcoratger Nov 24, 2025
3c7c004
refactor: deduplicate field JSON serialization tests (#1162)
andrewshab3 Nov 25, 2025
dbb5c7d
Update lookup traits and add folders with lookups (#1160)
LindaGuiga Nov 25, 2025
ad3f6aa
ExtensionBuilder for SymbolicAirBuilder (#1161)
LindaGuiga Nov 25, 2025
eb871f9
Derive Clone for PreprocessedInstanceMeta (#1166)
LindaGuiga Nov 27, 2025
c9d8c3e
matrix: make `HorizontallyTruncated` more generic (#1170)
tcoratger Dec 1, 2025
25d7554
uni-stark: add unit tests for SymbolicExpression (#1169)
tcoratger Dec 1, 2025
dd2f840
build(deps): update criterion requirement from 0.7 to 0.8 (#1173)
dependabot[bot] Dec 1, 2025
7cbdbbf
uni stark: small touchups (#1163)
tcoratger Dec 1, 2025
02cae28
Clarify quotient degree vs quotient chunks naming (#1156)
sai-deng Dec 1, 2025
94bc0a7
core: add error messages to error enums via thiserror (#1168)
tcoratger Dec 1, 2025
6e85b7a
feat: add `SubAirBuilder` module (#1172)
Nashtare Dec 1, 2025
cdfc24a
doc: add intra-doc links (#1174)
Nashtare Dec 1, 2025
8970106
Allow users to impl either permute or permute_mut (#1175)
SyxtonPrime Dec 2, 2025
2c6bb78
Integrate lookups to prover and verifier (#1165)
LindaGuiga Dec 4, 2025
01e5b79
Automated releases with `release-plz` (#909)
BGluth Dec 8, 2025
72ceb6e
challenger: add `observe_algebra_elements` method (#1176)
tcoratger Dec 9, 2025
39ff9cb
core: small touchups (#1186)
tcoratger Dec 9, 2025
84b8bf6
challenger: use `observe_algebra_slice` when possible (#1187)
tcoratger Dec 10, 2025
1be8ac3
revert changes in uni-stark
zhenfeizhang Dec 11, 2025
32731f2
:Merge remote-tracking branch 'p3/main' into zz/merge-remote
zhenfeizhang Dec 11, 2025
7757708
fix compiling errors
zhenfeizhang Dec 11, 2025
23f67f3
address issues
zhenfeizhang Dec 11, 2025
6eb595e
fix ci
zhenfeizhang Dec 11, 2025
d7e18cc
CI
zhenfeizhang Dec 11, 2025
7bb999b
fmt
zhenfeizhang Dec 11, 2025
cfe7f29
remove unneccessay option for aux trace
zhenfeizhang Dec 11, 2025
bf1ff1f
Merge branch 'main' into zz/merge-remote
zhenfeizhang Dec 16, 2025
11876c7
Add thiserror dependency to Cargo.toml
zhenfeizhang Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release-plz

on:
pull_request:
types: [closed]
branches:
- main
# Allow manual re-runs if publish fails (e.g., crates.io outage)
workflow_dispatch:

jobs:
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
if: >-
${{
github.repository_owner == 'Plonky3' &&
(
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release'))
)
}}
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ bincode = { version = "2.0.0", default-features = false }
blake3 = { version = "1.5", default-features = false }
clap = { version = "4.5.23", features = ["derive"] }
clap_derive = "4.5.18"
criterion = "0.7"
criterion = "0.8"
hashbrown = "0.16.0"
hex-literal = "1.0.0"
itertools = { version = "0.14.0", default-features = false, features = [
"use_alloc",
] }

miden-air = { path = "miden-air", version = "0.3.0" }
num-bigint = { version = "0.4.3", default-features = false }
paste = "1.0.15"
postcard = { version = "1.0.0", default-features = false }
Expand All @@ -86,6 +88,7 @@ serde_json = "1.0.113"
sha2 = { version = "0.10.8", default-features = false }
sha3 = { version = "0.10.8", default-features = false }
spin = "0.10.0"
thiserror = "2.0.17"
tiny-keccak = "2.0.2"
tracing = { version = "0.1.37", default-features = false, features = [
"attributes",
Expand Down Expand Up @@ -133,7 +136,6 @@ p3-symmetric = { path = "symmetric", version = "0.3.0" }
p3-uni-stark = { path = "uni-stark", version = "0.3.0" }
p3-util = { path = "util", version = "0.3.0" }

miden-air = { path = "miden-air", version = "0.3.0" }

[workspace.package]
# General description field used for the sub-crates that are currently missing a description.
Expand Down
50 changes: 50 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Releasing Plonky3

This document describes how to create a new release of Plonky3.

## Prerequisites

- Install [release-plz](https://release-plz.dev/docs/installation)
- Set the `GIT_TOKEN` environment variable with a GitHub token that has permission to create PRs

## Creating a Release

1. Ensure your local `main` branch is up-to-date with the remote:
```bash
git checkout main
git pull origin main
```

2. Run the release script:
```bash
./create_release.sh
```

3. This creates a PR with:
- Version bumps for all crates (in lock-step)
- Updated changelogs based on conventional commits

4. Review and merge the PR. Once merged, CI automatically publishes all crates to crates.io.

## How It Works

- **Version grouping**: All crates share the same version via `version_group = "plonky3"` in `release-plz.toml`
- **Changelog generation**: Uses [git-cliff](https://git-cliff.org/) configured in `cliff.toml`
- **Version bump detection**: `release-plz` uses [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) to automatically detect the appropriate version bump:
- Breaking API changes (removed/changed public items) → major bump
- New public API additions → minor bump
- Bug fixes, internal changes, docs → patch bump
- **Conventional commits** (optional): If used, commit prefixes like `feat!:` can also signal breaking changes

## Troubleshooting

### CI publish failed

If the publish step fails (e.g., crates.io outage), you can manually re-run the workflow:

1. Go to Actions → Release-plz
2. Click "Run workflow" on the main branch

### release-plz says "no changes to release"

This means there are no conventional commits since the last release tag. Ensure your commits follow the [conventional commits](https://www.conventionalcommits.org/) format.
54 changes: 9 additions & 45 deletions air/src/air.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// no_std
use core::ops::{Add, Mul, Sub};

use p3_field::{Algebra, ExtensionField, Field, PrimeCharacteristicRing};
Expand All @@ -23,40 +22,6 @@ pub trait BaseAirWithPublicValues<F>: BaseAir<F> {
}
}

/// An extension of `BaseAir` that includes support for auxiliary traces.
pub trait BaseAirWithAuxTrace<F, EF>: BaseAir<F> {
/// Number of challenges (extension fields) that is required to compute the aux trace
fn num_randomness(&self) -> usize {
0
}

/// Number of columns (in extension field) that is required for aux trace
fn aux_width(&self) -> usize {
0
}

/// Build an aux trace (EF-based) given the main trace and EF challenges.
/// Return None to indicate no aux or to fall back to legacy behavior.
fn build_aux_trace(
&self,
_main: &RowMajorMatrix<F>,
_challenges: &[EF],
) -> Option<RowMajorMatrix<F>> {
// default: do nothing
None
}

/// Load an aux builder.
///
/// An aux builder takes in a main matrix and a randomness, and generate a aux matrix.
fn with_aux_builder<Builder>(&mut self, _builder: Builder)
where
Builder: Fn(&RowMajorMatrix<F>, &[EF]) -> RowMajorMatrix<F> + Send + Sync + 'static,
{
// default: do nothing
}
}

/// An algebraic intermediate representation (AIR) definition.
///
/// Contains an evaluation function for computing the constraints of the AIR.
Expand Down Expand Up @@ -224,7 +189,7 @@ pub trait ExtensionBuilder: AirBuilder<F: Field> {
type EF: ExtensionField<Self::F>;

/// Expression type over extension field elements.
type ExprEF: Algebra<Self::Expr> + Algebra<Self::EF>;
type ExprEF: From<Self::Expr> + Algebra<Self::EF>;

/// Variable type over extension field elements.
type VarEF: Into<Self::ExprEF> + Copy + Send + Sync;
Expand Down Expand Up @@ -252,20 +217,15 @@ pub trait ExtensionBuilder: AirBuilder<F: Field> {
}
}

/// Trait for builders supporting permutation-style auxiliary traces.
///
/// This extends [`ExtensionBuilder`] because permutation traces typically live in an extension
/// field, while the AIR itself may still work over the base field. Randomness is supplied in the
/// base expression type to preserve compatibility with existing AIR code that expects to work with
/// flattened components.
/// Trait for builders supporting permutation arguments (e.g., for lookup constraints).
pub trait PermutationAirBuilder: ExtensionBuilder {
/// Matrix type over extension-field variables representing permutation registers.
/// Matrix type over extension field variables representing a permutation.
type MP: Matrix<Self::VarEF>;

/// Randomness variable type used in permutation commitments.
type RandomVar: Into<Self::ExprEF> + Copy;

/// Return the matrix representing permutation registers over EF variables.
/// Return the matrix representing permutation registers.
fn permutation(&self) -> Self::MP;

/// Return the list of randomness values for permutation argument.
Expand Down Expand Up @@ -336,12 +296,16 @@ impl<AB: ExtensionBuilder> ExtensionBuilder for FilteredAirBuilder<'_, AB> {
where
I: Into<Self::ExprEF>,
{
self.inner.assert_zero_ext(x.into() * self.condition());
let ext_x = x.into();
let condition: Self::ExprEF = self.condition().into();

self.inner.assert_zero_ext(ext_x * condition);
}
}

impl<AB: PermutationAirBuilder> PermutationAirBuilder for FilteredAirBuilder<'_, AB> {
type MP = AB::MP;

type RandomVar = AB::RandomVar;

fn permutation(&self) -> Self::MP {
Expand Down
34 changes: 3 additions & 31 deletions baby-bear/src/baby_bear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ mod tests {
use p3_field::{InjectiveMonomial, PermutationMonomial, PrimeField64, TwoAdicField};
use p3_field_testing::{
test_field, test_field_dft, test_field_dft_consistency, test_field_dft_large,
test_prime_field, test_prime_field_32, test_prime_field_64, test_two_adic_field,
test_field_json_serialization, test_prime_field, test_prime_field_32, test_prime_field_64,
test_two_adic_field,
};

use super::*;
Expand Down Expand Up @@ -157,36 +158,7 @@ mod tests {
assert_eq!(m2.injective_exp_n().injective_exp_root_n(), m2);
assert_eq!(F::TWO.injective_exp_n().injective_exp_root_n(), F::TWO);

let f_serialized = serde_json::to_string(&f).unwrap();
let f_deserialized: F = serde_json::from_str(&f_serialized).unwrap();
assert_eq!(f, f_deserialized);

let f_1_serialized = serde_json::to_string(&f_1).unwrap();
let f_1_deserialized: F = serde_json::from_str(&f_1_serialized).unwrap();
let f_1_serialized_again = serde_json::to_string(&f_1_deserialized).unwrap();
let f_1_deserialized_again: F = serde_json::from_str(&f_1_serialized_again).unwrap();
assert_eq!(f_1, f_1_deserialized);
assert_eq!(f_1, f_1_deserialized_again);

let f_2_serialized = serde_json::to_string(&f_2).unwrap();
let f_2_deserialized: F = serde_json::from_str(&f_2_serialized).unwrap();
assert_eq!(f_2, f_2_deserialized);

let f_p_minus_1_serialized = serde_json::to_string(&f_p_minus_1).unwrap();
let f_p_minus_1_deserialized: F = serde_json::from_str(&f_p_minus_1_serialized).unwrap();
assert_eq!(f_p_minus_1, f_p_minus_1_deserialized);

let f_p_minus_2_serialized = serde_json::to_string(&f_p_minus_2).unwrap();
let f_p_minus_2_deserialized: F = serde_json::from_str(&f_p_minus_2_serialized).unwrap();
assert_eq!(f_p_minus_2, f_p_minus_2_deserialized);

let m1_serialized = serde_json::to_string(&m1).unwrap();
let m1_deserialized: F = serde_json::from_str(&m1_serialized).unwrap();
assert_eq!(m1, m1_deserialized);

let m2_serialized = serde_json::to_string(&m2).unwrap();
let m2_deserialized: F = serde_json::from_str(&m2_serialized).unwrap();
assert_eq!(m2, m2_deserialized);
test_field_json_serialization(&[f, f_1, f_2, f_p_minus_1, f_p_minus_2, m1, m2]);
}

// MontyField31's have no redundant representations.
Expand Down
2 changes: 2 additions & 0 deletions batch-stark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ p3-air.workspace = true
p3-challenger.workspace = true
p3-commit.workspace = true
p3-field.workspace = true
p3-lookup.workspace = true
p3-matrix.workspace = true
p3-maybe-rayon.workspace = true
p3-uni-stark.workspace = true
p3-util.workspace = true

hashbrown.workspace = true
itertools.workspace = true
serde = { workspace = true, features = ["derive", "alloc"] }
tracing.workspace = true
Expand Down
Loading
Loading