Skip to content

Commit

Permalink
chore: remove stubbed docs (#4196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jan 29, 2024
1 parent fb1d742 commit 25a4bc4
Show file tree
Hide file tree
Showing 39 changed files with 32 additions and 164 deletions.
25 changes: 12 additions & 13 deletions yarn-project/acir-simulator/src/avm/avm_execution_environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,30 @@ import { Fr } from '@aztec/foundation/fields';
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/3992): gas not implemented
export class AvmExecutionEnvironment {
constructor(
/** - */
public readonly address: AztecAddress,
/** - */

public readonly storageAddress: AztecAddress,
/** - */

public readonly origin: AztecAddress,
/** - */

public readonly sender: AztecAddress,
/** - */

public readonly portal: EthAddress,
/** - */

public readonly feePerL1Gas: Fr,
/** - */

public readonly feePerL2Gas: Fr,
/** - */

public readonly feePerDaGas: Fr,
/** - */

public readonly contractCallDepth: Fr,
/** - */

public readonly globals: GlobalVariables,
/** - */

public readonly isStaticCall: boolean,
/** - */

public readonly isDelegateCall: boolean,
/** - */

public readonly calldata: Fr[],
) {}

Expand Down
5 changes: 1 addition & 4 deletions yarn-project/acir-simulator/src/avm/avm_machine_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export class AvmMachineState {

private returnData: Fr[];

/** - */
public readonly memory: TaggedMemory;

/**
Expand All @@ -24,9 +23,8 @@ export class AvmMachineState {
*/
public internalCallStack: number[];

/** - */
public pc: number;
/** - */

public callStack: number[];

/**
Expand Down Expand Up @@ -60,7 +58,6 @@ export class AvmMachineState {
Object.freeze(returnData);
}

/** - */
public getReturnData(): Fr[] {
return this.returnData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { Fr } from '@aztec/foundation/fields';
* AVM message call result.
*/
export class AvmMessageCallResult {
/** - */
public readonly reverted: boolean;
/** - */

public readonly revertReason: Error | undefined;
/** .- */
public readonly output: Fr[];
Expand Down
25 changes: 12 additions & 13 deletions yarn-project/acir-simulator/src/avm/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,30 @@ import { AvmExecutionEnvironment } from '../avm_execution_environment.js';
* An interface that allows to override the default values of the AvmExecutionEnvironment
*/
export interface AvmExecutionEnvironmentOverrides {
/** - */
address?: AztecAddress;
/** - */

storageAddress?: AztecAddress;
/** - */

origin?: AztecAddress;
/** - */

sender?: AztecAddress;
/** - */

portal?: EthAddress;
/** - */

feePerL1Gas?: Fr;
/** - */

feePerL2Gas?: Fr;
/** - */

feePerDaGas?: Fr;
/** - */

contractCallDepth?: Fr;
/** - */

globals?: GlobalVariables;
/** - */

isStaticCall?: boolean;
/** - */

isDelegateCall?: boolean;
/** - */

calldata?: Fr[];
}

Expand Down
5 changes: 2 additions & 3 deletions yarn-project/acir-simulator/src/avm/journal/host_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import { CommitmentsDB, PublicContractsDB, PublicStateDB } from '../../index.js'
* A wrapper around the node dbs
*/
export class HostStorage {
/** - */
public readonly publicStateDb: PublicStateDB;
/** - */

public readonly contractsDb: PublicContractsDB;
/** - */

public readonly commitmentsDb: CommitmentsDB;

constructor(publicStateDb: PublicStateDB, contractsDb: PublicContractsDB, commitmentsDb: CommitmentsDB) {
Expand Down
5 changes: 2 additions & 3 deletions yarn-project/acir-simulator/src/avm/journal/journal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { HostStorage } from './host_storage.js';
* Data held within the journal
*/
export type JournalData = {
/** - */
newCommitments: Fr[];
/** - */

newL1Messages: Fr[];
/** - */

newNullifiers: Fr[];
/** contract address -\> key -\> value */
storageWrites: Map<bigint, Map<bigint, Fr>>;
Expand Down
Empty file.
1 change: 0 additions & 1 deletion yarn-project/acir-simulator/src/avm/opcodes/arithmetic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export class Mul extends Instruction {
}
}

/** -*/
export class Div extends Instruction {
static type: string = 'DIV';
static numberOfOperands = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import { Opcode } from './opcodes.js';
//import { Eq, Lt, Lte } from './comparators.js';
import { SLoad, SStore } from './storage.js';

/** - */
type InstructionConstructor = new (...args: any[]) => Instruction;
/** - */

type InstructionConstructorAndMembers = InstructionConstructor & {
/** - */
numberOfOperands: number;
};

Expand Down
2 changes: 0 additions & 2 deletions yarn-project/acir-simulator/src/avm/opcodes/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { AvmInterpreterError } from '../interpreter/interpreter.js';
import { AvmJournal } from '../journal/journal.js';
import { Instruction } from './instruction.js';

/** - */
export class SStore extends Instruction {
static type: string = 'SSTORE';
static numberOfOperands = 2;
Expand All @@ -33,7 +32,6 @@ export class SStore extends Instruction {
}
}

/** - */
export class SLoad extends Instruction {
static type: string = 'SLOAD';
static numberOfOperands = 2;
Expand Down
34 changes: 1 addition & 33 deletions yarn-project/circuits.js/src/abis/abis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ export function computeCompleteAddress(
);
}

/**
*
*/
function computePartialAddress(contractAddrSalt: Fr, fnTreeRoot: Fr, constructorHash: Fr) {
return Fr.fromBuffer(
pedersenHash(
Expand Down Expand Up @@ -450,9 +447,6 @@ export function computeTxHash(txRequest: TxRequest): Fr {
);
}

/**
*
*/
function computeFunctionDataHash(functionData: FunctionData): Fr {
return Fr.fromBuffer(
pedersenHash(
Expand All @@ -467,9 +461,6 @@ function computeFunctionDataHash(functionData: FunctionData): Fr {
);
}

/**
*
*/
function computeTxContextHash(txContext: TxContext): Fr {
return Fr.fromBuffer(
pedersenHash(
Expand All @@ -486,9 +477,6 @@ function computeTxContextHash(txContext: TxContext): Fr {
);
}

/**
*
*/
function computeContractDeploymentDataHash(data: ContractDeploymentData): Fr {
return Fr.fromBuffer(
pedersenHash(
Expand All @@ -505,9 +493,6 @@ function computeContractDeploymentDataHash(data: ContractDeploymentData): Fr {
);
}

/**
*
*/
function computeCallContextHash(input: CallContext) {
return pedersenHash(
[
Expand All @@ -524,9 +509,6 @@ function computeCallContextHash(input: CallContext) {
);
}

/**
*
*/
function computePrivateInputsHash(input: PrivateCircuitPublicInputs) {
const toHash = [
computeCallContextHash(input.callContext),
Expand Down Expand Up @@ -589,42 +571,28 @@ export function computePrivateCallStackItemHash(callStackItem: PrivateCallStackI
);
}

/**
*
*/
function computeContractStorageUpdateRequestHash(input: ContractStorageUpdateRequest) {
return pedersenHash(
[input.storageSlot.toBuffer(), input.oldValue.toBuffer(), input.newValue.toBuffer()],
GeneratorIndex.PUBLIC_DATA_UPDATE_REQUEST,
);
}

/**
*
*/
function computeContractStorageReadsHash(input: ContractStorageRead) {
return pedersenHash([input.storageSlot.toBuffer(), input.currentValue.toBuffer()], GeneratorIndex.PUBLIC_DATA_READ);
}
/**
*
*/

export function computeCommitmentsHash(input: SideEffect) {
return pedersenHash([input.value.toBuffer(), input.counter.toBuffer()], GeneratorIndex.SIDE_EFFECT);
}

/**
*
*/
export function computeNullifierHash(input: SideEffectLinkedToNoteHash) {
return pedersenHash(
[input.value.toBuffer(), input.noteHash.toBuffer(), input.counter.toBuffer()],
GeneratorIndex.SIDE_EFFECT,
);
}

/**
*
*/
export function computePublicInputsHash(input: PublicCircuitPublicInputs) {
const toHash = [
computeCallContextHash(input.callContext),
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/add_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { DebugLogger, LogFn } from '@aztec/foundation/log';
import { createCompatibleClient } from '../client.js';
import { getContractArtifact } from '../utils.js';

/**
*
*/
export async function addContract(
rpcUrl: string,
contractArtifactPath: string,
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/add_note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import { DebugLogger } from '@aztec/foundation/log';
import { createCompatibleClient } from '../client.js';
import { parseFields } from '../parse_args.js';

/**
*
*/
export async function addNote(
address: AztecAddress,
contractAddress: AztecAddress,
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/block_number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { DebugLogger, LogFn } from '@aztec/foundation/log';

import { createCompatibleClient } from '../client.js';

/**
*
*/
export async function blockNumber(rpcUrl: string, debugLogger: DebugLogger, log: LogFn) {
const client = await createCompatibleClient(rpcUrl, debugLogger);
const num = await client.getBlockNumber();
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import { format } from 'util';
import { createCompatibleClient } from '../client.js';
import { getFunctionArtifact, getTxSender, prepTx } from '../utils.js';

/**
*
*/
export async function call(
functionName: string,
functionArgsIn: any[],
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/check_deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { DebugLogger, LogFn } from '@aztec/foundation/log';

import { createCompatibleClient } from '../client.js';

/**
*
*/
export async function checkDeploy(rpcUrl: string, contractAddress: AztecAddress, debugLogger: DebugLogger, log: LogFn) {
const client = await createCompatibleClient(rpcUrl, debugLogger);
const isDeployed = await isContractDeployed(client, contractAddress);
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/compute_selector.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { FunctionSelector } from '@aztec/foundation/abi';
import { LogFn } from '@aztec/foundation/log';

/**
*
*/
export function computeSelector(functionSignature: string, log: LogFn) {
const selector = FunctionSelector.fromSignature(functionSignature);
log(`${selector}`);
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/create_account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import { DebugLogger, LogFn } from '@aztec/foundation/log';

import { createCompatibleClient } from '../client.js';

/**
*
*/
export async function createAccount(
rpcUrl: string,
privateKey: Fq,
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import { encodeArgs } from '../encoding.js';
import { GITHUB_TAG_PREFIX } from '../github.js';
import { getContractArtifact, getFunctionArtifact } from '../utils.js';

/**
*
*/
export async function deploy(
artifactPath: string,
json: boolean,
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/deploy_l1_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { DebugLogger, LogFn } from '@aztec/foundation/log';

import { deployAztecContracts } from '../utils.js';

/**
*
*/
export async function deployL1Contracts(
rpcUrl: string,
apiKey: string,
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/cli/src/cmds/example_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { LogFn } from '@aztec/foundation/log';

import { getExampleContractArtifacts } from '../utils.js';

/**
*
*/
export async function exampleContracts(log: LogFn) {
const abisList = await getExampleContractArtifacts();
const names = Object.keys(abisList);
Expand Down

0 comments on commit 25a4bc4

Please sign in to comment.