Skip to content

Commit

Permalink
fix: minor stale naming fix (#3117)
Browse files Browse the repository at this point in the history
`getDataTreePath` --> `getNoteHashTreePath`
\+ run yarn format in yarn-project
  • Loading branch information
benesjan authored Oct 30, 2023
1 parent ccad50f commit a6786ae
Show file tree
Hide file tree
Showing 14 changed files with 5,559 additions and 150 deletions.
6 changes: 3 additions & 3 deletions yarn-project/aztec-node/src/aztec-node/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,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 getContractPath(leafIndex: bigint): Promise<SiblingPath<typeof CONTRACT_TREE_HEIGHT>> {
public async getContractSiblingPath(leafIndex: bigint): Promise<SiblingPath<typeof CONTRACT_TREE_HEIGHT>> {
const committedDb = await this.#getWorldState();
return committedDb.getSiblingPath(MerkleTreeId.CONTRACT_TREE, leafIndex);
}
Expand All @@ -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 getDataTreePath(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,7 +334,7 @@ export class AztecNodeService implements AztecNode {
* @param leafIndex - Index of the leaf in the tree.
* @returns The sibling path.
*/
public async getL1ToL2MessagesTreePath(leafIndex: bigint): Promise<SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>> {
public async getL1ToL2MessageSiblingPath(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
991 changes: 990 additions & 1 deletion yarn-project/noir-private-kernel/src/target/private_kernel_init.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,220 changes: 1,219 additions & 1 deletion yarn-project/noir-private-kernel/src/target/private_kernel_inner.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* eslint-disable */

export type FixedLengthArray<T, L extends number> = L extends 0 ? never[]: T[] & { length: L }
export type FixedLengthArray<T, L extends number> = L extends 0 ? never[] : T[] & { length: L };

export type Field = string;
export type u32 = string;
Expand All @@ -11,18 +11,15 @@ export interface Address {
inner: Field;
}


export interface Point {
x: Field;
y: Field;
}


export interface EthAddress {
inner: Field;
}


export interface ContractDeploymentData {
deployer_public_key: Point;
constructor_vk_hash: Field;
Expand All @@ -31,7 +28,6 @@ export interface ContractDeploymentData {
portal_contract_address: EthAddress;
}


export interface TxContext {
is_fee_payment_tx: boolean;
is_rebate_payment_tx: boolean;
Expand All @@ -41,33 +37,24 @@ export interface TxContext {
version: Field;
}


export interface FunctionSelector {
inner: u32;
}


export interface FunctionData {
selector: FunctionSelector;
is_internal: boolean;
is_private: boolean;
is_constructor: boolean;
}


export interface TxRequest {
origin: Address;
args_hash: Field;
tx_context: TxContext;
function_data: FunctionData;
}







export interface CallContext {
msg_sender: Address;
storage_contract_address: Address;
Expand All @@ -78,7 +65,6 @@ export interface CallContext {
is_contract_deployment: boolean;
}


export interface Block {
note_hash_tree_root: Field;
nullifier_tree_root: Field;
Expand All @@ -88,15 +74,12 @@ export interface Block {
global_variables_hash: Field;
}


export interface HistoricalBlockData {
blocks_tree_root: Field;
block: Block;
private_kernel_vk_tree_root: Field;
}



export interface PrivateCircuitPublicInputs {
call_context: CallContext;
args_hash: Field;
Expand All @@ -119,50 +102,38 @@ export interface PrivateCircuitPublicInputs {
version: Field;
}



export interface CallStackItem {
contract_address: Address;
public_inputs: PrivateCircuitPublicInputs;
is_execution_request: boolean;
function_data: FunctionData;
}


export interface PrivateCallStackItem {
inner: CallStackItem;
}

export interface Proof {}

export interface Proof {
}


export interface VerificationKey {
}

export interface VerificationKey {}

export interface FunctionLeafMembershipWitness {
leaf_index: Field;
sibling_path: FixedLengthArray<Field, 4>;
}


export interface ContractLeafMembershipWitness {
leaf_index: Field;
sibling_path: FixedLengthArray<Field, 16>;
}


export interface ReadRequestMembershipWitness {
leaf_index: Field;
sibling_path: FixedLengthArray<Field, 32>;
is_transient: boolean;
hint_to_commitment: Field;
}



export interface PrivateCallData {
call_stack_item: PrivateCallStackItem;
private_call_stack_preimages: FixedLengthArray<PrivateCallStackItem, 4>;
Expand All @@ -175,28 +146,19 @@ export interface PrivateCallData {
acir_hash: Field;
}


export interface PrivateKernelInputsInit {
tx_request: TxRequest;
private_call: PrivateCallData;
}


export interface AggregationObject {
}



export interface AggregationObject {}

export interface NewContractData {
contract_address: Address;
portal_contract_address: EthAddress;
function_tree_root: Field;
}




export interface OptionallyRevealedData {
call_stack_item_hash: Field;
function_data: FunctionData;
Expand All @@ -208,20 +170,17 @@ export interface OptionallyRevealedData {
called_from_public_l2: boolean;
}


export interface PublicDataUpdateRequest {
leaf_index: Field;
old_value: Field;
new_value: Field;
}


export interface PublicDataRead {
leaf_index: Field;
value: Field;
}


export interface CombinedAccumulatedData {
aggregation_object: AggregationObject;
read_requests: FixedLengthArray<Field, 128>;
Expand All @@ -242,15 +201,11 @@ export interface CombinedAccumulatedData {
public_data_reads: FixedLengthArray<PublicDataRead, 16>;
}




export interface CombinedConstantData {
block_data: HistoricalBlockData;
tx_context: TxContext;
}


export interface KernelCircuitPublicInputs {
end: CombinedAccumulatedData;
constants: CombinedConstantData;
Expand All @@ -261,4 +216,4 @@ export type ReturnType = KernelCircuitPublicInputs;

export interface InputType {
input: PrivateKernelInputsInit;
}
}
Loading

0 comments on commit a6786ae

Please sign in to comment.