From b209fadb740dc98378d9b984ff31c7d32d9a87be Mon Sep 17 00:00:00 2001 From: spypsy Date: Tue, 16 Jul 2024 16:48:24 +0100 Subject: [PATCH] fix: missing NoteSelector from JSON RPC proxies (#7493) --- .../aztec-node/src/aztec-node/http_rpc_server.ts | 6 ++++-- yarn-project/aztec.js/src/rpc_clients/pxe_client.ts | 9 ++++++++- .../src/aztec_node/rpc/aztec_node_client.ts | 7 ++++--- yarn-project/pxe/src/pxe_http/pxe_http_server.ts | 9 ++++++++- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts b/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts index 59359f837f9..ea7489409bc 100644 --- a/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts +++ b/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts @@ -15,6 +15,7 @@ import { UnencryptedL2BlockL2Logs, } from '@aztec/circuit-types'; import { FunctionSelector, Header } from '@aztec/circuits.js'; +import { NoteSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; @@ -43,12 +44,13 @@ export function createAztecNodeRpcServer(node: AztecNode) { SiblingPath, }, { + EncryptedNoteL2BlockL2Logs, + NoteSelector, + NullifierMembershipWitness, PublicSimulationOutput, Tx, TxReceipt, - EncryptedNoteL2BlockL2Logs, UnencryptedL2BlockL2Logs, - NullifierMembershipWitness, }, // disable methods not part of the AztecNode interface ['start', 'stop'], diff --git a/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts b/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts index 2b6871e885e..7c76f38a7f3 100644 --- a/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts +++ b/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts @@ -54,9 +54,16 @@ export const createPXEClient = (url: string, fetch = makeFetch([1, 2, 3], false) Point, TxExecutionRequest, TxHash, + }, + { + EncryptedNoteL2BlockL2Logs, NoteSelector, + NullifierMembershipWitness, + SimulatedTx, + Tx, + TxReceipt, + UnencryptedL2BlockL2Logs, }, - { Tx, SimulatedTx, TxReceipt, EncryptedNoteL2BlockL2Logs, UnencryptedL2BlockL2Logs, NullifierMembershipWitness }, false, 'pxe', fetch, diff --git a/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts b/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts index 7a8b95ae526..6bd10b74e74 100644 --- a/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts +++ b/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts @@ -1,5 +1,5 @@ import { FunctionSelector, Header } from '@aztec/circuits.js'; -import { EventSelector } from '@aztec/foundation/abi'; +import { EventSelector, NoteSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; @@ -44,12 +44,13 @@ export function createAztecNodeClient(url: string, fetch = defaultFetch): AztecN SiblingPath, }, { + EncryptedNoteL2BlockL2Logs, + NoteSelector, + NullifierMembershipWitness, PublicSimulationOutput, Tx, TxReceipt, - EncryptedNoteL2BlockL2Logs, UnencryptedL2BlockL2Logs, - NullifierMembershipWitness, }, false, 'node', diff --git a/yarn-project/pxe/src/pxe_http/pxe_http_server.ts b/yarn-project/pxe/src/pxe_http/pxe_http_server.ts index f429337c763..cde4b5da5a2 100644 --- a/yarn-project/pxe/src/pxe_http/pxe_http_server.ts +++ b/yarn-project/pxe/src/pxe_http/pxe_http_server.ts @@ -50,9 +50,16 @@ export function createPXERpcServer(pxeService: PXE): JsonRpcServer { L2Block, TxEffect, LogId, + }, + { + EncryptedNoteL2BlockL2Logs, NoteSelector, + NullifierMembershipWitness, + SimulatedTx, + Tx, + TxReceipt, + UnencryptedL2BlockL2Logs, }, - { SimulatedTx, Tx, TxReceipt, EncryptedNoteL2BlockL2Logs, UnencryptedL2BlockL2Logs, NullifierMembershipWitness }, ['start', 'stop'], ); }