Skip to content

Commit

Permalink
fix: improve resiliency to recursion depth
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Sep 1, 2024
1 parent 58a6760 commit 3347156
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
23 changes: 23 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 @@ -105,6 +105,7 @@ serde_with = "3.9.0"
serial_test = "3.1.1"
sha2 = "0.10.8"
size = "0.4.1"
stacker = "0.1.0"
strum = "0.26.3"
strum_macros = "0.26.4"
syn = "1.0"
Expand Down
1 change: 1 addition & 0 deletions recursion/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ sphinx-primitives = { path = "../../primitives" }
sphinx-recursion-core = { path = "../core" }
sphinx-recursion-compiler = { path = "../compiler" }
sphinx-core = { path = "../../core" }
stacker = { workspace = true }
itertools = { workspace = true }
serde = { workspace = true, features = ["derive"] }
rand = { workspace = true }
Expand Down
24 changes: 13 additions & 11 deletions recursion/program/src/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,17 +334,19 @@ where
quotient_domain.split_domains_const(builder, log_quotient_degree);

// Verify the constraints.
Self::verify_constraints(
builder,
chip,
&values,
&proof.public_values,
&trace_domain,
&qc_domains,
zeta,
alpha,
&permutation_challenges,
);
stacker::maybe_grow(16 * 1024 * 1024, 16 * 1024 * 1024, || {
Self::verify_constraints(
builder,
chip,
&values,
&proof.public_values,
&trace_domain,
&qc_domains,
zeta,
alpha,
&permutation_challenges,
);
});

// Increment the number of shard chips that are enabled.
builder.assign(
Expand Down

0 comments on commit 3347156

Please sign in to comment.