Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarreiro committed Oct 3, 2024
1 parent e8da40e commit 768b5ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions noir-projects/aztec-nr/aztec/src/context/private_context.nr
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
12 changes: 8 additions & 4 deletions yarn-project/simulator/src/client/client_execution_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,10 @@ export class ClientExecutionContext extends ViewDataOracle {
isStaticCall: boolean,
isDelegateCall: boolean,
): Promise<Fr> {
// 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),
Expand Down Expand Up @@ -573,8 +575,10 @@ export class ClientExecutionContext extends ViewDataOracle {
isStaticCall: boolean,
isDelegateCall: boolean,
): Promise<Fr> {
// 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),
Expand Down

0 comments on commit 768b5ec

Please sign in to comment.