Skip to content

Commit efd87e6

Browse files
committed
fix(fast-inbox): typecheck fixes for the streaming flip (A-1384)
- import BlockHeader from @aztec/stdlib/tx in prover-node (stdlib/block never exported it) - read the checkpoint proposal's consumed bucket from lastBlock.bucketRef - widen the block-record binary search bounds to plain numbers - carry bucketHint in the expected L1 propose args of the publisher tests
1 parent 5990538 commit efd87e6

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

yarn-project/aztec-node/src/modules/node_world_state_queries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ export class NodeWorldStateQueries {
197197

198198
/** Binary-searches the block records for the first block whose L1-to-L2 tree leaf count exceeds `messageIndex`. */
199199
async #findBlockConsumingL1ToL2MessageIndex(messageIndex: bigint): Promise<BlockData | undefined> {
200-
let lo = INITIAL_L2_BLOCK_NUM;
201-
let hi = await this.blockSource.getBlockNumber();
200+
let lo: number = INITIAL_L2_BLOCK_NUM;
201+
let hi: number = await this.blockSource.getBlockNumber();
202202
let result: BlockData | undefined;
203203
while (lo <= hi) {
204204
const mid = lo + Math.floor((hi - lo) / 2);

yarn-project/prover-node/src/prover-node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { getLastSiblingPath } from '@aztec/prover-client/helpers';
1313
import { ChonkCache } from '@aztec/prover-client/orchestrator';
1414
import { type AvmSimulator, PublicProcessorFactory } from '@aztec/simulator/server';
1515
import {
16-
type BlockHeader,
1716
EventDrivenL2BlockStream,
1817
type L2Block,
1918
type L2BlockId,
@@ -39,6 +38,7 @@ import {
3938
import type { DataStoreConfig } from '@aztec/stdlib/kv-store';
4039
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
4140
import { MerkleTreeId } from '@aztec/stdlib/trees';
41+
import type { BlockHeader } from '@aztec/stdlib/tx';
4242
import {
4343
L1Metrics,
4444
type TelemetryClient,

yarn-project/sequencer-client/src/publisher/l1_publisher.integration.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ describe('L1Publisher integration', () => {
661661
oracleInput: {
662662
feeAssetPriceModifier: 0n,
663663
},
664+
bucketHint: 0n,
664665
},
665666
CommitteeAttestationsAndSigners.packAttestations([]),
666667
[],

yarn-project/sequencer-client/src/publisher/sequencer-publisher.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ describe('SequencerPublisher', () => {
293293
oracleInput: {
294294
feeAssetPriceModifier: 0n,
295295
},
296+
bucketHint: 0n,
296297
},
297298
CommitteeAttestationsAndSigners.packAttestations([]),
298299
[],

yarn-project/sequencer-client/src/sequencer/checkpoint_proposal_job.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export class CheckpointProposalJob implements Traceable {
311311
): Promise<void> {
312312
const { checkpoint } = broadcast;
313313
// The checkpoint's consumed Inbox bucket is the last block's bucket reference (undefined ⇒ genesis bucket 0).
314-
const bucketHint = broadcast.proposal.bucketRef?.bucketSeq ?? 0n;
314+
const bucketHint = broadcast.proposal.lastBlock?.bucketRef?.bucketSeq ?? 0n;
315315

316316
try {
317317
// Wait for all votes actions, enqueued at the beginning, to resolve

0 commit comments

Comments
 (0)