-
Notifications
You must be signed in to change notification settings - Fork 678
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
Fix: correct burn view for miner block broadcast #5515
base: develop
Are you sure you want to change the base?
Conversation
|
…tenure nor extend the ongoing tenure, and fail-out of continue_tenure
…cks-core into fix/burn-view
Signed-off-by: Jacinta Ferrant <[email protected]>
/// sortition, make sure we first mine a tenure-change block and then a tenure-extend block. | ||
#[test] | ||
#[ignore] | ||
fn test_tenure_change_and_extend_from_flashblocks() { |
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 am prob just misunderstanding the test, but I don't see any confirmation about a tenure change/extend being issued in the correct order in this test. Is the fact the follower boots up and the chain advances proof enough?
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.
Just a few questions.
…nction, and drop unused code
…cks-core into fix/burn-view
@@ -960,6 +980,7 @@ impl BlockMinerThread { | |||
self.burn_election_block.sortition_hash.as_bytes(), | |||
) | |||
} else { | |||
// TODO: shouldn't this be self.burn_block.sortition_hash? |
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 resolve this TODO in this PR. I'm not immediately sure what the correct answer is.
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 good. Just had some minor comments. I want to run this through some more live network testing before feeling 100% confident.
…und before extending the ongoing tenure if the miner produced the ongoing tenure
… the miner is "late" in doing so -- e.g. because a flashblock arrived
…f the miner produced the ongoing tenure (but only after a deadline), and to stop the tenure thread if the miner did not win sortition (even if continuation is later possible). If continuation is possible, then start a continuation thread if the ongoing tenure is still active.
We should run this against |
@@ -489,6 +504,7 @@ impl BlockMinerThread { | |||
// update mined-block counters and mined-tenure counters | |||
self.globals.counters.bump_naka_mined_blocks(); | |||
if self.last_block_mined.is_some() { | |||
// TODO: reviewers: should this be .is_none()? |
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.
Yes, I think it should be is_none()
.
The flakiness in develop has been resolved on |
Working on fixing |
This fixes the burn view calculation for the Nakamoto miner when accepting and broadcasting a block.
It builds atop #5508, so don't bother merging until #5508 is in
develop
.