-
Notifications
You must be signed in to change notification settings - Fork 245
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
Fix subscribe blocks #330
Fix subscribe blocks #330
Conversation
Some RPC Providers (Alchemy and Reth were tested) don't have the "uncles" field in their newHeads subscription, hence make it optional
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.
Thanks! Ref https://t.me/ethers_rs/36155
Pending @mattsse or @prestwich, should this also be skip_serializing_if
?
Given that we are post-merge, does it now ALWAYS omit that field in the |
my initial take is that we should NOT do |
Actually should this be @prestwich https://github.com/paradigmxyz/reth/blob/4e49aa9df66dfc19907c7e788f1817e83f2f61c9/crates/rpc/rpc/src/eth/pubsub.rs#L292 |
this is quite likely |
The newHeads object does seem to contain withdrawals though, which aren't included in the Header object |
so its a separate object? 😮💨 |
most consistent eth rpc api |
Motivation
Some RPC Providers (Alchemy and Reth were tested) don't have the "uncles" field in their newHeads subscription, this breaks the subscribe_blocks() stream.
Solution
Providing the serde(default) flag on the uncles field allows graceful handling of both existing and missing uncle fields in the subscription response.
PR Checklist