Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed May 24, 2024
1 parent 7a70379 commit b7f0e6d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions noir-projects/aztec-nr/aztec/src/context/private_context.nr
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions noir-projects/aztec-nr/aztec/src/oracle/logs.nr
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ fn compute_encrypted_log_oracle<N, M>(
_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] {}

unconstrained pub fn compute_encrypted_log<N, M>(
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
)
}
10 changes: 5 additions & 5 deletions yarn-project/simulator/src/acvm/oracle/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/src/acvm/oracle/typed_oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/simulator/src/client/client_execution_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b7f0e6d

Please sign in to comment.