feat: initial implementation of flashblocks sub#144
Conversation
|
I wonder if instead of a new RPC method, we should override Edit: nevermind, i guess that doesn't allow consumers to use Edit 2: i just saw your comment on the issue |
|
@danyalprout please let me know what you think🙏 |
|
Could you add some tests for this? Probably in |
|
cc @cody-wang-cb to take a look at this |
4bccb73 to
b64553b
Compare
✅ Heimdall Review Status
|
refcell
left a comment
There was a problem hiding this comment.
I've ported these changes to the new test-utils setup. Won't approve since I've made a bunch of changes that could use another set of eyes.
|
now we are talking! @refcell it's nice to see new contributors here🔥 |
danyalprout
left a comment
There was a problem hiding this comment.
This looks great to me. Thank you @steph-rs and @refcell!
I personally prefer the idea overriding the existing eth_subscribe if possible. I wonder if we could have eth_subscribe(ExtendedSubscriptionKind), where ExtendedSubscriptionKind = {...SubscriptionKind, NewFlashblocks, PendingLogs }.
This would:
- Keep it consistent with the rest of the Flashblock API's (that override the underlying
eth_RPC's) - Should be backwards compatible with the existing eth_subscribe setup
- We could potentially override the existing
newPendingTransactionsevent to use the Flashblocks pending state
Happy for us to merge this now and do a follow up to see if we can move it into the eth namespace.
|
I would be happy to try my best in follow-up. should we update the issue then? |
How about we just open up a new issue and point the old issue to the new one? And yes, doing this in a follow-on PR will make it easier to prevent more git conflicts - if you could work in a follow-on pr that would be much appreciated!! |
### Description In [`kona`](https://github.com/anton-rs/kona), we'd like to test against arbitrary inputs for various points in the derivation pipeline. implementing arbitrary across op-alloy input types enables this. This PR implements [`arbitrary::Arbitrary`](https://docs.rs/arbitrary/latest/arbitrary/trait.Arbitrary.html) across all `op-alloy-genesis` crate types.
* fix typo * fix typo * fix typos --------- Co-authored-by: Ratan Kaliani <ratankaliani@berkeley.edu>
* fix typo * fix typo * fix typos --------- Co-authored-by: Ratan Kaliani <ratankaliani@berkeley.edu>
* feat: initial implementation of flashblocks sub * feat: add tests for base_subscribe * fix(node): remove old node/main.rs changes * fix(flashbots-rpc): tests --------- Co-authored-by: refcell <abigger87@gmail.com>
* fix typo * fix typo * fix typos --------- Co-authored-by: Ratan Kaliani <ratankaliani@berkeley.edu>
* fix typo * fix typo * fix typos --------- Co-authored-by: Ratan Kaliani <ratankaliani@berkeley.edu>
* fix typo * fix typo * fix typos --------- Co-authored-by: Ratan Kaliani <ratankaliani@berkeley.edu>
Proposed solution, addressing #118
Implementation:
base_subscribeRPC endpoint withnewFlashblockssubscription kindeth_subscribe("newHeads"))--websocket-urlflag