-
Notifications
You must be signed in to change notification settings - Fork 104
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: implement JsonRpc transport for batch requests #600
feat: implement JsonRpc transport for batch requests #600
Conversation
e3a9eec
to
9e898e8
Compare
Thank you @tcoratger for the review. All review comments addressed in the latest commit. |
async fn batch_requests<I, P>( | ||
&self, | ||
requests: I, | ||
) -> Result<Vec<serde_json::Value>, ProviderError> |
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.
Do we have to resort to serde_json::Value
here? I generally dislike having that as part of the interface.
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.
Good question. Not necessarily, however this function was specifically introduced for this approach - to return generic JSON type based on the type returned. Otherwise, we'd have to create custom types for this and that would limit the ways we can call it
It's possible to change it if you prefer any other direction
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.
@adrienlacombe For me this PR is ready to be merged but I think this discussion still is opened
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.
ty @tcoratger , @xJonathanLEI can you please let us know your thoughts? ty
@thetheveloper can you rebase to trigger the ci again? I think this should be good now |
1e3a98f
to
f670190
Compare
@tcoratger rebase done. I tried to include the test fixes (hence last commit), but from what I see, when the tests are not running one after another then everything is fine. I suppose RPC node needs to process transactions from the previous iteration of testing, so the next one doesn't fail |
Should be fine now. Latest base is in place @tcoratger |
@tcoratger @xJonathanLEI anything else needed? thanks! |
For me this is ok to merge but as the PR is quite big and important I would appreciate another review from @xJonathanLEI if possible? |
5f0b3f1
to
ec92d77
Compare
ec92d77
to
3e084a5
Compare
Squashed and rebased. |
gm @xJonathanLEI is this good to be merged? ty |
@tcoratger maybe you can review as well? ty ty |
While this implementation probably works, I'm really not a fan of adding I know this is a bit not very pragmatic - after all, Anyway, I just prefer a design where we don't have to pollute The diffs are also a bit all over the place:
Closing this as I'll work on an alternative version. Thanks for working on this. |
Introduces
JsonRpc
batching requests described in #593