@@ -30,7 +30,6 @@ import {
3030 SerializableContractInstance ,
3131 computePublicBytecodeCommitment ,
3232} from '@aztec/stdlib/contract' ;
33- import { MAX_LOGS_PER_TAG } from '@aztec/stdlib/interfaces/server' ;
3433import { ContractClassLog , LogId , PrivateLog , PublicLog , SiloedTag } from '@aztec/stdlib/logs' ;
3534import { InboxLeaf } from '@aztec/stdlib/messaging' ;
3635import { CheckpointHeader } from '@aztec/stdlib/rollup' ;
@@ -53,7 +52,6 @@ import {
5352 CheckpointNumberNotSequentialError ,
5453 InitialBlockNumberNotSequentialError ,
5554 InitialCheckpointNumberNotSequentialError ,
56- MaxLogsPerTagExceededError ,
5755} from './errors.js' ;
5856import { MessageStoreError } from './kv_archiver_store/message_store.js' ;
5957import type { InboxMessage } from './structs/inbox_message.js' ;
@@ -2386,68 +2384,6 @@ export function describeArchiverDataStore(
23862384 ] ,
23872385 ] ) ;
23882386 } ) ;
2389-
2390- it ( 'throws error when tag has more than MAX_LOGS_PER_TAG logs' , async ( ) => {
2391- const tag = new SiloedTag ( Fr . random ( ) ) ;
2392- const numLogsToCreate = MAX_LOGS_PER_TAG + 1 ;
2393-
2394- // Create checkpoints with logs that all share the same tag
2395- const newLogsCheckpoints : PublishedCheckpoint [ ] = [ ] ;
2396- let previousArchive : AppendOnlyTreeSnapshot | undefined ;
2397- let logCount = 0 ;
2398-
2399- // We need to create multiple blocks/checkpoints to get enough logs with the same tag
2400- // Since each block has numTxsPerBlock (4) txs, and each tx has numPrivateLogsPerTx (3) logs,
2401- // we need enough blocks to create MAX_LOGS_PER_TAG + 1 logs
2402- const blocksNeeded = Math . ceil ( numLogsToCreate / ( numTxsPerBlock * numPrivateLogsPerTx ) ) + 1 ;
2403- const startBlockNumber = numBlocksForLogs + 1 ;
2404-
2405- for (
2406- let blockNum = startBlockNumber ;
2407- blockNum < startBlockNumber + blocksNeeded && logCount < numLogsToCreate ;
2408- blockNum ++
2409- ) {
2410- const block = await L2BlockNew . random ( BlockNumber ( blockNum ) , {
2411- checkpointNumber : CheckpointNumber ( blockNum ) ,
2412- indexWithinCheckpoint : 0 ,
2413- state : makeStateForBlock ( blockNum , numTxsPerBlock ) ,
2414- ...( previousArchive ? { lastArchive : previousArchive } : { } ) ,
2415- } ) ;
2416- block . header . globalVariables . blockNumber = BlockNumber ( blockNum ) ;
2417-
2418- block . body . txEffects = await timesParallel ( numTxsPerBlock , async ( txIndex : number ) => {
2419- const txEffect = await TxEffect . random ( ) ;
2420- const privateLogs : PrivateLog [ ] = [ ] ;
2421-
2422- // Add logs with the same tag until we reach the target count
2423- for ( let logIndex = 0 ; logIndex < numPrivateLogsPerTx && logCount < numLogsToCreate ; logIndex ++ ) {
2424- const log = makePrivateLog ( tag ) ;
2425- privateLogs . push ( log ) ;
2426- logCount ++ ;
2427- }
2428-
2429- txEffect . privateLogs = privateLogs ;
2430- txEffect . publicLogs = mockPublicLogs ( blockNum , txIndex ) ;
2431- return txEffect ;
2432- } ) ;
2433-
2434- const checkpoint = new Checkpoint (
2435- AppendOnlyTreeSnapshot . random ( ) ,
2436- CheckpointHeader . random ( ) ,
2437- [ block ] ,
2438- CheckpointNumber ( blockNum ) ,
2439- ) ;
2440- const publishedCheckpoint = makePublishedCheckpoint ( checkpoint , blockNum ) ;
2441- newLogsCheckpoints . push ( publishedCheckpoint ) ;
2442- previousArchive = block . archive ;
2443- }
2444-
2445- await store . addCheckpoints ( newLogsCheckpoints ) ;
2446- await store . addLogs ( newLogsCheckpoints . flatMap ( p => p . checkpoint . blocks ) ) ;
2447-
2448- // Now try to get logs by tag - should throw error
2449- await expect ( store . getLogsByTags ( [ tag ] ) ) . rejects . toThrow ( MaxLogsPerTagExceededError ) ;
2450- } ) ;
24512387 } ) ;
24522388
24532389 describe ( 'getPublicLogs' , ( ) => {
0 commit comments