Skip to content

Commit 0c4b3fd

Browse files
authored
chore: improve logging to be less noisy and add relevant additional info where necessary, remove nested db (#146)
* Revert "chore: increase logging for debugging (#145)" This reverts commit 66869b4. * just add back nested db * better errors for failing txns
1 parent 66869b4 commit 0c4b3fd

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

crates/flashblocks-rpc/src/state.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ where
217217
let prev_pending_blocks = self.pending_blocks.load_full();
218218
match update {
219219
StateUpdate::Canonical(block) => {
220-
info!(
220+
debug!(
221221
message = "processing canonical block",
222222
block_number = block.number
223223
);
@@ -232,7 +232,7 @@ where
232232
}
233233
StateUpdate::Flashblock(flashblock) => {
234234
let start_time = Instant::now();
235-
info!(
235+
debug!(
236236
message = "processing flashblock",
237237
block_number = flashblock.metadata.block_number,
238238
flashblock_index = flashblock.index
@@ -249,8 +249,7 @@ where
249249
.record(start_time.elapsed());
250250
}
251251
Err(e) => {
252-
error!(message = "could not process Flashblock", error = %e, block_number = flashblock.metadata.block_number,
253-
flashblock_index = flashblock.index);
252+
error!(message = "could not process Flashblock", error = %e);
254253
self.metrics.block_processing_error.increment(1);
255254
}
256255
}
@@ -397,10 +396,8 @@ where
397396
let earliest_block_number = flashblocks_per_block.keys().min().unwrap();
398397
let canonical_block = earliest_block_number - 1;
399398
let mut last_block_header = self.client.header_by_number(canonical_block)?.ok_or(eyre!(
400-
"Failed to extract header for canonical block number {}. This is okay if your node is not fully synced to tip yet. Earliest block number {}. Flashblocks per block: {:?}",
401-
canonical_block,
402-
earliest_block_number,
403-
flashblocks_per_block.keys(),
399+
"Failed to extract header for canonical block number {}. This is okay if your node is not fully synced to tip yet.",
400+
canonical_block
404401
))?;
405402

406403
let evm_config = OpEvmConfig::optimism(self.client.chain_spec());

0 commit comments

Comments
 (0)