fix: execute-tipset-traces-parallelize#7107
Conversation
WalkthroughThis PR refactors Ethereum trace execution in the RPC layer by extracting transaction hash resolution logic into a reusable helper, redesigning ChangesEthereum trace execution refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
999b3ad to
7a7f15a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/rpc/methods/eth.rs`:
- Around line 3497-3524: The execute_tipset_traces loop spawns unbounded
blocking tasks for each non-system message (spawn_blocking calling
EthGetTransactionHashByCid::run) which can saturate Tokio and leaves in-flight
tasks running if an early error causes an immediate return; wrap the spawn logic
with a bounded in-flight semaphore (e.g., tokio::sync::Semaphore.acquire_owned)
to limit concurrent blocking tasks, make each spawn_blocking release the permit
when its closure finishes, and on encountering an error from a joined task call
join_set.abort_all() then drain remaining joins (await join_set.join_next()
until None) before returning the error so no background work is leaked or the
blocking pool is saturated.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b31ebb4e-77c3-4685-957f-c75fac54233f
📒 Files selected for processing (1)
src/rpc/methods/eth.rs
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes
Other information and links
Numbers from #7110
Change checklist
Outside contributions
Summary by CodeRabbit