Skip to content

Conversation

@fedacking
Copy link
Contributor

@fedacking fedacking commented Oct 28, 2025

Motivation

The logs for the headers in snapsync shows inaccurate numbers due to the chunked header download. This pr aims to fix that and show the proper percentage of headers to download.

Description

  • Change METRICS.headers_downloaded to an IntCounter instead of AtomicU64
  • Removed METRICS.headers_to_download and replaced the calculation with METRICS.sync_head_block
  • Fixed METRICS.sync_head_block to include the proper

Works to improve #4950

@fedacking fedacking requested a review from a team as a code owner October 28, 2025 16:03
@github-actions github-actions bot added the L1 Ethereum client label Oct 28, 2025
@github-actions
Copy link

github-actions bot commented Oct 28, 2025

Lines of code report

Total lines added: 7
Total lines removed: 10
Total lines changed: 17

Detailed view
+----------------------------------------------+-------+------+
| File                                         | Lines | Diff |
+----------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/metrics.rs      | 599   | +6   |
+----------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/network.rs      | 364   | +1   |
+----------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/peer_handler.rs | 1753  | -10  |
+----------------------------------------------+-------+------+

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Oct 31, 2025
@fedacking fedacking enabled auto-merge November 3, 2025 19:31
@fedacking fedacking added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 5ffbd3f Nov 3, 2025
50 of 52 checks passed
@fedacking fedacking deleted the headers-snapsync-logs branch November 3, 2025 20:33
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 3, 2025
xqft pushed a commit that referenced this pull request Nov 11, 2025
**Motivation**

The logs for the headers in snapsync shows inaccurate numbers due to the
chunked header download. This pr aims to fix that and show the proper
percentage of headers to download.

**Description**

- Change `METRICS.headers_downloaded` to an `IntCounter` instead of
`AtomicU64`
- Removed `METRICS.headers_to_download` and replaced the calculation
with `METRICS.sync_head_block`
- Fixed `METRICS.sync_head_block` to include the proper 

Works to improve #4950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants