Skip to content

Commit

Permalink
stale naming fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 23, 2023
1 parent 3807bba commit 470302f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions yarn-project/acir-simulator/src/acvm/oracle/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export abstract class TypedOracle {
throw new Error('Not available.');
}

getPublicKey(_address: AztecAddress): Promise<CompleteAddress> {
getCompleteAddress(_address: AztecAddress): Promise<CompleteAddress> {
throw new Error('Not available.');
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/acir-simulator/src/client/view_data_oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CompleteAddress> {
public getCompleteAddress(address: AztecAddress): Promise<CompleteAddress> {
return this.db.getCompleteAddress(address);
}

Expand Down
10 changes: 5 additions & 5 deletions yarn-project/aztec-nr/aztec/src/oracle/get_public_key.nr
Original file line number Diff line number Diff line change
@@ -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];
Expand Down

0 comments on commit 470302f

Please sign in to comment.