Skip to content

Commit

Permalink
naming fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 30, 2023
1 parent 8eed0fc commit 3a1d376
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions yarn-project/aztec-node/src/aztec-node/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export class AztecNodeService implements AztecNode {
* @param leafIndex - The index of the leaf for which the sibling path is required.
* @returns The sibling path for the leaf index.
*/
public async getNoteHashTreeSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>> {
public async getNoteHashSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>> {
const committedDb = await this.#getWorldState();
return committedDb.getSiblingPath(MerkleTreeId.NOTE_HASH_TREE, leafIndex);
}
Expand All @@ -334,9 +334,7 @@ export class AztecNodeService implements AztecNode {
* @param leafIndex - Index of the leaf in the tree.
* @returns The sibling path.
*/
public async getL1ToL2MessagesTreeSiblingPath(
leafIndex: bigint,
): Promise<SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>> {
public async getL1ToL2MessagesSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>> {
const committedDb = await this.#getWorldState();
return committedDb.getSiblingPath(MerkleTreeId.L1_TO_L2_MESSAGES_TREE, leafIndex);
}
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/kernel_oracle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class KernelOracle implements ProvingDataOracle {
}

async getNoteMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>> {
const path = await this.node.getNoteHashTreeSiblingPath(leafIndex);
const path = await this.node.getNoteHashSiblingPath(leafIndex);
return new MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>(
path.pathSize,
leafIndex,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/simulator_oracle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class SimulatorOracle implements DBOracle {
const messageAndIndex = await this.stateInfoProvider.getL1ToL2MessageAndIndex(msgKey);
const message = messageAndIndex.message.toFieldArray();
const index = messageAndIndex.index;
const siblingPath = await this.stateInfoProvider.getL1ToL2MessagesTreeSiblingPath(index);
const siblingPath = await this.stateInfoProvider.getL1ToL2MessagesSiblingPath(index);
return {
message,
siblingPath: siblingPath.toFieldArray(),
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/types/src/interfaces/state_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface StateInfoProvider {
* @param leafIndex - The index of the leaf for which the sibling path is required.
* @returns The sibling path for the leaf index.
*/
getNoteHashTreeSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
getNoteHashSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;

/**
* Gets a confirmed/consumed L1 to L2 message for the given message key (throws if not found).
Expand All @@ -43,5 +43,5 @@ export interface StateInfoProvider {
* @param leafIndex - Index of the leaf in the tree.
* @returns The sibling path.
*/
getL1ToL2MessagesTreeSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
getL1ToL2MessagesSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
}

0 comments on commit 3a1d376

Please sign in to comment.