-
Notifications
You must be signed in to change notification settings - Fork 10
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: rpc client for eth blockchains #520
Conversation
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.
Tagging in @AaronGoldman as I believe there may already be code checked in somewhere that does this?
This is taken from that code and adjusted to a bit (mostly just more serde and a trait).. it was removed from main a while back. |
42d2ccb
to
8e50b6b
Compare
6835ef1
to
535ada8
Compare
535ada8
to
98305a9
Compare
This PR adds an http client that knows how to talk to Ethereum RPC providers. It also validates that a time event proof correctly points at
prev
when parsing. The RPC client will be used to timestamp events which is coming in a follow up PR. That change will require storing more information and is related to both anchoring and timestamping. Event validation itself doesn't strictly require that we're able to follow a time event to the chain and prove that the root is in the proof. Without that, we have no time information but the event is "valid" from a structural perspective, and it's possible users will not all use the same chain, and we may want to gossip events even if we're not using them to timestamp ourselves.The intention is to have the service (likely event) that is actually adding time information register a eth provider for every chain ID that they're interested in, and then they can query the blockchain and persist the block number and time information and add it to any events as needed. These changes are consumed by #522.
I expect that we will swap this out for a full eth client (e.g. alloy-rs) when we do self anchoring and need signing and such, but that should be a relatively small change as we can just impl the trait in terms of that client and it should work.
This currently targets #503 but can likely be rebased onto main at this point if that's preferred.