-
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
Miner can continue mining after an empty tenure followed by empty sortition #5411
Conversation
I think you might need to have 2 sep miners to get this to work. We need to
|
Yeah you may be right about needing 2 miners, but I swear this situation involved the same miner winning the first two blocks (though I should double check). I think it's also very possible that there was a different "root cause" in that case. |
… into fix/fast-block-test
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
…t in Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
343bdee
to
cf1d13c
Compare
…. Not the tip consensus hash as it may not match and will result in a bad signer slot generation when writing block proposal Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
… into fix/fast-block-test
It could have been done with one miner . It just was not happening because we were failing to produce an empty tenure as easily in the one miner case because of the boot to nakamoto logic. it def can be done. Having two miners makes it just a bit easier and allows a more expansive test as well :) |
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Nice, this is looking pretty good! |
Signed-off-by: Jacinta Ferrant <[email protected]>
…ock hash to form the parent_tenure_start Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Fix miner forking by being strict about sortition winners
… into fix/fast-block-test
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
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. |
(hopefully eventually)
This PR currently just contains an integration test to try and reproduce the scenario described in #5400.
The basic flow of the test is:
I thought this would reproduce the issue, but things seem fine - the miner creates a
TenureExtend
off of block A and signers approve it.JACINTA EDIT:
So I modified the logic to check during continue_tenure to see if we failed to produce any blocks in our tenure which means we really never issued a tenure extend. Now we issue one. I verified this works with multiple empty sortitions, and that we can build off this tenure change payload that shows up late essentially. I also ensured that we do issue a traditional tenure extend in the case where we successfully issued the tenure extend payload. This did require me to chagne the vrf proof generation to use the block election snapshot and not the current burn block to verify. I also found a bug in the way we were passing the election snapshot along (caused miners to never issue a block proposal at all because it would attempt to write to the wrong slot).
Now I know @kantai you wanted the miner to issue a continue tenure after the successful tenure change but I think this is a lot more complicated and has more edge cases that I don't like...Now I can continue to try this though if you think this fix is insufficient / or if there are edge cases that already exist that I am just not seeing.
Will see what CI does...hopefully haven't broken anything