-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: compile base rollup as a circuit (#3739)
This PR adds a variant of the base rollup that is a circuit. This makes sure that PRs don't break compilation as a circuit of the base rollup and tracks its constraint count. After the last noir pull, thanks to @TomAFrench compilation is now much faster, allowing to compile the base rollup as a circuit in a reasonable time (prev. it took 5 minutes, now some seconds)
- Loading branch information
1 parent
143271c
commit 5118d44
Showing
5 changed files
with
21 additions
and
7 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
9 changes: 9 additions & 0 deletions
9
yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/Nargo.toml
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,9 @@ | ||
[package] | ||
name = "rollup_base_simulated" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.18.0" | ||
|
||
[dependencies] | ||
rollup_lib = { path = "../rollup-lib" } | ||
types = { path = "../types" } |
5 changes: 5 additions & 0 deletions
5
yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/src/main.nr
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,5 @@ | ||
use dep::rollup_lib::base::{BaseRollupInputs,BaseOrMergeRollupPublicInputs}; | ||
|
||
unconstrained fn main(inputs: BaseRollupInputs) -> pub BaseOrMergeRollupPublicInputs { | ||
inputs.base_rollup_circuit() | ||
} |
5 changes: 2 additions & 3 deletions
5
yarn-project/noir-protocol-circuits/src/crates/rollup-base/src/main.nr
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
use dep::rollup_lib::base::{BaseRollupInputs,BaseOrMergeRollupPublicInputs}; | ||
|
||
//TODO add a circuit variant | ||
unconstrained fn main(inputs : BaseRollupInputs) -> pub BaseOrMergeRollupPublicInputs { | ||
fn main(inputs: BaseRollupInputs) -> pub BaseOrMergeRollupPublicInputs { | ||
inputs.base_rollup_circuit() | ||
} | ||
} |
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