-
Notifications
You must be signed in to change notification settings - Fork 110
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
change(rpc): Refactor get block template RPC into stages #5837
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5837 +/- ##
==========================================
- Coverage 78.62% 78.52% -0.11%
==========================================
Files 308 308
Lines 38605 38706 +101
==========================================
+ Hits 30355 30393 +38
- Misses 8250 8313 +63 |
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.
Thank you for the cleanup and getting rustfmt working in get_block_template_rpcs.rs
again!
I left some optional comments but I'm happy with this PR as-is.
zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs
Outdated
Show resolved
Hide resolved
zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs
Outdated
Show resolved
Hide resolved
zebra-rpc/src/methods/get_block_template_rpcs/types/get_block_template.rs
Show resolved
Hide resolved
zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs
Outdated
Show resolved
Hide resolved
zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs
Outdated
Show resolved
Hide resolved
36ed685
to
722b047
Compare
Alfredo is going to review this as well. |
@Mergifyio update |
Sorry but I didn't understand the command. Please consult the commands documentation 📚. |
✅ Branch has been successfully updated |
The underlying error was:
https://github.com/ZcashFoundation/zebra/actions/runs/3681221203/jobs/6227680505#step:9:410 But that link goes to PR #5839, so I think we're fine here. |
Motivation
To implement long polling, we need to repeat some parts of the get block template RPC.
But currently the RPC function is very large, and in no specific order.
This refactor does not change any Zebra functionality, except that the long poll ID now tracks all mempool transactions.
Solution
Functional Changes:
Refactors:
Cleanups:
Review
This review is a high priority because the PR conflicts with most other RPC changes.
This PR contains a lot of code movement, it might be easier to review it using
git diff --color-moved
, or by reviewing each commit on GitHub.I can do a video review after the engineering sync next week, if that would help!
Reviewer Checklist
Follow Up Work
Actually implement long polling.