-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: pending logs subscription #6108
Conversation
…are pending_blocks_stream
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 is exactly what we want yes.
Atm this would only support the pending block received by the engine.
I believe we also want to support the locally built pending block by EthApi
what we can do here is to also add a watch channel and set the new pending block there:
https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc/src/eth/api/mod.rs#L339-L342
then we can a new wrapper type that combines both watchers, the from the CL and the local one
…y built pending block
…select_all to merge pending log streams data
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.
okay, overall this is pretty close to the functionality we want,
with watch
channels and on demand receivers, there's no need to create them outside the struct that's holding the sender, because new receivers can be created on demand, so we want this to happen inside the new
function instead.
struct A {watch::Sender}
impl A {
fn new() {
Self {watch::channel()}
}
fn listener(&self) -> Receiver {
self.watcher.subscribe()
}
}
…t need to refactor places where we use SealedBlockWithSenders
this is great! this is now blocked by #6104 |
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.
sorry, this went stale but with the current design this is slightly difficult, we can solve this much easier now
draft for pending logs subscription #5617