diff --git a/yarn-project/pxe/src/contract_function_simulator/proxied_node.ts b/yarn-project/pxe/src/contract_function_simulator/benchmarked_node.ts similarity index 94% rename from yarn-project/pxe/src/contract_function_simulator/proxied_node.ts rename to yarn-project/pxe/src/contract_function_simulator/benchmarked_node.ts index 039bad515e08..7d0582b26704 100644 --- a/yarn-project/pxe/src/contract_function_simulator/proxied_node.ts +++ b/yarn-project/pxe/src/contract_function_simulator/benchmarked_node.ts @@ -17,10 +17,10 @@ import type { NodeStats, RoundTripStats } from '@aztec/stdlib/tx'; * value in `safe_json_rpc_client.ts` to 1 (the main motivation for batching was to get around parallel http requests * limits in web browsers which is not a problem when debugging in node.js). */ -export type ProxiedNode = AztecNode & { getStats(): NodeStats }; +export type BenchmarkedNode = AztecNode & { getStats(): NodeStats }; -export class ProxiedNodeFactory { - static create(node: AztecNode): ProxiedNode { +export class BenchmarkedNodeFactory { + static create(node: AztecNode): BenchmarkedNode { // Per-method call stats const perMethod: Partial> = {}; @@ -36,7 +36,7 @@ export class ProxiedNodeFactory { }; return new Proxy(node, { - get(target, prop: keyof ProxiedNode) { + get(target, prop: keyof BenchmarkedNode) { if (prop === 'getStats') { return (): NodeStats => { return { perMethod, roundTrips }; @@ -98,6 +98,6 @@ export class ProxiedNodeFactory { }; } }, - }) as ProxiedNode; + }) as BenchmarkedNode; } } diff --git a/yarn-project/pxe/src/contract_function_simulator/contract_function_simulator.ts b/yarn-project/pxe/src/contract_function_simulator/contract_function_simulator.ts index dc1374d17a2c..e0895a78fe10 100644 --- a/yarn-project/pxe/src/contract_function_simulator/contract_function_simulator.ts +++ b/yarn-project/pxe/src/contract_function_simulator/contract_function_simulator.ts @@ -80,6 +80,7 @@ import type { PrivateEventStore } from '../storage/private_event_store/private_e import type { RecipientTaggingStore } from '../storage/tagging_store/recipient_tagging_store.js'; import type { SenderAddressBookStore } from '../storage/tagging_store/sender_address_book_store.js'; import type { SenderTaggingStore } from '../storage/tagging_store/sender_tagging_store.js'; +import type { BenchmarkedNode } from './benchmarked_node.js'; import { ExecutionNoteCache } from './execution_note_cache.js'; import { ExecutionTaggingIndexCache } from './execution_tagging_index_cache.js'; import { HashedValuesCache } from './hashed_values_cache.js'; @@ -87,7 +88,6 @@ import { Oracle } from './oracle/oracle.js'; import { executePrivateFunction, verifyCurrentClassId } from './oracle/private_execution.js'; import { PrivateExecutionOracle } from './oracle/private_execution_oracle.js'; import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js'; -import type { ProxiedNode } from './proxied_node.js'; /** * The contract function simulator. @@ -332,8 +332,8 @@ export class ContractFunctionSimulator { */ getStats() { const nodeRPCCalls = - typeof (this.aztecNode as ProxiedNode).getStats === 'function' - ? (this.aztecNode as ProxiedNode).getStats() + typeof (this.aztecNode as BenchmarkedNode).getStats === 'function' + ? (this.aztecNode as BenchmarkedNode).getStats() : { perMethod: {}, roundTrips: { roundTrips: 0, totalBlockingTime: 0, roundTripDurations: [], roundTripMethods: [] }, diff --git a/yarn-project/pxe/src/private_kernel/hints/index.ts b/yarn-project/pxe/src/private_kernel/hints/index.ts index b0ceaa91b511..09746e5e26ab 100644 --- a/yarn-project/pxe/src/private_kernel/hints/index.ts +++ b/yarn-project/pxe/src/private_kernel/hints/index.ts @@ -1,2 +1,2 @@ -export * from './build_private_kernel_reset_private_inputs.js'; +export * from './private_kernel_reset_private_inputs_builder.js'; export * from './compute_tx_include_by_timestamp.js'; diff --git a/yarn-project/pxe/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts b/yarn-project/pxe/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts similarity index 100% rename from yarn-project/pxe/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts rename to yarn-project/pxe/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts diff --git a/yarn-project/pxe/src/private_kernel/private_kernel_execution_prover.ts b/yarn-project/pxe/src/private_kernel/private_kernel_execution_prover.ts index 6321c405ec00..5bf651e97ce9 100644 --- a/yarn-project/pxe/src/private_kernel/private_kernel_execution_prover.ts +++ b/yarn-project/pxe/src/private_kernel/private_kernel_execution_prover.ts @@ -33,7 +33,7 @@ import { } from '@aztec/stdlib/tx'; import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks'; -import { PrivateKernelResetPrivateInputsBuilder } from './hints/build_private_kernel_reset_private_inputs.js'; +import { PrivateKernelResetPrivateInputsBuilder } from './hints/private_kernel_reset_private_inputs_builder.js'; import type { PrivateKernelOracle } from './private_kernel_oracle.js'; const NULL_SIMULATE_OUTPUT: PrivateKernelSimulateOutput = { diff --git a/yarn-project/pxe/src/pxe.ts b/yarn-project/pxe/src/pxe.ts index d3ef194b8c17..aceedbd096ca 100644 --- a/yarn-project/pxe/src/pxe.ts +++ b/yarn-project/pxe/src/pxe.ts @@ -53,13 +53,13 @@ import { inspect } from 'util'; import { BlockSynchronizer } from './block_synchronizer/index.js'; import type { PXEConfig } from './config/index.js'; +import { BenchmarkedNodeFactory } from './contract_function_simulator/benchmarked_node.js'; import { ContractFunctionSimulator, generateSimulatedProvingResult, } from './contract_function_simulator/contract_function_simulator.js'; import { readCurrentClassId } from './contract_function_simulator/oracle/private_execution.js'; import { ProxiedContractStoreFactory } from './contract_function_simulator/proxied_contract_data_source.js'; -import { ProxiedNodeFactory } from './contract_function_simulator/proxied_node.js'; import { PXEDebugUtils } from './debug/pxe_debug_utils.js'; import { enrichPublicSimulationError, enrichSimulationError } from './error_enriching.js'; import { PrivateEventFilterValidator } from './events/private_event_filter_validator.js'; @@ -206,7 +206,7 @@ export class PXE { this.noteStore, this.keyStore, this.addressStore, - ProxiedNodeFactory.create(this.node), + BenchmarkedNodeFactory.create(this.node), this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore,