|
| 1 | +import { type BlobSinkClientInterface } from '@aztec/blob-sink/client'; |
1 | 2 | import { |
2 | 3 | type GetUnencryptedLogsResponse, |
3 | 4 | type InBlock, |
@@ -115,6 +116,7 @@ export class Archiver implements ArchiveSource, Traceable { |
115 | 116 | private readonly l1Addresses: { rollupAddress: EthAddress; inboxAddress: EthAddress; registryAddress: EthAddress }, |
116 | 117 | readonly dataStore: ArchiverDataStore, |
117 | 118 | private readonly config: { pollingIntervalMs: number; batchSize: number }, |
| 119 | + private readonly _blobSinkClient: BlobSinkClientInterface, |
118 | 120 | private readonly instrumentation: ArchiverInstrumentation, |
119 | 121 | private readonly l1constants: L1RollupConstants, |
120 | 122 | private readonly log: Logger = createLogger('archiver'), |
@@ -145,7 +147,7 @@ export class Archiver implements ArchiveSource, Traceable { |
145 | 147 | public static async createAndSync( |
146 | 148 | config: ArchiverConfig, |
147 | 149 | archiverStore: ArchiverDataStore, |
148 | | - telemetry: TelemetryClient, |
| 150 | + deps: { telemetry: TelemetryClient; blobSinkClient: BlobSinkClientInterface }, |
149 | 151 | blockUntilSynced = true, |
150 | 152 | ): Promise<Archiver> { |
151 | 153 | const chain = createEthereumChain(config.l1RpcUrl, config.l1ChainId); |
@@ -176,7 +178,8 @@ export class Archiver implements ArchiveSource, Traceable { |
176 | 178 | pollingIntervalMs: config.archiverPollingIntervalMS ?? 10_000, |
177 | 179 | batchSize: config.archiverBatchSize ?? 100, |
178 | 180 | }, |
179 | | - await ArchiverInstrumentation.new(telemetry, () => archiverStore.estimateSize()), |
| 181 | + deps.blobSinkClient, |
| 182 | + await ArchiverInstrumentation.new(deps.telemetry, () => archiverStore.estimateSize()), |
180 | 183 | { l1StartBlock, l1GenesisTime, epochDuration, slotDuration, ethereumSlotDuration }, |
181 | 184 | ); |
182 | 185 | await archiver.start(blockUntilSynced); |
|
0 commit comments