-
Notifications
You must be signed in to change notification settings - Fork 679
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
Ensure miner builds on its own blocks when reorging due to badly timed blocks #5691
Ensure miner builds on its own blocks when reorging due to badly timed blocks #5691
Conversation
I may have an update to this test that does replicate the problem. Will push another commit after further review. Please hold off reviews for now. |
…iming_secs` This now seems to reproduce the problem that we saw on mainnet. The problem persists in `develop`.
1607145 seems to reproduce this issue. The problem remains on |
This also still fails with #5515 applied. |
Without this change, when mining a fork (caused by unfortunate timing), the miner will never build off of its tenure change block. This change resolves this issue.
I've adjusted the miner to pass this test, but it uses |
Ensure that each block has the expected parent block in `allow_reorg_within_first_proposal_burn_block_timing_secs`.
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.
LGTM I think. Does this mean though that if a miner was unlucky in its timing...it basically makes its own tenure invalid by reorging the last block but then is unable to actually build any more blocks?
That is currently the case, where it reorgs the previous tenure with a tenure change block, but is then unable to build any more blocks. This PR makes it so that it will still reorg its own last tenure, but now it will be able to build more blocks. |
…rn_block_timing_secs
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
In this test, I attempted to reproduce the scenario we saw in mainnet, in which the miner mines a tenure change block in this reorg scenario, but then fails to mine another block building off of that one. I was unable to reproduce that behavior, but this still seems like a useful test to have.