Skip to content

Commit

Permalink
fix: remove mention of 'defaults'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Dec 1, 2023
1 parent ec2c441 commit ce79024
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions yarn-project/aztec-node/src/aztec-node/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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.
*/
Expand All @@ -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).
*/
Expand Down Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/pxe/src/contract_tree/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof CONTRACT_TREE_HEIGHT>(
CONTRACT_TREE_HEIGHT,
index,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/types/src/interfaces/state_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce79024

Please sign in to comment.