Skip to content

Commit 95accfe

Browse files
authored
Add logs for da limits (#86)
* Add logs for da limits * Add comments * Fix
1 parent 161baee commit 95accfe

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

crates/op-rbuilder/src/builders/context.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,17 @@ impl OpPayloadBuilderCtx {
328328
let tx_da_limit = self.da_config.max_da_tx_size();
329329
let mut evm = self.evm_config.evm_with_env(&mut *db, self.evm_env.clone());
330330

331+
info!(target: "payload_builder", block_da_limit = ?block_da_limit, tx_da_size = ?tx_da_limit, block_gas_limit = ?block_gas_limit, "DA limits");
332+
333+
// Remove once we merge Reth 1.4.4
334+
// Fixed in https://github.com/paradigmxyz/reth/pull/16514
335+
self.metrics
336+
.da_block_size_limit
337+
.record(block_da_limit.map_or(-1.0, |v| v as f64));
338+
self.metrics
339+
.da_tx_size_limit
340+
.record(tx_da_limit.map_or(-1.0, |v| v as f64));
341+
331342
while let Some(tx) = best_txs.next(()) {
332343
let exclude_reverting_txs = tx.exclude_reverting_txs();
333344
let tx_da_size = tx.estimated_da_size();

crates/op-rbuilder/src/metrics.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ pub struct OpRBuilderMetrics {
6363
pub tx_simulation_duration: Histogram,
6464
/// Byte size of transactions
6565
pub tx_byte_size: Histogram,
66+
/// Da block size limit
67+
pub da_block_size_limit: Histogram,
68+
/// Da tx size limit
69+
pub da_tx_size_limit: Histogram,
6670
}
6771

6872
/// Contains version information for the application.

0 commit comments

Comments
 (0)