Skip to content

Commit

Permalink
Move block builder to prover-client
Browse files Browse the repository at this point in the history
So we can use it for tests
  • Loading branch information
spalladino committed Nov 28, 2024
1 parent ff58f5f commit 3397f50
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion yarn-project/prover-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"type": "module",
"exports": {
".": "./dest/index.js",
"./block-builder": "./dest/block_builder/index.js",
"./broker": "./dest/proving_broker/index.js",
"./prover-agent": "./dest/prover-agent/index.js",
"./orchestrator": "./dest/orchestrator/index.js",
Expand Down Expand Up @@ -103,4 +104,4 @@
"engines": {
"node": ">=18"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ import {
getVKTreeRoot,
} from '@aztec/noir-protocol-circuits-types';
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
import { NoopTelemetryClient } from '@aztec/telemetry-client/noop';
import { type MerkleTreeAdminDatabase, NativeWorldStateService } from '@aztec/world-state';

import { jest } from '@jest/globals';

import {
buildBaseRollupHints,
buildHeaderFromCircuitOutputs,
getRootTreeSiblingPath,
getSubtreeSiblingPath,
getTreeSnapshot,
} from '@aztec/prover-client/helpers';
import { NoopTelemetryClient } from '@aztec/telemetry-client/noop';
import { type MerkleTreeAdminDatabase, NativeWorldStateService } from '@aztec/world-state';

import { jest } from '@jest/globals';

} from '../orchestrator/block-building-helpers.js';
import { LightweightBlockBuilder } from './light.js';

jest.setTimeout(50_000);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createDebugLogger } from '@aztec/aztec.js';
import {
type BlockBuilder,
L2Block,
Expand All @@ -9,14 +8,20 @@ import {
} from '@aztec/circuit-types';
import { Fr, type GlobalVariables, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/circuits.js';
import { padArrayEnd } from '@aztec/foundation/collection';
import { createDebugLogger } from '@aztec/foundation/log';
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types';
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
import { buildBaseRollupHints, buildHeaderAndBodyFromTxs, getTreeSnapshot } from '@aztec/prover-client/helpers';
import { type TelemetryClient } from '@aztec/telemetry-client';
import { NoopTelemetryClient } from '@aztec/telemetry-client/noop';

import { inspect } from 'util';

import {
buildBaseRollupHints,
buildHeaderAndBodyFromTxs,
getTreeSnapshot,
} from '../orchestrator/block-building-helpers.js';

/**
* Builds a block and its header from a set of processed tx without running any circuits.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { type L1ToL2MessageSource, type L2BlockSource, type WorldStateSynchroniz
import { type ContractDataSource } from '@aztec/circuits.js';
import { type EthAddress } from '@aztec/foundation/eth-address';
import { type P2P } from '@aztec/p2p';
import { LightweightBlockBuilderFactory } from '@aztec/prover-client/block-builder';
import { PublicProcessorFactory } from '@aztec/simulator';
import { type TelemetryClient } from '@aztec/telemetry-client';
import { type ValidatorClient } from '@aztec/validator-client';

import { LightweightBlockBuilderFactory } from '../block_builder/index.js';
import { type SequencerClientConfig } from '../config.js';
import { GlobalVariableBuilder } from '../global_variable_builder/index.js';
import { L1Publisher } from '../publisher/index.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ import { randomBytes } from '@aztec/foundation/crypto';
import { Signature } from '@aztec/foundation/eth-signature';
import { type Writeable } from '@aztec/foundation/types';
import { type P2P, P2PClientState } from '@aztec/p2p';
import { type BlockBuilderFactory } from '@aztec/prover-client/block-builder';
import { type PublicProcessor, type PublicProcessorFactory } from '@aztec/simulator';
import { NoopTelemetryClient } from '@aztec/telemetry-client/noop';
import { type ValidatorClient } from '@aztec/validator-client';

import { expect } from '@jest/globals';
import { type MockProxy, mock, mockFn } from 'jest-mock-extended';

import { type BlockBuilderFactory } from '../block_builder/index.js';
import { type GlobalVariableBuilder } from '../global_variable_builder/global_builder.js';
import { type L1Publisher } from '../publisher/l1-publisher.js';
import { TxValidatorFactory } from '../tx_validator/tx_validator_factory.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/sequencer-client/src/sequencer/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import { createDebugLogger } from '@aztec/foundation/log';
import { RunningPromise } from '@aztec/foundation/running-promise';
import { Timer, elapsed } from '@aztec/foundation/timer';
import { type P2P } from '@aztec/p2p';
import { type BlockBuilderFactory } from '@aztec/prover-client/block-builder';
import { type PublicProcessorFactory } from '@aztec/simulator';
import { Attributes, type TelemetryClient, type Tracer, trackSpan } from '@aztec/telemetry-client';
import { type ValidatorClient } from '@aztec/validator-client';

import { inspect } from 'util';

import { type BlockBuilderFactory } from '../block_builder/index.js';
import { type GlobalVariableBuilder } from '../global_variable_builder/global_builder.js';
import { type L1Publisher } from '../publisher/l1-publisher.js';
import { prettyLogViemErrorMsg } from '../publisher/utils.js';
Expand Down

0 comments on commit 3397f50

Please sign in to comment.