From b7f0e6d93cb3fe9964aa972f594c768bd8924433 Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 24 May 2024 13:10:52 +0000 Subject: [PATCH] fix --- .../aztec-nr/aztec/src/context/private_context.nr | 4 ++-- noir-projects/aztec-nr/aztec/src/oracle/logs.nr | 8 ++++---- yarn-project/simulator/src/acvm/oracle/oracle.ts | 10 +++++----- yarn-project/simulator/src/acvm/oracle/typed_oracle.ts | 2 +- .../simulator/src/client/client_execution_context.ts | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) 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 d6c97f27eff..1e61400134e 100644 --- a/noir-projects/aztec-nr/aztec/src/context/private_context.nr +++ b/noir-projects/aztec-nr/aztec/src/context/private_context.nr @@ -316,9 +316,9 @@ impl PrivateContext { contract_address, storage_slot, note_type_id, + ovsk_app, ovpk_m, ivpk_m, - ovsk_app, preimage ); emit_encrypted_log(encrypted_log, counter); @@ -356,9 +356,9 @@ impl PrivateContext { contract_address, storage_slot, note_type_id, + ovsk_app, ovpk_m, ivpk_m, - ovsk_app, preimage ); emit_encrypted_note_log(note_hash, encrypted_log, counter); diff --git a/noir-projects/aztec-nr/aztec/src/oracle/logs.nr b/noir-projects/aztec-nr/aztec/src/oracle/logs.nr index 72886cb0d1c..3426a47ed01 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/logs.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/logs.nr @@ -25,9 +25,9 @@ fn compute_encrypted_log_oracle( _contract_address: AztecAddress, _storage_slot: Field, _note_type_id: Field, - _ivpk_m: GrumpkinPoint, - _ovpk_m: GrumpkinPoint, _ovsk_app: Field, + _ovpk_m: GrumpkinPoint, + _ivpk_m: GrumpkinPoint, _preimage: [Field; N] ) -> [u8; M] {} @@ -35,18 +35,18 @@ unconstrained pub fn compute_encrypted_log( contract_address: AztecAddress, storage_slot: Field, note_type_id: Field, + ovsk_app: Field, ovpk_m: GrumpkinPoint, ivpk_m: GrumpkinPoint, - ovsk_app: Field, preimage: [Field; N] ) -> [u8; M] { compute_encrypted_log_oracle( contract_address, storage_slot, note_type_id, + ovsk_app, ovpk_m, ivpk_m, - ovsk_app, preimage ) } diff --git a/yarn-project/simulator/src/acvm/oracle/oracle.ts b/yarn-project/simulator/src/acvm/oracle/oracle.ts index 8be27dfe536..39706581877 100644 --- a/yarn-project/simulator/src/acvm/oracle/oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/oracle.ts @@ -297,22 +297,22 @@ export class Oracle { [contractAddress]: ACVMField[], [storageSlot]: ACVMField[], [noteTypeId]: ACVMField[], - [ivpkMX]: ACVMField[], - [ivpkMY]: ACVMField[], + [ovskApp]: ACVMField[], [ovpkMX]: ACVMField[], [ovpkMY]: ACVMField[], - [ovskApp]: ACVMField[], + [ivpkMX]: ACVMField[], + [ivpkMY]: ACVMField[], preimage: ACVMField[], ): ACVMField[] { - const ivpkM = new Point(fromACVMField(ivpkMX), fromACVMField(ivpkMY)); const ovpkM = new Point(fromACVMField(ovpkMX), fromACVMField(ovpkMY)); const ovKeys = new KeyValidationRequest(ovpkM, Fr.fromString(ovskApp)); + const ivpkM = new Point(fromACVMField(ivpkMX), fromACVMField(ivpkMY)); const encLog = this.typedOracle.computeEncryptedLog( AztecAddress.fromString(contractAddress), Fr.fromString(storageSlot), Fr.fromString(noteTypeId), - ivpkM, ovKeys, + ivpkM, preimage.map(fromACVMField), ); const bytes: ACVMField[] = []; diff --git a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts index 58440cf97c1..5462262e806 100644 --- a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts @@ -188,8 +188,8 @@ export abstract class TypedOracle { _contractAddress: AztecAddress, _storageSlot: Fr, _noteTypeId: Fr, - _ivpkM: PublicKey, _ovKeys: KeyValidationRequest, + _ivpkM: PublicKey, _preimage: Fr[], ): Buffer { throw new OracleMethodNotAvailableError('computeEncryptedLog'); diff --git a/yarn-project/simulator/src/client/client_execution_context.ts b/yarn-project/simulator/src/client/client_execution_context.ts index 15f8488e5b1..83aa82d9dca 100644 --- a/yarn-project/simulator/src/client/client_execution_context.ts +++ b/yarn-project/simulator/src/client/client_execution_context.ts @@ -380,16 +380,16 @@ export class ClientExecutionContext extends ViewDataOracle { * @param contractAddress - The contract address of the note. * @param storageSlot - The storage slot the note is at. * @param noteTypeId - The type ID of the note. - * @param ivpkM - The master incoming viewing public key. * @param ovKeys - The outgoing viewing keys to use to encrypt. + * @param ivpkM - The master incoming viewing public key. * @param preimage - The note preimage. */ public override computeEncryptedLog( contractAddress: AztecAddress, storageSlot: Fr, noteTypeId: Fr, - ivpkM: Point, ovKeys: KeyValidationRequest, + ivpkM: Point, preimage: Fr[], ) { const note = new Note(preimage);