Skip to content

feat(l1): add gas used diff in error #3644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2025
Merged

feat(l1): add gas used diff in error #3644

merged 3 commits into from
Jul 16, 2025

Conversation

Arkenan
Copy link
Collaborator

@Arkenan Arkenan commented Jul 15, 2025

Motivation

When there's a gas mismatch, there's no way to tell what is the mismatch unless we print it manually. If it's present in the error, at least it appears in the test logs when it happens.

Description

  • Adds used and expected fields for the GasUsedMismatchError.
  • Adds the fields in the block gas post-exec validation.

@Arkenan Arkenan requested a review from a team as a code owner July 15, 2025 17:59
@github-actions github-actions bot added the L1 Ethereum client label Jul 15, 2025
Copy link

github-actions bot commented Jul 15, 2025

Lines of code report

Total lines added: 2
Total lines removed: 0
Total lines changed: 2

Detailed view
+----------------------------------------+-------+------+
| File                                   | Lines | Diff |
+----------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs | 765   | +2   |
+----------------------------------------+-------+------+

Copy link
Contributor

@JereSalo JereSalo left a comment

Choose a reason for hiding this comment

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

Nice, created an issue just in case because we have an error mapper within the execution spec tests repo and changing these strings often require making changes in the mapper. #3646

Comment on lines 940 to 941
// dbg!(last.cumulative_gas_used);
// dbg!(block_header.gas_used);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this if you want to, what you did serves as a replacement for this

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Jul 15, 2025
@Arkenan Arkenan added this pull request to the merge queue Jul 16, 2025
Merged via the queue into main with commit d6548ff Jul 16, 2025
31 checks passed
@Arkenan Arkenan deleted the add-gas-used-diff branch July 16, 2025 17:59
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Jul 16, 2025
d-roak pushed a commit to 1sixtech/ethrex that referenced this pull request Jul 17, 2025
**Motivation**

When there's a gas mismatch, there's no way to tell what is the mismatch
unless we print it manually. If it's present in the error, at least it
appears in the test logs when it happens.

**Description**

- Adds used and expected fields for the GasUsedMismatchError.
- Adds the fields in the block gas post-exec validation.
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.

3 participants