Skip to content

Commit 7115682

Browse files
authored
Merge branch 'unstable' into eth2-network-feature
2 parents 934f1eb + f584521 commit 7115682

File tree

21 files changed

+858
-632
lines changed

21 files changed

+858
-632
lines changed

beacon_node/beacon_chain/src/fetch_blobs/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,24 @@ async fn fetch_and_process_blobs_v2<T: BeaconChainTypes>(
247247

248248
metrics::observe(&metrics::BLOBS_FROM_EL_EXPECTED, num_expected_blobs as f64);
249249
debug!(num_expected_blobs, "Fetching blobs from the EL");
250+
251+
// Track request count and duration for standardized metrics
252+
inc_counter(&metrics::BEACON_ENGINE_GET_BLOBS_V2_REQUESTS_TOTAL);
253+
let _timer =
254+
metrics::start_timer(&metrics::BEACON_ENGINE_GET_BLOBS_V2_REQUEST_DURATION_SECONDS);
255+
250256
let response = chain_adapter
251257
.get_blobs_v2(versioned_hashes)
252258
.await
253259
.inspect_err(|_| {
254260
inc_counter(&metrics::BLOBS_FROM_EL_ERROR_TOTAL);
255261
})?;
256262

263+
drop(_timer);
264+
265+
// Track successful response
266+
inc_counter(&metrics::BEACON_ENGINE_GET_BLOBS_V2_RESPONSES_TOTAL);
267+
257268
let Some(blobs_and_proofs) = response else {
258269
debug!(num_expected_blobs, "No blobs fetched from the EL");
259270
inc_counter(&metrics::BLOBS_FROM_EL_MISS_TOTAL);

beacon_node/beacon_chain/src/metrics.rs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,10 +1613,9 @@ pub static BLOB_SIDECAR_INCLUSION_PROOF_COMPUTATION: LazyLock<Result<Histogram>>
16131613
)
16141614
});
16151615
pub static DATA_COLUMN_SIDECAR_COMPUTATION: LazyLock<Result<HistogramVec>> = LazyLock::new(|| {
1616-
try_create_histogram_vec_with_buckets(
1616+
try_create_histogram_vec(
16171617
"beacon_data_column_sidecar_computation_seconds",
16181618
"Time taken to compute data column sidecar, including cells, proofs and inclusion proof",
1619-
Ok(vec![0.1, 0.15, 0.25, 0.35, 0.5, 0.7, 1.0, 2.5, 5.0, 10.0]),
16201619
&["blob_count"],
16211620
)
16221621
});
@@ -1690,6 +1689,33 @@ pub static BLOBS_FROM_EL_RECEIVED: LazyLock<Result<Histogram>> = LazyLock::new(|
16901689
)
16911690
});
16921691

1692+
/*
1693+
* Standardized getBlobs metrics across clients from https://github.com/ethereum/beacon-metrics
1694+
*/
1695+
pub static BEACON_ENGINE_GET_BLOBS_V2_REQUESTS_TOTAL: LazyLock<Result<IntCounter>> =
1696+
LazyLock::new(|| {
1697+
try_create_int_counter(
1698+
"beacon_engine_getBlobsV2_requests_total",
1699+
"Total number of engine_getBlobsV2 requests made to the execution layer",
1700+
)
1701+
});
1702+
1703+
pub static BEACON_ENGINE_GET_BLOBS_V2_RESPONSES_TOTAL: LazyLock<Result<IntCounter>> =
1704+
LazyLock::new(|| {
1705+
try_create_int_counter(
1706+
"beacon_engine_getBlobsV2_responses_total",
1707+
"Total number of successful engine_getBlobsV2 responses from the execution layer",
1708+
)
1709+
});
1710+
1711+
pub static BEACON_ENGINE_GET_BLOBS_V2_REQUEST_DURATION_SECONDS: LazyLock<Result<Histogram>> =
1712+
LazyLock::new(|| {
1713+
try_create_histogram(
1714+
"beacon_engine_getBlobsV2_request_duration_seconds",
1715+
"Duration of engine_getBlobsV2 requests to the execution layer in seconds",
1716+
)
1717+
});
1718+
16931719
/*
16941720
* Light server message verification
16951721
*/

0 commit comments

Comments
 (0)