Skip to content

Commit

Permalink
chore: remove unused functions from public side effect trace
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanks12 committed Jan 30, 2025
1 parent f46897c commit 46efc89
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
38 changes: 0 additions & 38 deletions yarn-project/simulator/src/public/side_effect_trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,29 +512,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 +562,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[];
}

0 comments on commit 46efc89

Please sign in to comment.