-
Notifications
You must be signed in to change notification settings - Fork 10
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
Optimize traces engine to handle empty blocks #465
Conversation
WalkthroughThe changes involve modifications to the traces ingestion process in the codebase. Key alterations include the removal of the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- bootstrap/bootstrap.go (1 hunks)
- services/traces/engine.go (3 hunks)
- services/traces/engine_test.go (3 hunks)
Files skipped from review due to trivial changes (1)
- services/traces/engine_test.go
Additional comments not posted (3)
services/traces/engine.go (2)
67-71
: Efficient handling of empty blocks.The early return condition for empty transaction blocks in the
Notify
method optimizes performance by avoiding unnecessary processing.
Line range hint
22-36
: Verify the impact of removinginitEVMHeight
.The
initEVMHeight
parameter has been removed from theNewTracesIngestionEngine
function. Ensure that this change does not affect the engine's initialization logic or any dependent components.Run the following script to check for any remaining references to
initEVMHeight
in the codebase:Verification successful
No remaining references to
initEVMHeight
found.The
initEVMHeight
parameter has been removed from theNewTracesIngestionEngine
function, and there are no remaining references to it in the codebase. This change does not appear to affect the engine's initialization logic or any dependent components.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for references to `initEVMHeight` in the codebase. # Test: Search for any remaining references to `initEVMHeight`. rg --type go 'initEVMHeight'Length of output: 28
bootstrap/bootstrap.go (1)
Line range hint
116-139
: Verify the impact of removinginitHeight
.The initialization of the
initHeight
variable and its associated error handling have been removed from thestartIngestion
function. Ensure that this change does not impact the ingestion logic or any dependent components.Run the following script to check for any remaining references to
initHeight
in the codebase:
Closes: #464
Description
The traces engine performs some unnecessary actions, now that we can have blocks with no transactions. This will avoid spawning go routines for a no-op action.
We also remove the
initEVMHeight
fromNewTracesIngestionEngine
as it seems to be not used for anything.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Refactor
Style