-
Notifications
You must be signed in to change notification settings - Fork 671
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
Nakamoto Miner[3.0] - Finish signing in-progress block at the end of a tenure or reward cycle #4532
Comments
I saw this scenario happen in the nakamoto-1 testnet, and it caused a delay in block production:
|
This will require changes on the signer's end to not abort signing blocks if their tenure is expired (i.e. a to be signed stacks block could arrive after the burn block that indicates a new reward cycle has started) |
I think the simplest policy for this situation would be Option A: From the miner's perspective:
From the signers' perspective:
An alternative, Option B, would be to allow the miner to finish building the block it is currently building when it sees the new burn block. This would require the signers to have some grace period where they allow one new block proposal after they have seen the new burn block. From the miner's perspective:
From the signers' perspective:
I have a strong preference for Option A since it is significantly simpler and also potentially helps to encourage the miner to send blocks at a regular pace (i.e. the amount of work thrown away at the end of the tenure is small, since smaller blocks have been regularly built and proposed throughout the tenure). |
Yes -- I agree with Option A. |
Ok, it seems like Option A is already what is happening on both the miner and signer sides. I don't think we need any changes for that basic case. I have an integration test to verify this in #4919. |
The case I was primarily concerned about is no longer an issue. I think we can close this issue, though it's possible other cases are found with further testing. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Currently, when a new burn block arrives that kicks off a new reward cycle, both the miner and the signers will cancel the in-progress block. From the miner's perspective this looks like:
From the signer's perspective this looks like:
There are other timing variations of the above scenario (e.g. burn block arrives after signing is initiated, but before signing completes) . I believe with the Nakamoto design, we no longer need to have this race against the burn blocks. Instead, we should allow block B to complete, then the next miner should start its tenure building off of B.
At the end of a tenure which is not the end of a cycle, the miner will cancel block B, but the signer is not killed as it is in the above scenario, so they may complete the signing of the block. I'm not entirely sure exactly what happens in this case at the moment.
The text was updated successfully, but these errors were encountered: