diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index cee9bf1cf001..5f82698a5666 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -318,7 +318,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a sibling path for the given index in the contract tree. - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @param leafIndex - The index of the leaf for which the sibling path is required. * @returns The sibling path for the leaf index. */ @@ -332,7 +332,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a sibling path for the given index in the nullifier tree. - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @param leafIndex - The index of the leaf for which the sibling path is required. * @returns The sibling path for the leaf index. */ @@ -346,7 +346,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a sibling path for the given index in the data tree. - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @param leafIndex - The index of the leaf for which the sibling path is required. * @returns The sibling path for the leaf index. */ @@ -373,7 +373,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a sibling path for a leaf in the committed l1 to l2 data tree. - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @param leafIndex - Index of the leaf in the tree. * @returns The sibling path. */ @@ -387,7 +387,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a sibling path for a leaf in the committed blocks tree. - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @param leafIndex - Index of the leaf in the tree. * @returns The sibling path. */ @@ -401,7 +401,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a sibling path for a leaf in the committed public data tree. - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @param leafIndex - Index of the leaf in the tree. * @returns The sibling path. */ @@ -415,7 +415,7 @@ export class AztecNodeService implements AztecNode { /** * Returns a nullifier membership witness for a given nullifier at a given block. - * @param blockNumber - The block number at which to get the index. Defaults to latest block + * @param blockNumber - The block number at which to get the index. * @param nullifier - Nullifier we try to find witness for. * @returns The nullifier membership witness (if found). */ @@ -585,7 +585,7 @@ export class AztecNodeService implements AztecNode { /** * Returns an instance of MerkleTreeOperations having first ensured the world state is fully synched - * @param blockNumber - The block number at which to get the data. Defaults to latest block + * @param blockNumber - The block number at which to get the data. * @returns An instance of a committed MerkleTreeOperations */ async #getWorldState(blockNumber: number | 'latest' = 'latest') { diff --git a/yarn-project/pxe/src/contract_tree/index.ts b/yarn-project/pxe/src/contract_tree/index.ts index 6813d8759802..c265fad619a2 100644 --- a/yarn-project/pxe/src/contract_tree/index.ts +++ b/yarn-project/pxe/src/contract_tree/index.ts @@ -148,10 +148,10 @@ export class ContractTree { * * @returns A Promise that resolves to the MembershipWitness object for the given contract tree. */ - public async getContractMembershipWitness() { + public async getContractMembershipWitness(blockNumber: number | 'latest' = 'latest') { const index = await this.getContractIndex(); - const siblingPath = await this.stateInfoProvider.getContractSiblingPath('latest', index); + const siblingPath = await this.stateInfoProvider.getContractSiblingPath(blockNumber, index); return new MembershipWitness( CONTRACT_TREE_HEIGHT, index, diff --git a/yarn-project/types/src/interfaces/state_provider.ts b/yarn-project/types/src/interfaces/state_provider.ts index cc371adc3561..cec3f6fed557 100644 --- a/yarn-project/types/src/interfaces/state_provider.ts +++ b/yarn-project/types/src/interfaces/state_provider.ts @@ -123,7 +123,7 @@ export interface StateInfoProvider { /** * Returns a low nullifier membership witness for a given nullifier at a given block. - * @param blockNumber - The block number at which to get the data. Defaults to latest + * @param blockNumber - The block number at which to get the data. * @param nullifier - Nullifier we try to find the low nullifier witness for. * @returns The low nullifier membership witness (if found). * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked