diff --git a/yarn-project/noir-protocol-circuits/src/Nargo.toml b/yarn-project/noir-protocol-circuits/src/Nargo.toml index 40096bdb01a..79a55c635e0 100644 --- a/yarn-project/noir-protocol-circuits/src/Nargo.toml +++ b/yarn-project/noir-protocol-circuits/src/Nargo.toml @@ -16,5 +16,6 @@ members = [ "crates/rollup-lib", "crates/rollup-merge", "crates/rollup-base", + "crates/rollup-base-simulated", "crates/rollup-root", ] diff --git a/yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/Nargo.toml b/yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/Nargo.toml new file mode 100644 index 00000000000..cda6dfa73c5 --- /dev/null +++ b/yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/Nargo.toml @@ -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" } diff --git a/yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/src/main.nr b/yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/src/main.nr new file mode 100644 index 00000000000..67faaa8ec99 --- /dev/null +++ b/yarn-project/noir-protocol-circuits/src/crates/rollup-base-simulated/src/main.nr @@ -0,0 +1,5 @@ +use dep::rollup_lib::base::{BaseRollupInputs,BaseOrMergeRollupPublicInputs}; + +unconstrained fn main(inputs: BaseRollupInputs) -> pub BaseOrMergeRollupPublicInputs { + inputs.base_rollup_circuit() +} diff --git a/yarn-project/noir-protocol-circuits/src/crates/rollup-base/src/main.nr b/yarn-project/noir-protocol-circuits/src/crates/rollup-base/src/main.nr index 7405a961633..a7b7b5cdd10 100644 --- a/yarn-project/noir-protocol-circuits/src/crates/rollup-base/src/main.nr +++ b/yarn-project/noir-protocol-circuits/src/crates/rollup-base/src/main.nr @@ -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() -} \ No newline at end of file +} diff --git a/yarn-project/noir-protocol-circuits/src/index.ts b/yarn-project/noir-protocol-circuits/src/index.ts index 97671183a7c..89954211e99 100644 --- a/yarn-project/noir-protocol-circuits/src/index.ts +++ b/yarn-project/noir-protocol-circuits/src/index.ts @@ -26,7 +26,7 @@ import PublicKernelPrivatePreviousJson from './target/public_kernel_private_prev import PublicKernelPrivatePreviousSimulatedJson from './target/public_kernel_private_previous_simulated.json' assert { type: 'json' }; import PublicKernelPublicPreviousJson from './target/public_kernel_public_previous.json' assert { type: 'json' }; import PublicKernelPublicPreviousSimulatedJson from './target/public_kernel_public_previous_simulated.json' assert { type: 'json' }; -import BaseRollupJson from './target/rollup_base.json' assert { type: 'json' }; +import BaseRollupSimulatedJson from './target/rollup_base_simulated.json' assert { type: 'json' }; import MergeRollupJson from './target/rollup_merge.json' assert { type: 'json' }; import RootRollupJson from './target/rollup_root.json' assert { type: 'json' }; import { @@ -416,12 +416,12 @@ async function executeMergeRollupWithACVM(input: MergeRollupInputType): Promise< * Executes the base rollup with the given inputs using the acvm. */ async function executeBaseRollupWithACVM(input: BaseRollupInputType): Promise { - const initialWitnessMap = abiEncode(BaseRollupJson.abi as Abi, input as any); + const initialWitnessMap = abiEncode(BaseRollupSimulatedJson.abi as Abi, input as any); // Execute the circuit on those initial witness values // // Decode the bytecode from base64 since the acvm does not know about base64 encoding - const decodedBytecode = Buffer.from(BaseRollupJson.bytecode, 'base64'); + const decodedBytecode = Buffer.from(BaseRollupSimulatedJson.bytecode, 'base64'); // // Execute the circuit const _witnessMap = await executeCircuitWithBlackBoxSolver( @@ -434,7 +434,7 @@ async function executeBaseRollupWithACVM(input: BaseRollupInputType): Promise