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
PrepareProposal/ProcessProposal invocation during replay inconsistent with spec #1018
Comments
Are you sure that this happens? Or are you referring to |
Yes, we have observed the replay process producing a timeout event which causes CometBFT to invoke |
So, during the regular operation the application produces When the node is restarted, it replays the conditions for starting the same round, therefore it invokes The problem, I assume, is that since the proposal for I cannot see, however, a situation in which |
Yeah in that case the best thing would be to update the spec to explicitly mention that this can happen. |
I still think the wording here is wrong. The replayed proposal is passed to |
The actual sequence should include the event that happened before the crash, i.e., the first step here should be |
In other words, we have two invocations of |
Oops sorry, yeah that was supposed to say ProcessProposal. |
If we introduce rounds on |
Some info on the reason for closing this issue for now. After some internal discussions on the best way to tackle this, we decided that the best alternative was to fix the specification so that the replay case was properly covered (the spec as it was when this issue was created was inconsistent with the implementation). This work was done in #1033. The main reason we went for this option in the short term is that fixing this problem in the Consensus replay implementation (which would allow us to keep the spec as it was) is far from trivial as you can appreciate from #1035. |
Sounds like the right solution to me. Thanks! |
During our E2E fuzz testing using the CometBFT 0.37.x branch, where one of the tests is randomly killing and restarting nodes, it seems that PrepareProposal/ProcessProposal invocation during replay is inconsistent with the spec.
The spec currently says:
However, it seems that there is an edge case with the following scenario:
PrepareProposal
, generates and broadcasts the proposal (proposal A). Then the node crashes/is killed.PrepareProposal
again, generating a new proposal B. Since signing this proposal would be an equivocation, the proposal is dropped.ProcessProposal
.This seems to contradict the specification, because based on it the following sequence would be expected in this scenario:
However, the actual sequence is:
So either the specification needs to be updated to clarify that these other sequences are possible or the implementation should be fixed.
The text was updated successfully, but these errors were encountered: