diff --git a/yarn-project/circuit-types/src/interfaces/block-builder.ts b/yarn-project/circuit-types/src/interfaces/block-builder.ts index 5b73b7d242c..99151584568 100644 --- a/yarn-project/circuit-types/src/interfaces/block-builder.ts +++ b/yarn-project/circuit-types/src/interfaces/block-builder.ts @@ -20,7 +20,6 @@ export interface BlockBuilder extends ProcessedTxHandler { addTxs(txs: ProcessedTx[]): Promise; /** - * Pads the block with empty txs if it hasn't reached the declared number of txs. * Assembles the block and updates the archive tree. */ setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise; diff --git a/yarn-project/circuit-types/src/interfaces/epoch-prover.ts b/yarn-project/circuit-types/src/interfaces/epoch-prover.ts index 624c28c8da5..02f76b95a9c 100644 --- a/yarn-project/circuit-types/src/interfaces/epoch-prover.ts +++ b/yarn-project/circuit-types/src/interfaces/epoch-prover.ts @@ -21,7 +21,7 @@ export interface EpochProver extends Omit { */ startTubeCircuits(txs: Tx[]): void; - /** Pads the block with empty txs if it hasn't reached the declared number of txs. */ + /** Returns the block. */ setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise; /** Pads the epoch with empty block roots if needed and blocks until proven. Throws if proving has failed. */ diff --git a/yarn-project/circuit-types/src/tx/processed_tx.ts b/yarn-project/circuit-types/src/tx/processed_tx.ts index feacb5de6e1..38e857e1a4f 100644 --- a/yarn-project/circuit-types/src/tx/processed_tx.ts +++ b/yarn-project/circuit-types/src/tx/processed_tx.ts @@ -60,10 +60,6 @@ export type ProcessedTx = { * Reason the tx was reverted. */ revertReason: SimulationError | undefined; - /** - * Flag indicating the tx is 'empty' meaning it's a padding tx to take us to a power of 2. - */ - isEmpty: boolean; }; /** @@ -123,7 +119,6 @@ export function makeProcessedTxFromPrivateOnlyTx( txEffect, gasUsed, revertReason: undefined, - isEmpty: false, }; } @@ -181,6 +176,5 @@ export function makeProcessedTxFromTxWithPublicCalls( txEffect, gasUsed, revertReason, - isEmpty: false, }; } diff --git a/yarn-project/end-to-end/src/e2e_block_building.test.ts b/yarn-project/end-to-end/src/e2e_block_building.test.ts index 91be2b9f950..cf4183c483e 100644 --- a/yarn-project/end-to-end/src/e2e_block_building.test.ts +++ b/yarn-project/end-to-end/src/e2e_block_building.test.ts @@ -471,7 +471,7 @@ describe('e2e_block_building', () => { }); // Regression for https://github.com/AztecProtocol/aztec-packages/issues/7918 - it('publishes two blocks with only padding txs', async () => { + it('publishes two empty blocks', async () => { ({ teardown, pxe, logger, aztecNode } = await setup(0, { minTxsPerBlock: 0, skipProtocolContracts: true, diff --git a/yarn-project/prover-client/src/block_builder/light.ts b/yarn-project/prover-client/src/block_builder/light.ts index 3446b603d03..9c5baf50822 100644 --- a/yarn-project/prover-client/src/block_builder/light.ts +++ b/yarn-project/prover-client/src/block_builder/light.ts @@ -48,9 +48,7 @@ export class LightweightBlockBuilder implements BlockBuilder { async addTxs(txs: ProcessedTx[]): Promise { this.spongeBlobState = SpongeBlob.init(toNumBlobFields(txs)); for (const tx of txs) { - this.logger.debug(tx.hash.equals(TxHash.zero()) ? 'Adding padding tx to block' : 'Adding new tx to block', { - txHash: tx.hash.toString(), - }); + this.logger.debug('Adding new tx to block', { txHash: tx.hash.toString() }); this.txs.push(tx); await buildBaseRollupHints(tx, this.globalVariables!, this.db, this.spongeBlobState!); } @@ -92,7 +90,6 @@ export class LightweightBlockBuilderFactory { /** * Creates a block builder under the hood with the given txs and messages and creates a block. - * Automatically adds padding txs to get to a minimum of 2 txs in the block. * @param db - A db fork to use for block building. */ export async function buildBlock( diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator.ts b/yarn-project/prover-client/src/orchestrator/orchestrator.ts index 8190da2dd6f..76271edaa77 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator.ts @@ -263,11 +263,6 @@ export class ProvingOrchestrator implements EpochProver { logger.info(`Received transaction: ${tx.hash}`); - if (tx.isEmpty) { - logger.warn(`Ignoring empty transaction ${tx.hash} - it will not be added to this block`); - continue; - } - const [hints, treeSnapshots] = await this.prepareTransaction(tx, provingState); const txProvingState = new TxProvingState(tx, hints, treeSnapshots); const txIndex = provingState.addNewTx(txProvingState); @@ -521,9 +516,7 @@ export class ProvingOrchestrator implements EpochProver { buildBaseRollupHints(tx, provingState.globalVariables, db, provingState.spongeBlobState), ); - if (!tx.isEmpty) { - this.metrics.recordBaseRollupInputs(ms); - } + this.metrics.recordBaseRollupInputs(ms); const promises = [MerkleTreeId.NOTE_HASH_TREE, MerkleTreeId.NULLIFIER_TREE, MerkleTreeId.PUBLIC_DATA_TREE].map( async (id: MerkleTreeId) => { @@ -551,11 +544,7 @@ export class ProvingOrchestrator implements EpochProver { const { processedTx } = txProvingState; const { rollupType, inputs } = txProvingState.getBaseRollupTypeAndInputs(); - logger.debug( - `Enqueuing deferred proving base rollup${ - processedTx.isEmpty ? ' with padding tx' : '' - } for ${processedTx.hash.toString()}`, - ); + logger.debug(`Enqueuing deferred proving base rollup for ${processedTx.hash.toString()}`); this.deferredProving( provingState, diff --git a/yarn-project/prover-client/src/prover-client/prover-client.ts b/yarn-project/prover-client/src/prover-client/prover-client.ts index f179ba758d0..c13e6eebf9e 100644 --- a/yarn-project/prover-client/src/prover-client/prover-client.ts +++ b/yarn-project/prover-client/src/prover-client/prover-client.ts @@ -34,10 +34,7 @@ export class ProverClient implements EpochProverManager { private orchestratorClient: ProvingJobProducer, private agentClient?: ProvingJobConsumer, private log = createLogger('prover-client:tx-prover'), - ) { - // TODO(palla/prover-node): Cache the paddingTx here, and not in each proving orchestrator, - // so it can be reused across multiple ones and not recomputed every time. - } + ) {} public createEpochProver(): EpochProver { const facade = new BrokerCircuitProverFacade(this.orchestratorClient); @@ -60,10 +57,6 @@ export class ProverClient implements EpochProverManager { await this.createAndStartAgents(); } - if (!this.config.realProofs && newConfig.realProofs) { - // TODO(palla/prover-node): Reset padding tx here once we cache it at this class - } - this.config = newConfig; }