Skip to content

Conversation

@steph-rs
Copy link

Proposed solution, addressing #118

Implementation:

  • New base_subscribe RPC endpoint with newFlashblocks subscription kind
  • Returns full RpcBlock on each flashblock update (similar to eth_subscribe("newHeads"))
  • Follows reth's EthPubSub patterns using jsonrpsee subscriptions and broadcast channels
  • Only available when flashblocks enabled via --websocket-url flag

@haardikk21
Copy link
Contributor

haardikk21 commented Oct 28, 2025

I wonder if instead of a new RPC method, we should override eth_subscribe with special handling in case params includes the newPendingTransactions subscription type

Edit: nevermind, i guess that doesn't allow consumers to use logs as the subscription type then. we want logs based off of flashblock data

Edit 2: i just saw your comment on the issue

@steph-rs
Copy link
Author

@danyalprout please let me know what you think🙏

@steph-rs steph-rs marked this pull request as ready for review October 28, 2025 22:49
@haardikk21
Copy link
Contributor

Could you add some tests for this? Probably in tests/rpc.rs

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.

2 participants