-
Notifications
You must be signed in to change notification settings - Fork 100
chore(l1): improve logging on the import
subcommand.
#4201
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
Conversation
import
subcommand.import
subcommand.
Lines of code reportTotal lines added: Detailed view
|
@@ -1,6 +1,6 @@ | |||
participants: | |||
- el_type: ethrex | |||
el_image: ethrex:latest | |||
el_image: ethrex:local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated to the PR but it is such a small fix that I added it
There was a problem hiding this 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 logging in the import
subcommand and throughout the application by making log messages more structured, informative, and less verbose. The changes focus on reducing log noise during block processing while providing better progress tracking and performance insights.
- Enhanced import progress logging with 10-second interval summaries instead of per-block logs
- Restructured log messages to use structured logging with field names
- Added performance logging controls to reduce noise in test environments
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
cmd/ethrex/cli.rs | Added progress tracking with 10-second intervals and completion timing for import/export operations |
crates/blockchain/blockchain.rs | Added perf_logs_enabled flag to control performance logging output |
crates/storage/store.rs | Improved log messages with structured fields and appropriate log levels |
cmd/ethrex/initializers.rs | Updated blockchain initialization to support performance logging control |
cmd/ethrex/l2/initializers.rs | Added performance logging parameter and improved config storage logging |
tooling/ef_tests/blockchain/test_runner.rs | Updated blockchain constructor call with new performance logging parameter |
cmd/ethrex/bench/build_block_benchmark.rs | Updated blockchain constructor call for benchmark tests |
fixtures/network/hoodi.yaml | Changed Docker image reference from latest to local |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
14579d5
to
839e1cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
) **Motivation** Logging in general, and specifically in the `import` subcommand is quite messy. **Description** - Improves the logging phrasing - Instead of logging for each block, logs a summary every 10 seconds - Logs the total time that it took. - Some misc log additions and downgrades This is how it looks: ``` 2025-08-28T17:27:12.121079Z INFO ethrex_storage::store: Opening storage engine engine=Libmdbx path=/Users/mpaulucci/Library/Application-Support/ethrex 2025-08-28T17:27:12.158692Z INFO ethrex_storage::store: Storing genesis block hash=0xbbe3…971b 2025-08-28T17:27:12.159567Z INFO ethrex::initializers: Initiating blockchain evm=levm 2025-08-28T17:27:12.159726Z INFO ethrex::cli: Importing blocks from file path=./hoodi-1k.rlp 2025-08-28T17:27:22.415021Z INFO ethrex::cli: Import progress processed=151 total=1000 percent=15.1 2025-08-28T17:27:32.602179Z INFO ethrex::cli: Import progress processed=180 total=1000 percent=18.0 ```
Motivation
Logging in general, and specifically in the
import
subcommand is quite messy.Description
This is how it looks: