-
Notifications
You must be signed in to change notification settings - Fork 82
feat: initial implementation of flashblocks sub #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!! |
Proposed solution, addressing #118
Implementation:
base_subscribeRPC endpoint withnewFlashblockssubscription kindeth_subscribe("newHeads"))--websocket-urlflag