Skip to content

Conversation

@MegaRedHand
Copy link
Collaborator

@MegaRedHand MegaRedHand commented Nov 10, 2025

Motivation

Current block execution logs are a bit confusing, since percentages don't sum to 100%.

Description

This PR changes the block execution logs from:

2025-11-11T16:38:49.782644Z  INFO [METRIC] BLOCK EXECUTION THROUGHPUT (1600202): 0.333 Ggas/s TIME SPENT: 59 ms. Gas Used: 0.020 (33%), #Txs: 490. block validation: 0% exec+merkle: 98% (exec: 87% merkle: 98% max_queue_length: 363) store: 2%

to:

2025-11-11T16:38:49.782644Z  INFO [METRIC] BLOCK EXECUTION THROUGHPUT (1600202): 0.333 Ggas/s TIME SPENT: 59 ms. Gas Used: 0.020 (33%), #Txs: 490. block validation: 0% | exec(w/merkle): 87% | merkle-only: 11% (max_queue_length: 363) | store: 2%

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

Lines of code report

Total lines added: 0
Total lines removed: 1
Total lines changed: 1

Detailed view
+----------------------------------------+-------+------+
| File                                   | Lines | Diff |
+----------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs | 1297  | -1   |
+----------------------------------------+-------+------+

@MegaRedHand MegaRedHand marked this pull request as ready for review November 11, 2025 16:37
Copilot AI review requested due to automatic review settings November 11, 2025 16:37
@MegaRedHand MegaRedHand requested a review from a team as a code owner November 11, 2025 16:37
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Nov 11, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the clarity of block execution aggregation logs by restructuring percentage calculations to avoid confusion where percentages didn't sum to 100%.

Key changes:

  • Renamed merkle_end_instant to _merkle_end_instant to indicate it's not directly used in the new log format
  • Restructured the log format to show sequential phases with better separators
  • Adjusted percentage calculations to show: block validation, exec (with concurrent merkle), merkle-only phase, and storage phases
Comments suppressed due to low confidence (1)

crates/blockchain/blockchain.rs:1

  • Missing opening parenthesis before 'max_queue_length'. The format string has '(max_queue_length:' but should have both opening and closing parentheses around the entire clause. Change to '(max_queue_length: {merkle_queue_length})'.
pub mod constants;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fmoletta fmoletta added this pull request to the merge queue Nov 12, 2025
@ilitteri ilitteri removed this pull request from the merge queue due to a manual request Nov 12, 2025
@ilitteri ilitteri enabled auto-merge November 12, 2025 17:20
@ilitteri ilitteri added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit 665a5da Nov 12, 2025
38 checks passed
@ilitteri ilitteri deleted the improve-block-metrics-logs branch November 12, 2025 17:57
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 12, 2025
tomip01 pushed a commit that referenced this pull request Nov 12, 2025
**Motivation**

Current block execution logs are a bit confusing, since percentages
don't sum to 100%.

**Description**

This PR changes the block execution logs from:

```text
2025-11-11T16:38:49.782644Z  INFO [METRIC] BLOCK EXECUTION THROUGHPUT (1600202): 0.333 Ggas/s TIME SPENT: 59 ms. Gas Used: 0.020 (33%), #Txs: 490. block validation: 0% exec+merkle: 98% (exec: 87% merkle: 98% max_queue_length: 363) store: 2%
```

to:

```text
2025-11-11T16:38:49.782644Z  INFO [METRIC] BLOCK EXECUTION THROUGHPUT (1600202): 0.333 Ggas/s TIME SPENT: 59 ms. Gas Used: 0.020 (33%), #Txs: 490. block validation: 0% | exec(w/merkle): 87% | merkle-only: 11% (max_queue_length: 363) | store: 2%
```

---------

Co-authored-by: Ivan Litteri <[email protected]>
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