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
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"@aztec/accounts": "link:../yarn-project/accounts",
"@aztec/aztec.js": "link:../yarn-project/aztec.js",
"@aztec/bb-prover": "link:../yarn-project/bb-prover",
"@aztec/stdlib": "link:../yarn-project/stdlib",
"@aztec/foundation": "link:../yarn-project/foundation",
"@aztec/key-store": "link:../yarn-project/key-store",
"@aztec/kv-store": "link:../yarn-project/kv-store",
"@aztec/pxe": "link:../yarn-project/pxe",
"@aztec/simulator": "link:../yarn-project/simulator",
"@aztec/stdlib": "link:../yarn-project/stdlib",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fontsource/roboto": "^5.1.1",
Expand Down
14 changes: 7 additions & 7 deletions playground/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ __metadata:
languageName: node
linkType: soft

"@aztec/stdlib@link:../yarn-project/stdlib::locator=playground%40workspace%3A.":
version: 0.0.0-use.local
resolution: "@aztec/stdlib@link:../yarn-project/stdlib::locator=playground%40workspace%3A."
languageName: node
linkType: soft

"@aztec/foundation@link:../yarn-project/foundation::locator=playground%40workspace%3A.":
version: 0.0.0-use.local
resolution: "@aztec/foundation@link:../yarn-project/foundation::locator=playground%40workspace%3A."
Expand Down Expand Up @@ -59,6 +53,12 @@ __metadata:
languageName: node
linkType: soft

"@aztec/stdlib@link:../yarn-project/stdlib::locator=playground%40workspace%3A.":
version: 0.0.0-use.local
resolution: "@aztec/stdlib@link:../yarn-project/stdlib::locator=playground%40workspace%3A."
languageName: node
linkType: soft

"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.2":
version: 7.26.2
resolution: "@babel/code-frame@npm:7.26.2"
Expand Down Expand Up @@ -3747,12 +3747,12 @@ __metadata:
"@aztec/accounts": "link:../yarn-project/accounts"
"@aztec/aztec.js": "link:../yarn-project/aztec.js"
"@aztec/bb-prover": "link:../yarn-project/bb-prover"
"@aztec/stdlib": "link:../yarn-project/stdlib"
"@aztec/foundation": "link:../yarn-project/foundation"
"@aztec/key-store": "link:../yarn-project/key-store"
"@aztec/kv-store": "link:../yarn-project/kv-store"
"@aztec/pxe": "link:../yarn-project/pxe"
"@aztec/simulator": "link:../yarn-project/simulator"
"@aztec/stdlib": "link:../yarn-project/stdlib"
"@emotion/react": "npm:^11.14.0"
"@emotion/styled": "npm:^11.14.0"
"@eslint/js": "npm:^9.18.0"
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/block/body.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { timesParallel } from '@aztec/foundation/collection';
import type { Fr } from '@aztec/foundation/fields';
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { ContractClass2BlockL2Logs } from '@aztec/stdlib/logs';
import type { ZodFor } from '@aztec/stdlib/schemas';

import { inspect } from 'util';
import { z } from 'zod';

import { ContractClass2BlockL2Logs } from '../logs/l2_block_l2_logs.js';
import type { ZodFor } from '../schemas/index.js';
import { TxEffect } from '../tx/tx_effect.js';

export class Body {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/stdlib/src/block/in_block.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Fr } from '@aztec/foundation/fields';
import { schemas } from '@aztec/stdlib/schemas';

import { type ZodTypeAny, z } from 'zod';

import { schemas } from '../schemas/index.js';
import type { L2Block } from './l2_block.js';

export type InBlock<T> = {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/block/l2_block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { sha256, sha256ToField } from '@aztec/foundation/crypto';
import { Fr } from '@aztec/foundation/fields';
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
import { BlockHeader } from '@aztec/stdlib/tx';

import { z } from 'zod';

import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
import { BlockHeader } from '../tx/block_header.js';
import { Body } from './body.js';
import { makeAppendOnlyTreeSnapshot, makeHeader } from './l2_block_code_to_purge.js';

Expand Down
20 changes: 9 additions & 11 deletions yarn-project/stdlib/src/block/l2_block_code_to_purge.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { toBufferBE } from '@aztec/foundation/bigint-buffer';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { AztecAddress } from '@aztec/stdlib/aztec-address';
import { GasFees } from '@aztec/stdlib/gas';
import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
import {
BlockHeader,
ContentCommitment,
GlobalVariables,
NUM_BYTES_PER_SHA256,
PartialStateReference,
StateReference,
} from '@aztec/stdlib/tx';

import { AztecAddress } from '../aztec-address/index.js';
import { GasFees } from '../gas/gas_fees.js';
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
import { BlockHeader } from '../tx/block_header.js';
import { ContentCommitment, NUM_BYTES_PER_SHA256 } from '../tx/content_commitment.js';
import { GlobalVariables } from '../tx/global_variables.js';
import { PartialStateReference } from '../tx/partial_state_reference.js';
import { StateReference } from '../tx/state_reference.js';

/**
* Makes header.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { compactArray } from '@aztec/foundation/collection';
import { Fr } from '@aztec/foundation/fields';
import type { BlockHeader } from '@aztec/stdlib/tx';

import { type MockProxy, mock } from 'jest-mock-extended';
import times from 'lodash.times';

import type { BlockHeader } from '../../tx/block_header.js';
import type { L2Block } from '../l2_block.js';
import type { L2BlockSource, L2Tips } from '../l2_block_source.js';
import {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/block/l2_block_number.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { schemas } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import { schemas } from '../schemas/index.js';

export const L2BlockNumberSchema = z.union([schemas.Integer, z.literal('latest')]);

/** Helper type for a specific L2 block number or the latest block number */
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/stdlib/src/block/l2_block_source.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { EthAddress } from '@aztec/foundation/eth-address';
import type { BlockHeader, TxReceipt } from '@aztec/stdlib/tx';

import { z } from 'zod';

import type { L1RollupConstants } from '../epoch-helpers/index.js';
import type { BlockHeader } from '../tx/block_header.js';
import type { TxEffect } from '../tx/tx_effect.js';
import type { TxHash } from '../tx/tx_hash.js';
import type { TxReceipt } from '../tx/tx_receipt.js';
import type { InBlock } from './in_block.js';
import type { L2Block } from './l2_block.js';

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/epoch-helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type ZodFor, schemas } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import { type ZodFor, schemas } from '../schemas/index.js';

export type L1RollupConstants = {
l1StartBlock: bigint;
l1GenesisTime: bigint;
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/stdlib/src/interfaces/block-builder.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Fr } from '@aztec/foundation/fields';
import type { BlockHeader, GlobalVariables } from '@aztec/stdlib/tx';

import type { L2Block } from '../block/l2_block.js';
import type { BlockHeader } from '../tx/block_header.js';
import type { GlobalVariables } from '../tx/global_variables.js';
import type { ProcessedTx } from '../tx/processed_tx.js';
import type { ProcessedTxHandler } from './processed-tx-handler.js';

Expand Down
7 changes: 4 additions & 3 deletions yarn-project/stdlib/src/interfaces/configs.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { EthAddress } from '@aztec/foundation/eth-address';
import type { Fr } from '@aztec/foundation/fields';
import type { FunctionSelector } from '@aztec/stdlib/abi';
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
import { type ZodFor, schemas } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import type { FunctionSelector } from '../abi/function_selector.js';
import type { AztecAddress } from '../aztec-address/index.js';
import { type ZodFor, schemas } from '../schemas/index.js';

type AllowedInstance = { address: AztecAddress };
type AllowedInstanceFunction = { address: AztecAddress; selector: FunctionSelector };
type AllowedClass = { classId: Fr };
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/stdlib/src/interfaces/epoch-prover.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Fr } from '@aztec/foundation/fields';
import type { Proof } from '@aztec/stdlib/proofs';
import type { RootRollupPublicInputs } from '@aztec/stdlib/rollup';
import type { BlockHeader } from '@aztec/stdlib/tx';

import type { L2Block } from '../block/l2_block.js';
import type { Proof } from '../proofs/proof.js';
import type { RootRollupPublicInputs } from '../rollup/root_rollup.js';
import type { BlockHeader } from '../tx/block_header.js';
import type { Tx } from '../tx/tx.js';
import type { BlockBuilder } from './block-builder.js';

Expand Down
3 changes: 2 additions & 1 deletion yarn-project/stdlib/src/interfaces/get_logs_response.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { jsonStringify } from '@aztec/foundation/json-rpc';
import { TxScopedL2Log } from '@aztec/stdlib/logs';

import { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';

describe('TxScopedL2Log', () => {
it('serializes to JSON', () => {
Expand Down
3 changes: 1 addition & 2 deletions yarn-project/stdlib/src/interfaces/get_logs_response.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { ZodFor } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import { ExtendedPublicLog } from '../logs/extended_public_log.js';
import { ExtendedUnencryptedL2Log } from '../logs/extended_unencrypted_l2_log.js';
import type { ZodFor } from '../schemas/index.js';

/** Response for the getContractClassLogs archiver call. */
export type GetContractClassLogsResponse = {
Expand Down
4 changes: 3 additions & 1 deletion yarn-project/stdlib/src/interfaces/l2_logs_source.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Fr } from '@aztec/foundation/fields';
import { type LogFilter, PrivateLog, TxScopedL2Log } from '@aztec/stdlib/logs';

import type { LogFilter } from '../logs/log_filter.js';
import type { PrivateLog } from '../logs/private_log.js';
import type { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
import type { GetContractClassLogsResponse, GetPublicLogsResponse } from './get_logs_response.js';

/**
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/interfaces/p2p-bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ApiSchemaFor } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import type { ApiSchemaFor } from '../schemas/index.js';

/** Exposed API to the P2P bootstrap node. */
export interface P2PBootstrapApi {
/**
Expand Down
3 changes: 1 addition & 2 deletions yarn-project/stdlib/src/interfaces/p2p.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { type ApiSchemaFor, optional, schemas } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import { BlockAttestation } from '../p2p/block_attestation.js';
import type { P2PClientType } from '../p2p/client_type.js';
import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
import { Tx } from '../tx/tx.js';

export type PeerInfo =
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/interfaces/prover-agent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ApiSchemaFor } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import type { ApiSchemaFor } from '../schemas/index.js';

export interface ProverAgentApi {
setMaxConcurrency(maxConcurrency: number): Promise<void>;

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/stdlib/src/interfaces/prover-client.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { type ConfigMappingsType, booleanConfigHelper, numberConfigHelper } from '@aztec/foundation/config';
import { Fr } from '@aztec/foundation/fields';
import { type ZodFor, schemas } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import { type ZodFor, schemas } from '../schemas/index.js';
import type { TxHash } from '../tx/tx_hash.js';
import type { EpochProver } from './epoch-prover.js';
import type { ProvingJobConsumer } from './prover-broker.js';
Expand Down
5 changes: 2 additions & 3 deletions yarn-project/stdlib/src/interfaces/prover-coordination.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { ApiSchemaFor } from '@aztec/stdlib/schemas';
import { TxHash } from '@aztec/stdlib/tx';

import { z } from 'zod';

import type { ApiSchemaFor } from '../schemas/index.js';
import { Tx } from '../tx/tx.js';
import { TxHash } from '../tx/tx_hash.js';

/** Provides basic operations for ProverNodes to interact with other nodes in the network. */
export interface ProverCoordination {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/stdlib/src/interfaces/prover-node.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type ApiSchemaFor, schemas } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import { type ApiSchemaFor, schemas } from '../schemas/index.js';

const EpochProvingJobState = [
'initialized',
'processing',
Expand Down
3 changes: 1 addition & 2 deletions yarn-project/stdlib/src/interfaces/proving-job-source.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { ApiSchemaFor } from '@aztec/stdlib/schemas';

import { z } from 'zod';

import type { ApiSchemaFor } from '../schemas/index.js';
import { ProvingJob, ProvingJobId, ProvingJobResult } from './proving-job.js';

export interface ProvingJobSource {
Expand Down
30 changes: 14 additions & 16 deletions yarn-project/stdlib/src/interfaces/server_circuit_prover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@ import type {
RECURSIVE_PROOF_LENGTH,
TUBE_PROOF_LENGTH,
} from '@aztec/constants';
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
import type {
BaseOrMergeRollupPublicInputs,
BlockMergeRollupInputs,
BlockRootOrBlockMergePublicInputs,
BlockRootRollupInputs,
EmptyBlockRootRollupInputs,
MergeRollupInputs,
PrivateBaseRollupInputs,
PublicBaseRollupInputs,
RootRollupInputs,
RootRollupPublicInputs,
SingleTxBlockRootRollupInputs,
TubeInputs,
} from '@aztec/stdlib/rollup';

import type { AvmCircuitInputs } from '../avm/avm.js';
import type { BaseParityInputs } from '../parity/base_parity_inputs.js';
import type { ParityPublicInputs } from '../parity/parity_public_inputs.js';
import type { RootParityInputs } from '../parity/root_parity_inputs.js';
import type { BaseOrMergeRollupPublicInputs } from '../rollup/base_or_merge_rollup_public_inputs.js';
import type { BlockMergeRollupInputs } from '../rollup/block_merge_rollup.js';
import type { BlockRootOrBlockMergePublicInputs } from '../rollup/block_root_or_block_merge_public_inputs.js';
import type { BlockRootRollupInputs, SingleTxBlockRootRollupInputs } from '../rollup/block_root_rollup.js';
import type { EmptyBlockRootRollupInputs } from '../rollup/empty_block_root_rollup_inputs.js';
import type { MergeRollupInputs } from '../rollup/merge_rollup.js';
import type { PrivateBaseRollupInputs } from '../rollup/private_base_rollup_inputs.js';
import type { PublicBaseRollupInputs } from '../rollup/public_base_rollup_inputs.js';
import type { RootRollupInputs, RootRollupPublicInputs } from '../rollup/root_rollup.js';
import type { TubeInputs } from '../rollup/tube_inputs.js';
import type { Tx } from '../tx/tx.js';
import type { ProofAndVerificationKey, PublicInputsAndRecursiveProof } from './proving-job.js';

Expand Down
3 changes: 2 additions & 1 deletion yarn-project/stdlib/src/messaging/l2_actor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { randomInt } from '@aztec/foundation/crypto';
import { Fr } from '@aztec/foundation/fields';
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { AztecAddress } from '@aztec/stdlib/aztec-address';

import { AztecAddress } from '../aztec-address/index.js';

/**
* The recipient of an L2 message.
Expand Down
7 changes: 4 additions & 3 deletions yarn-project/stdlib/src/tx/global_variable_builder.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { EthAddress } from '@aztec/foundation/eth-address';
import type { Fr } from '@aztec/foundation/fields';
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
import type { GasFees } from '@aztec/stdlib/gas';
import type { GlobalVariables } from '@aztec/stdlib/tx';

import type { AztecAddress } from '../aztec-address/index.js';
import type { GasFees } from '../gas/gas_fees.js';
import type { GlobalVariables } from './global_variables.js';

/**
* Interface for building global variables for Aztec blocks.
Expand Down
12 changes: 7 additions & 5 deletions yarn-project/stdlib/src/tx/tx_execution_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ import { Fr } from '@aztec/foundation/fields';
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
import type { FieldsOf } from '@aztec/foundation/types';
import { FunctionSelector } from '@aztec/stdlib/abi';
import { AztecAddress } from '@aztec/stdlib/aztec-address';
import { type ZodFor, schemas } from '@aztec/stdlib/schemas';
import { FunctionData, TxContext, TxRequest } from '@aztec/stdlib/tx';
import { Vector } from '@aztec/stdlib/types';

import { inspect } from 'util';
import { z } from 'zod';

import { FunctionSelector } from '../abi/function_selector.js';
import { AuthWitness } from '../auth_witness/auth_witness.js';
import { AztecAddress } from '../aztec-address/index.js';
import { type ZodFor, schemas } from '../schemas/index.js';
import { Vector } from '../types/shared.js';
import { Capsule } from './capsule.js';
import { FunctionData } from './function_data.js';
import { HashedValues } from './hashed_values.js';
import { TxContext } from './tx_context.js';
import { TxRequest } from './tx_request.js';

/**
* Request to execute a transaction. Similar to TxRequest, but has the full args.
Expand Down
Loading
Loading