Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
41 changes: 41 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Nix CI

on:
push:
branches: [main, dev]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
# Runs the test suite via Nix (the `checks.tests` cargo-nextest derivation)
nix-test:
name: Nix Tests
# Change to warp-ubuntu-latest-x64-16x for a more powerful runner (GitHub App must be enabled for this repo)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix build --print-build-logs
- run: nix flake check --print-build-logs

# Tests Nix devShell support on Ubuntu
nix-devshell:
name: Nix devShell Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix develop --command bash -c "cargo check --all-targets --features parallel"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ target/

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Nix
.direnv/
result*
65 changes: 65 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ p3-dft = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5
p3-field = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
p3-fri = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
p3-keccak = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
p3-blake3 = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
p3-matrix = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
p3-maybe-rayon = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
p3-merkle-tree = { git = "https://github.com/Plonky3/Plonky3", rev = "e9d75614dd6816f9b5dbb4413c69be63536efd64" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lookup arguments for shared state.

The protocol (`system`, `prover`, `verifier` modules) is generic over
[`StarkGenericConfig`](src/config.rs). The crate ships one production
configuration, `GoldilocksKeccakConfig` in [`types`](src/types.rs):
configuration, `GoldilocksBlake3Config` in [`types`](src/types.rs):

| Component | Choice |
|-----------|-----------------------------------------------|
Expand Down
8 changes: 4 additions & 4 deletions benches/multi_stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
use multi_stark::builder::symbolic::{SymbolicExpression, preprocessed_var, var};
use multi_stark::lookup::{Lookup, LookupAir};
use multi_stark::system::{System, SystemWitness};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksKeccakConfig, Val};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksBlake3Config, Val};
use multi_stark::{
p3_air::{Air, AirBuilder, BaseAir, WindowAccess},
p3_field::{Field, PrimeCharacteristicRing},
Expand Down Expand Up @@ -129,7 +129,7 @@ impl U32CS {

fn build_witness(
num_adds: usize,
system: &System<GoldilocksKeccakConfig, U32CS>,
system: &System<GoldilocksBlake3Config, U32CS>,
) -> SystemWitness<Val> {
let byte_width = 1;
let add_width = 14;
Expand Down Expand Up @@ -204,7 +204,7 @@ fn build_claims(num_adds: usize) -> Vec<[Val; 4]> {
// ---------------------------------------------------------------------------

fn bench_prove(c: &mut Criterion) {
let config = GoldilocksKeccakConfig::new(
let config = GoldilocksBlake3Config::new(
CommitmentParameters {
log_blowup: 1,
cap_height: 0,
Expand Down Expand Up @@ -244,7 +244,7 @@ fn bench_prove(c: &mut Criterion) {
}

fn bench_verify(c: &mut Criterion) {
let config = GoldilocksKeccakConfig::new(
let config = GoldilocksBlake3Config::new(
CommitmentParameters {
log_blowup: 1,
cap_height: 0,
Expand Down
3 changes: 2 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ allow = [
"Apache-2.0",
"Unicode-3.0",
"CC0-1.0",
# blake3 → arrayref; also allowed in ix's deny.toml
"BSD-2-Clause",
#"Apache-2.0 WITH LLVM-exception",
#"BSD-2-Clause",
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
Expand Down
4 changes: 2 additions & 2 deletions examples/lookup_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use multi_stark::builder::symbolic::{SymbolicExpression, var};
use multi_stark::lookup::{Lookup, LookupAir};
use multi_stark::system::{System, SystemWitness};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksKeccakConfig, Val};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksBlake3Config, Val};
use multi_stark::{
p3_air::{Air, AirBuilder, BaseAir, WindowAccess},
p3_field::{Field, PrimeCharacteristicRing},
Expand Down Expand Up @@ -103,7 +103,7 @@ where
}

fn main() {
let config = GoldilocksKeccakConfig::new(
let config = GoldilocksBlake3Config::new(
CommitmentParameters {
log_blowup: 1,
cap_height: 0,
Expand Down
4 changes: 2 additions & 2 deletions examples/pcs_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use bincode::{config::standard, serde::encode_to_vec};
use multi_stark::config::StarkGenericConfig;
use multi_stark::types::{
Challenger, Commitment, CommitmentParameters, Domain, ExtVal, FriParameters,
GoldilocksKeccakConfig, Pcs, PcsProof, ProverData, Val,
GoldilocksBlake3Config, Pcs, PcsProof, ProverData, Val,
};
use p3_challenger::{CanObserve, FieldChallenger};
use p3_commit::{OpenedValues, Pcs as PcsTrait};
Expand All @@ -42,7 +42,7 @@ fn main() {
query_proof_of_work_bits: 0,
};

let config = GoldilocksKeccakConfig::new(commitment_params, fri_params);
let config = GoldilocksBlake3Config::new(commitment_params, fri_params);
let pcs = config.pcs();

// ── Build polynomial evaluations ─────────────────────────────────────────
Expand Down
4 changes: 2 additions & 2 deletions examples/preprocessed_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use multi_stark::builder::symbolic::{SymbolicExpression, preprocessed_var, var};
use multi_stark::lookup::{Lookup, LookupAir};
use multi_stark::system::{System, SystemWitness};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksKeccakConfig, Val};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksBlake3Config, Val};
use multi_stark::{
p3_air::{Air, AirBuilder, BaseAir, WindowAccess},
p3_field::{Field, PrimeCharacteristicRing},
Expand Down Expand Up @@ -87,7 +87,7 @@ impl SquaresCS {
}

fn main() {
let config = GoldilocksKeccakConfig::new(
let config = GoldilocksBlake3Config::new(
CommitmentParameters {
log_blowup: 1,
cap_height: 0,
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

use multi_stark::lookup::LookupAir;
use multi_stark::system::{System, SystemWitness};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksKeccakConfig, Val};
use multi_stark::types::{CommitmentParameters, FriParameters, GoldilocksBlake3Config, Val};
use multi_stark::{
p3_air::{Air, AirBuilder, BaseAir, WindowAccess},
p3_field::PrimeCharacteristicRing,
Expand Down Expand Up @@ -44,7 +44,7 @@ where
}

fn main() {
let config = GoldilocksKeccakConfig::new(
let config = GoldilocksBlake3Config::new(
CommitmentParameters {
log_blowup: 1,
cap_height: 0,
Expand Down
Loading