diff --git a/noir-projects/aztec-nr/aztec/src/context/private_context.nr b/noir-projects/aztec-nr/aztec/src/context/private_context.nr index 1be1e3da442..5374759a428 100644 --- a/noir-projects/aztec-nr/aztec/src/context/private_context.nr +++ b/noir-projects/aztec-nr/aztec/src/context/private_context.nr @@ -468,8 +468,10 @@ impl PrivateContext { let counter = self.next_counter(); let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call; - // TODO(): - // WARNING: + // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this. + // WARNING: This is insecure and should be temporary! + // The oracle repacks the arguments and returns a new args_hash. + // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function. let args_hash = enqueue_public_function_call_internal( contract_address, function_selector, @@ -516,8 +518,10 @@ impl PrivateContext { let counter = self.next_counter(); let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call; - // TODO(): - // WARNING: + // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this. + // WARNING: This is insecure and should be temporary! + // The oracle repacks the arguments and returns a new args_hash. + // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function. let args_hash = set_public_teardown_function_call_internal( contract_address, function_selector, diff --git a/yarn-project/simulator/src/client/client_execution_context.ts b/yarn-project/simulator/src/client/client_execution_context.ts index d97efbfeefc..0f814daaf90 100644 --- a/yarn-project/simulator/src/client/client_execution_context.ts +++ b/yarn-project/simulator/src/client/client_execution_context.ts @@ -536,8 +536,10 @@ export class ClientExecutionContext extends ViewDataOracle { isStaticCall: boolean, isDelegateCall: boolean, ): Promise { - // TODO(): - // WARNING: + // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this. + // WARNING: This is insecure and should be temporary! + // The oracle repacks the arguments and returns a new args_hash. + // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function. const newArgsHash = this.packedValuesCache.pack([ functionSelector.toField(), ...this.packedValuesCache.unpack(argsHash), @@ -573,8 +575,10 @@ export class ClientExecutionContext extends ViewDataOracle { isStaticCall: boolean, isDelegateCall: boolean, ): Promise { - // TODO(): - // WARNING: + // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this. + // WARNING: This is insecure and should be temporary! + // The oracle repacks the arguments and returns a new args_hash. + // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function. const newArgsHash = this.packedValuesCache.pack([ functionSelector.toField(), ...this.packedValuesCache.unpack(argsHash),