feat(l1): pipeline body download with execution#6491
feat(l1): pipeline body download with execution#6491azteca1998 wants to merge 3 commits intomainfrom
Conversation
Overlap block body downloads with block execution during full sync by using a background tokio task and an mpsc channel (buffer of 2 batches). The download task iterates through batches, fetches headers from the store, downloads bodies from peers, constructs Block objects, and sends them through the channel. The main loop receives completed batches and executes them immediately. This hides network I/O latency behind execution time for an estimated 12-15% throughput improvement. Closes #6479
Lines of code reportTotal lines added: Detailed view |
🤖 Claude Code ReviewNow I have enough context to write a thorough review. PR Review:
|
| Category | Severity | Item |
|---|---|---|
| Correctness | Medium | Single-batch always uses final_batch = true, potentially changing execution mode for large single batches |
| Correctness | Low | Empty batch silently drops final_batch = true signal |
| Design | Low | Download task not aborted/awaited on execution error |
| Style | Medium | Inner body-download loop duplicated in both paths |
| Style | Low | Asymmetric send-error handling in single vs multi-batch |
The pipelining design is solid. The main request before merging is to extract the duplicated download loop into a shared helper and verify the single-batch / EXECUTE_BATCH_SIZE interaction. The test plan (hoodi full sync + timing comparison) is the right way to validate the throughput claim.
Automated review by Claude (Anthropic) · sonnet · custom prompt
🤖 Codex Code ReviewFindings
Notes I did not see an EVM/gas-accounting or consensus-rule regression in the diff itself; batch ordering is still FIFO. I couldn’t run Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
Summary
sync_cycle_fullto overlap body downloads with block executionmpsc::channel(2)(2-batch buffer)Closes #6479
Test plan
FULL_SYNC_BLOCK_LIMIT=50000and verify completion