-
Notifications
You must be signed in to change notification settings - Fork 111
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): populate some getblocktemplate RPC block header fields using the state best chain tip #5659
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5659 +/- ##
==========================================
+ Coverage 78.69% 78.71% +0.02%
==========================================
Files 306 306
Lines 38552 38552
==========================================
+ Hits 30340 30348 +8
+ Misses 8212 8204 -8 |
Retrying. |
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.
This looks great! 🎉
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.
I think we're almost there, just need to deal with some tricky edge-cases with time and difficulty on testnet.
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.
Some comments that i am not totally sure for the testnet consensus rule.
By now, we don't have any tests for testnet specific code under minimum difficulty block mining. |
…nimum difficulty block
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 for the changes, I think we're almost there.
I'm happy to help write these changes, but I need to finish the ZIP-317 work first. So feel free to keep making changes here, or ask me to submit a PR on top of this one.
This existing test might help? zebra/zebra-chain/src/work/difficulty/tests/vectors.rs Lines 393 to 396 in c812f88
|
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, I think we're almost there, let me know if you want me to do the minimum difficulty "time" change.
zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs
Outdated
Show resolved
Hide resolved
Please apply any of the missing stuff and merge if you can. Thank you. |
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.
Let's see if that works
Motivation
[More to be added]
Populate the following fields:
#5455
Solution
[TBA]
Review
Reviewer Checklist
Follow Up Work
Populate root/commitment fields