From 470302f6a61405008dda6cbd2b2ecc744e8bc6a8 Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 23 Oct 2023 10:35:29 +0000 Subject: [PATCH] stale naming fix --- yarn-project/acir-simulator/src/acvm/oracle/oracle.ts | 4 ++-- .../acir-simulator/src/acvm/oracle/typed_oracle.ts | 2 +- .../acir-simulator/src/client/view_data_oracle.ts | 2 +- .../aztec-nr/aztec/src/oracle/get_public_key.nr | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts b/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts index c7589b81674..4e242ecc543 100644 --- a/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts +++ b/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts @@ -39,8 +39,8 @@ export class Oracle { return [toACVMField(secretKey.low), toACVMField(secretKey.high)]; } - async getPublicKey([address]: ACVMField[]) { - const { publicKey, partialAddress } = await this.typedOracle.getPublicKey( + async getPublicKeyAndPartialAddress([address]: ACVMField[]) { + const { publicKey, partialAddress } = await this.typedOracle.getCompleteAddress( AztecAddress.fromField(fromACVMField(address)), ); return [publicKey.x, publicKey.y, partialAddress].map(toACVMField); diff --git a/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts index 2b32aeaa51b..a07f03e6ef2 100644 --- a/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts @@ -72,7 +72,7 @@ export abstract class TypedOracle { throw new Error('Not available.'); } - getPublicKey(_address: AztecAddress): Promise { + getCompleteAddress(_address: AztecAddress): Promise { throw new Error('Not available.'); } diff --git a/yarn-project/acir-simulator/src/client/view_data_oracle.ts b/yarn-project/acir-simulator/src/client/view_data_oracle.ts index 4eb694b0b82..55e1aff0206 100644 --- a/yarn-project/acir-simulator/src/client/view_data_oracle.ts +++ b/yarn-project/acir-simulator/src/client/view_data_oracle.ts @@ -40,7 +40,7 @@ export class ViewDataOracle extends TypedOracle { * @param address - Address to fetch the complete address for. * @returns A complete address associated with the input address. */ - public getPublicKey(address: AztecAddress): Promise { + public getCompleteAddress(address: AztecAddress): Promise { return this.db.getCompleteAddress(address); } diff --git a/yarn-project/aztec-nr/aztec/src/oracle/get_public_key.nr b/yarn-project/aztec-nr/aztec/src/oracle/get_public_key.nr index f98d0dfb53e..5afaa258a21 100644 --- a/yarn-project/aztec-nr/aztec/src/oracle/get_public_key.nr +++ b/yarn-project/aztec-nr/aztec/src/oracle/get_public_key.nr @@ -1,15 +1,15 @@ use crate::types::point::Point; use crate::address::compute_address; -#[oracle(getPublicKey)] -fn get_public_key_oracle(_address: Field) -> [Field; 3] {} +#[oracle(getPublicKeyAndPartialAddress)] +fn get_public_key_and_partial_address_oracle(_address: Field) -> [Field; 3] {} -unconstrained fn get_public_key_internal(address: Field) -> [Field; 3] { - get_public_key_oracle(address) +unconstrained fn get_public_key_and_partial_address_internal(address: Field) -> [Field; 3] { + get_public_key_and_partial_address_oracle(address) } pub fn get_public_key(address: Field) -> Point { - let result = get_public_key_internal(address); + let result = get_public_key_and_partial_address_internal(address); let pub_key_x = result[0]; let pub_key_y = result[1]; let partial_address = result[2];