From 3a1d376f79923add000c10b194c51386b0a09914 Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 30 Oct 2023 14:08:32 +0000 Subject: [PATCH] naming fix --- yarn-project/aztec-node/src/aztec-node/server.ts | 6 ++---- yarn-project/pxe/src/kernel_oracle/index.ts | 2 +- yarn-project/pxe/src/simulator_oracle/index.ts | 2 +- yarn-project/types/src/interfaces/state_provider.ts | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index d9fa9c0afd7..841228c39b9 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -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> { + public async getNoteHashSiblingPath(leafIndex: bigint): Promise> { const committedDb = await this.#getWorldState(); return committedDb.getSiblingPath(MerkleTreeId.NOTE_HASH_TREE, leafIndex); } @@ -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> { + public async getL1ToL2MessagesSiblingPath(leafIndex: bigint): Promise> { const committedDb = await this.#getWorldState(); return committedDb.getSiblingPath(MerkleTreeId.L1_TO_L2_MESSAGES_TREE, leafIndex); } diff --git a/yarn-project/pxe/src/kernel_oracle/index.ts b/yarn-project/pxe/src/kernel_oracle/index.ts index 13800298896..de5794a3712 100644 --- a/yarn-project/pxe/src/kernel_oracle/index.ts +++ b/yarn-project/pxe/src/kernel_oracle/index.ts @@ -24,7 +24,7 @@ export class KernelOracle implements ProvingDataOracle { } async getNoteMembershipWitness(leafIndex: bigint): Promise> { - const path = await this.node.getNoteHashTreeSiblingPath(leafIndex); + const path = await this.node.getNoteHashSiblingPath(leafIndex); return new MembershipWitness( path.pathSize, leafIndex, diff --git a/yarn-project/pxe/src/simulator_oracle/index.ts b/yarn-project/pxe/src/simulator_oracle/index.ts index b23ca4da1b7..06cf0fce982 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -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(), diff --git a/yarn-project/types/src/interfaces/state_provider.ts b/yarn-project/types/src/interfaces/state_provider.ts index fde16d6b8c1..0b317dfaf18 100644 --- a/yarn-project/types/src/interfaces/state_provider.ts +++ b/yarn-project/types/src/interfaces/state_provider.ts @@ -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>; + getNoteHashSiblingPath(leafIndex: bigint): Promise>; /** * Gets a confirmed/consumed L1 to L2 message for the given message key (throws if not found). @@ -43,5 +43,5 @@ export interface StateInfoProvider { * @param leafIndex - Index of the leaf in the tree. * @returns The sibling path. */ - getL1ToL2MessagesTreeSiblingPath(leafIndex: bigint): Promise>; + getL1ToL2MessagesSiblingPath(leafIndex: bigint): Promise>; }