Skip to content

feat: add sync raw send transaction support#459

Open
0xl3on wants to merge 5 commits intoflashbots:mainfrom
0xl3on:support-for-rawtransaction-sync
Open

feat: add sync raw send transaction support#459
0xl3on wants to merge 5 commits intoflashbots:mainfrom
0xl3on:support-for-rawtransaction-sync

Conversation

@0xl3on
Copy link
Contributor

@0xl3on 0xl3on commented Feb 23, 2026

Motivation

Closes #429

Solution

  • Added --send-raw-tx-sync flag to spam and campaign commands
  • When enabled, txs are sent via a raw reqwest POST instead of alloy's provider, so we can capture
    end_timestamp_ms right when the response arrives
  • Batching (--rpc-batch-size) is disabled when sync is on, we need individual HTTP responses per tx to get per-tx
    timestamps
  • For sync txs, process_block_receipts uses the recorded timestamp; normal txs fall back to block header timestamp
    (existing behavior, unchanged)
  • About the known limitations: maybe we can start drafting issues about improving the CSV reports timestamp precision

PR Checklist

  • Added Tests
  • Added Documentation
  • Ran cargo +nightly clippy --workspace --lib --examples --tests --benches --all-features --locked --fix
  • Ran cargo fmt --all
  • Note breaking changes in PR description, if applicable
  • update changelogs
    • Update CHANGELOG.md in each affected crate
    • add a high-level description in the root changelog

@0xl3on 0xl3on requested a review from zeroXbrock as a code owner February 23, 2026 01:14
@0xl3on
Copy link
Contributor Author

0xl3on commented Feb 23, 2026

Hey @zeroXbrock ! Closing one more stale issue. Lmk your thoughts!

@zeroXbrock
Copy link
Member

Thanks @0xl3on! I'm OOO for the next couple weeks so I'll ask someone from my team if they can review. But if not I'll review it when I'm back!

Copy link
Member

@zeroXbrock zeroXbrock left a comment

Choose a reason for hiding this comment

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

nice, works as expected!
Just one thing I'd like to change though: the call to eth_sendRawTransactionSync doesn't show up in reports (neither on the eth_sendRawTransaction Latency graph or the latency quantile table). Naturally, the eth_sendRawTransaction chart renders empty because we didn't call that method, but it would be nice to add a chart for eth_sendRawTransactionSync that takes the place of the eth_sendRawTransaction Latency chart when applicable. Charts with no data should simply not render in the report, and the latency chart should include every method called during the run.

Comment on lines 71 to +78
pub fn start_timestamp_ms(&self) -> u128 {
self.start_timestamp_ms
}

pub fn end_timestamp_ms(&self) -> Option<u128> {
self.end_timestamp_ms
}

Copy link
Member

Choose a reason for hiding this comment

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

if these vars need to be read outside of the crate, we should probably just remove these getter functions and make the params public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for eth_sendRawTransactionSync

2 participants