-
Notifications
You must be signed in to change notification settings - Fork 109
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): implement ledger_getEvents
#1058
feat(rpc): implement ledger_getEvents
#1058
Conversation
Codecov Report
|
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.
Hi @rkrasiuk, thanks for the PR! Greatly appreciated.
The solution looks good. The extra trait approach is quite painful, although less than rolling our own hand-written client trait.
Sooner or later, I'd still like us to roll our own trait because it allows up to completely abstract away other serialization details (e.g. HexHash
, there's no good reason for that to be part of the public crate API). In the meantime, maybe there we can avoid having the extra trait by extending the server implementation to accept both parameter types: the correct one, and jsonrpsee
's auto-generated one. I have tried writing an MVP here: nightly...filippo/get-events-rpc.
What do you think? I'm unsure myself what I prefer.
hey @neysofu, i'm a bit at the crossroads as well. my preference would be for rpc to have strict behavior, but i like the code for your solution more, so i'll leave it up to you to decide :) on the sidenote, could you point me to some good first issues i could take? very few seem to be tagged |
It's great that you want to pick up more issues, @rkrasiuk, thank you! I'll chat with the team later today and we'll tag a few issues as As for the Let me know if you're able to rewrite the branch history to include the changes in d86f02d. Feel free to modify the test, comments, or anything that you'd like to improve on. In the meantime, I'll create a new issue to track the hand-written client trait development. |
no need to cherry-pick then, that solution looks good enough. closing in favor of d86f02d |
Hey @rkrasiuk! I think there's few issues you could take on:
|
Additional issue that can be good to fix for sequencer: |
Description
Implement
ledger_getEvents
through the extension trait. Not a fan of this solution but it saves you from the pain of having to handroll your own rpc macro.Linked Issues
ledger_getEvents
tosov_ledger_rpc::RpcClient
#1037Testing
Added
ledger_getEvents
togetters_succeed
test