diff --git a/yarn-project/circuit-types/src/simulation_error.ts b/yarn-project/circuit-types/src/simulation_error.ts index 47ecfc1629f..b8d1b0be4bf 100644 --- a/yarn-project/circuit-types/src/simulation_error.ts +++ b/yarn-project/circuit-types/src/simulation_error.ts @@ -160,7 +160,7 @@ export class SimulationError extends Error { this.functionErrorStack.forEach(failingFunction => { if ( failingFunction.contractAddress.equals(contractAddress) && - failingFunction.functionSelector != null && + !!failingFunction.functionSelector && failingFunction.functionSelector.equals(functionSelector) ) { failingFunction.functionName = functionName; @@ -176,7 +176,7 @@ export class SimulationError extends Error { const stackLines: string[] = [ ...functionCallStack.map(failingFunction => { return `at ${failingFunction.contractName ?? failingFunction.contractAddress.toString()}.${ - failingFunction.functionName ?? failingFunction.functionSelector?.toString() ?? '' + failingFunction.functionName ?? failingFunction.functionSelector?.toString() ?? 'unknown' }`; }), ...noirCallStack.map(errorLocation => diff --git a/yarn-project/simulator/src/avm/avm_context.ts b/yarn-project/simulator/src/avm/avm_context.ts index b1443579810..2fa4dde5132 100644 --- a/yarn-project/simulator/src/avm/avm_context.ts +++ b/yarn-project/simulator/src/avm/avm_context.ts @@ -16,7 +16,6 @@ export class AvmContext { * @param persistableState - Manages world state and accrued substate during execution - (caching, fetching, tracing) * @param environment - Contains constant variables provided by the kernel * @param machineState - VM state that is modified on an instruction-by-instruction basis - * @param fnName - The function name which initiated this context. * @returns new AvmContext instance */ constructor( diff --git a/yarn-project/simulator/src/avm/avm_simulator.ts b/yarn-project/simulator/src/avm/avm_simulator.ts index 3db9e3ad0a3..2f998dae352 100644 --- a/yarn-project/simulator/src/avm/avm_simulator.ts +++ b/yarn-project/simulator/src/avm/avm_simulator.ts @@ -50,7 +50,7 @@ export class AvmSimulator { context.machineState.gasLeft.l2Gas <= MAX_L2_GAS_PER_ENQUEUED_CALL, `Cannot allocate more than ${MAX_L2_GAS_PER_ENQUEUED_CALL} to the AVM for execution of an enqueued call`, ); - this.log = createLogger(`aztec:avm_simulator:core(calldata[0]: ${context.environment.calldata[0]})`); + this.log = createLogger(`simulator:avm(calldata[0]: ${context.environment.calldata[0]})`); // TODO(palla/log): Should tallies be printed on debug, or only on trace? if (this.log.isLevelEnabled('debug')) { this.tallyPrintFunction = this.printOpcodeTallies; @@ -63,7 +63,7 @@ export class AvmSimulator { public static async build(context: AvmContext): Promise { const simulator = new AvmSimulator(context); const fnName = await context.persistableState.getPublicFunctionDebugName(context.environment); - simulator.log = createLogger(`aztec:avm_simulator:core(f:${fnName})`); + simulator.log = createLogger(`simulator:avm(f:${fnName})`); return simulator; }