From 9af7719e9a130092d716321d41d131c07c525197 Mon Sep 17 00:00:00 2001 From: IlyasRidhuan Date: Sun, 7 Apr 2024 09:58:35 +0000 Subject: [PATCH] chore(avm): update comments --- yarn-project/simulator/src/public/avm_executor.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yarn-project/simulator/src/public/avm_executor.test.ts b/yarn-project/simulator/src/public/avm_executor.test.ts index fc1f95e74853..f9d79c15ccb6 100644 --- a/yarn-project/simulator/src/public/avm_executor.test.ts +++ b/yarn-project/simulator/src/public/avm_executor.test.ts @@ -43,8 +43,10 @@ describe('AVM WitGen and Proof Generation', () => { const functionData = FunctionData.fromAbi(addArtifact); const args: Fr[] = [new Fr(99), new Fr(12)]; + // We call initContext here to load up a AvmExecutionEnvironment that prepends the calldata with the function selector + // and the args hash. In reality, we should simulate here and get this from the output of the simulation call. + // For now, the interfaces for the PublicExecutor don't quite line up, so we are doing this. const context = initContext({ env: initExecutionEnvironment({ calldata: args }) }); - const execution: PublicExecution = { contractAddress, functionData, args: context.environment.calldata, callContext }; const executor = new PublicExecutor(publicState, publicContracts, commitmentsDb, header); const [proof, vk] = await executor.getAvmProof(execution);