diff --git a/noir-projects/aztec-nr/aztec/src/oracle/keys.nr b/noir-projects/aztec-nr/aztec/src/oracle/keys.nr index f98b079a524d..6a4d9e30392a 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/keys.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/keys.nr @@ -2,9 +2,9 @@ use crate::keys::PublicKeys; use dep::protocol_types::{address::{AztecAddress, PartialAddress}, embedded_curve_point::EmbeddedCurvePoint}; #[oracle(getPublicKeysAndPartialAddress)] -unconstrained fn get_public_keys_and_partial_address_oracle(_address: AztecAddress) -> [Field; 9] {} +unconstrained fn get_public_keys_and_partial_address_oracle(_address: AztecAddress) -> [Field; 13] {} -unconstrained fn get_public_keys_and_partial_address_oracle_wrapper(address: AztecAddress) -> [Field; 9] { +unconstrained fn get_public_keys_and_partial_address_oracle_wrapper(address: AztecAddress) -> [Field; 13] { get_public_keys_and_partial_address_oracle(address) } @@ -12,13 +12,13 @@ fn get_public_keys_and_partial_address(address: AztecAddress) -> (PublicKeys, Pa let result = get_public_keys_and_partial_address_oracle_wrapper(address); let keys = PublicKeys { - npk_m: EmbeddedCurvePoint::new(result[0], result[1], false), - ivpk_m: EmbeddedCurvePoint::new(result[2], result[3], false), - ovpk_m: EmbeddedCurvePoint::new(result[4], result[5], false), - tpk_m: EmbeddedCurvePoint::new(result[6], result[7], false) + npk_m: EmbeddedCurvePoint::new(result[0], result[1], result[2] as bool), + ivpk_m: EmbeddedCurvePoint::new(result[3], result[4], result[5] as bool), + ovpk_m: EmbeddedCurvePoint::new(result[6], result[7], result[8] as bool), + tpk_m: EmbeddedCurvePoint::new(result[9], result[10], result[11] as bool) }; - let partial_address = PartialAddress::from_field(result[8]); + let partial_address = PartialAddress::from_field(result[12]); (keys, partial_address) } diff --git a/yarn-project/circuits.js/src/types/public_keys.test.ts b/yarn-project/circuits.js/src/types/public_keys.test.ts index b07c840a5841..73d6003c11b0 100644 --- a/yarn-project/circuits.js/src/types/public_keys.test.ts +++ b/yarn-project/circuits.js/src/types/public_keys.test.ts @@ -24,7 +24,7 @@ describe('PublicKeys', () => { const hash = keys.hash().toString(); expect(hash).toMatchInlineSnapshot(`"0x0000000000000000000000000000000000000000000000000000000000000000"`); - + // Run with AZTEC_GENERATE_TEST_DATA=1 to update noir test data updateInlineTestData('noir-projects/aztec-nr/aztec/src/keys/public_keys.nr', 'test_data_empty_hash', hash); }); diff --git a/yarn-project/txe/src/txe_service/txe_service.ts b/yarn-project/txe/src/txe_service/txe_service.ts index cbc3381d8215..f23c07d05a2c 100644 --- a/yarn-project/txe/src/txe_service/txe_service.ts +++ b/yarn-project/txe/src/txe_service/txe_service.ts @@ -574,13 +574,15 @@ export class TXEService { ovskApp: ForeignCallSingle, ovpkMX: ForeignCallSingle, ovpkMY: ForeignCallSingle, + ovpkMIsInfinite: ForeignCallSingle, ivpkMX: ForeignCallSingle, ivpkMY: ForeignCallSingle, + ivpkMIsInfinite: ForeignCallSingle, preimage: ForeignCallArray, ) { - const ovpkM = new Point(fromSingle(ovpkMX), fromSingle(ovpkMY)); + const ovpkM = new Point(fromSingle(ovpkMX), fromSingle(ovpkMY), !fromSingle(ovpkMIsInfinite).isZero()); const ovKeys = new KeyValidationRequest(ovpkM, Fr.fromString(fromSingle(ovskApp).toString())); - const ivpkM = new Point(fromSingle(ivpkMX), fromSingle(ivpkMY)); + const ivpkM = new Point(fromSingle(ivpkMX), fromSingle(ivpkMY), !fromSingle(ivpkMIsInfinite).isZero()); const encLog = this.typedOracle.computeEncryptedNoteLog( AztecAddress.fromString(fromSingle(contractAddress).toString()), Fr.fromString(fromSingle(storageSlot).toString()), @@ -599,7 +601,7 @@ export class TXEService { emitEncryptedLog( _contractAddress: ForeignCallSingle, - _randomandomness: ForeignCallSingle, + _randomness: ForeignCallSingle, _encryptedLog: ForeignCallSingle, _counter: ForeignCallSingle, ) {