Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 1 addition & 42 deletions yarn-project/simulator/src/public/side_effect_trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type AztecAddress,
type ContractClassIdPreimage,
EthAddress,
Gas,
type Gas,
type GasSettings,
type GlobalVariables,
L1_TO_L2_MSG_TREE_HEIGHT,
Expand Down Expand Up @@ -53,9 +53,6 @@ import { createLogger } from '@aztec/foundation/log';

import { strict as assert } from 'assert';

import { type AvmFinalizedCallResult } from '../avm/avm_contract_call_result.js';
import { type AvmExecutionEnvironment } from '../avm/avm_execution_environment.js';
import { type EnqueuedPublicCallExecutionResultWithSideEffects, type PublicFunctionCallResult } from './execution.js';
import { SideEffectLimitReachedError } from './side_effect_errors.js';
import { type PublicSideEffectTraceInterface } from './side_effect_trace_interface.js';
import { UniqueClassIds } from './unique_class_ids.js';
Expand Down Expand Up @@ -512,29 +509,6 @@ export class SideEffectTrace implements PublicSideEffectTraceInterface {
};
}

/**
* Get the results of public execution.
*/
public toPublicEnqueuedCallExecutionResult(
/** The call's results */
avmCallResults: AvmFinalizedCallResult,
): EnqueuedPublicCallExecutionResultWithSideEffects {
return {
endGasLeft: Gas.from(avmCallResults.gasLeft),
endSideEffectCounter: new Fr(this.sideEffectCounter),
returnValues: avmCallResults.output,
reverted: avmCallResults.reverted,
revertReason: avmCallResults.revertReason,
sideEffects: {
publicDataWrites: this.publicDataWrites,
noteHashes: this.noteHashes,
nullifiers: this.nullifiers,
l2ToL1Messages: this.l2ToL1Messages,
publicLogs: this.publicLogs,
},
};
}

public toAvmCircuitPublicInputs(
/** Globals. */
globalVariables: GlobalVariables,
Expand Down Expand Up @@ -585,21 +559,6 @@ export class SideEffectTrace implements PublicSideEffectTraceInterface {
);
}

public toPublicFunctionCallResult(
/** The execution environment of the nested call. */
_avmEnvironment: AvmExecutionEnvironment,
/** How much gas was available for this public execution. */
_startGasLeft: Gas,
/** Bytecode used for this execution. */
_bytecode: Buffer,
/** The call's results */
_avmCallResults: AvmFinalizedCallResult,
/** Function name for logging */
_functionName: string = 'unknown',
): PublicFunctionCallResult {
throw new Error('Not implemented');
}

public getPublicLogs() {
return this.publicLogs;
}
Expand Down
21 changes: 0 additions & 21 deletions yarn-project/simulator/src/public/side_effect_trace_interface.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
type ContractClassIdPreimage,
type Gas,
type NullifierLeafPreimage,
type PublicCallRequest,
type PublicDataTreeLeafPreimage,
Expand All @@ -10,10 +9,6 @@ import {
import { type AztecAddress } from '@aztec/foundation/aztec-address';
import { type Fr } from '@aztec/foundation/fields';

import { type AvmFinalizedCallResult } from '../avm/avm_contract_call_result.js';
import { type AvmExecutionEnvironment } from '../avm/avm_execution_environment.js';
import { type EnqueuedPublicCallExecutionResultWithSideEffects, type PublicFunctionCallResult } from './execution.js';

export interface PublicSideEffectTraceInterface {
fork(): PublicSideEffectTraceInterface;
merge(nestedTrace: PublicSideEffectTraceInterface, reverted?: boolean): void;
Expand Down Expand Up @@ -90,21 +85,5 @@ export interface PublicSideEffectTraceInterface {
/** Did the call revert? */
reverted: boolean,
): void;
toPublicEnqueuedCallExecutionResult(
/** The call's results */
avmCallResults: AvmFinalizedCallResult,
): EnqueuedPublicCallExecutionResultWithSideEffects;
toPublicFunctionCallResult(
/** The execution environment of the nested call. */
avmEnvironment: AvmExecutionEnvironment,
/** How much gas was available for this public execution. */
startGasLeft: Gas,
/** Bytecode used for this execution. */
bytecode: Buffer,
/** The call's results */
avmCallResults: AvmFinalizedCallResult,
/** Function name for logging */
functionName: string,
): PublicFunctionCallResult;
getPublicLogs(): PublicLog[];
}