-
Notifications
You must be signed in to change notification settings - Fork 727
Add last_sortition_ch to RPCTenure #6818
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
base: develop
Are you sure you want to change the base?
Add last_sortition_ch to RPCTenure #6818
Conversation
Signed-off-by: Jacinta Ferrant <jacinta@stackslabs.com>
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (68.69%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #6818 +/- ##
===========================================
+ Coverage 67.63% 68.69% +1.05%
===========================================
Files 586 586
Lines 362403 357305 -5098
===========================================
+ Hits 245099 245433 +334
+ Misses 117304 111872 -5432
... and 481 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| burn_block_height: u32, | ||
| preamble: &HttpRequestPreamble, | ||
| ) -> Result<ConsensusHash, StacksHttpResponse> { | ||
| let handle = sortdb.index_handle_at_tip(); |
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.
Instead of loading from the sortition DB's highest known canonical tip, can you instead query relative to the sortition identified by the request's consensus hash? That way, it's unambiguous as to what parent consensus hash is being queried (for example, although unlikely, it is possible that the requested sortition and its parent are both non-canonical, and this change will ensure that the correct parent consensus hash is loaded).
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.
|
So it appears that the |
Signed-off-by: Jacinta Ferrant <jacinta@stackslabs.com>
Yep can give it a try. Gotta ruminate a bit because of the way the streaming is set up where it always knows about the next StacksBlockId in the stream. May for e.g. be better to make last_sortition_ch into something like "last_non_empty_sortition_ch" |
Signed-off-by: Jacinta Ferrant <jacinta@stackslabs.com>
Signed-off-by: Jacinta Ferrant <jacinta@stackslabs.com>
Closes #6817
I am not sure I did this correctly...is this gonna be weird if its a shadow tenure? Not sure if I need to special case that..