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
go/consensus/tendermint: Implement {Prepare,Process}Proposal #5285
Conversation
f773431
to
0b287be
Compare
Off-topic: The upper comment and the code beneath are incorrect as I think that consensus parameters can also be changed in the |
dc262fc
to
9176a65
Compare
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.
Looks good to me!
The fixes made to the e2e tests should also hopefully reduce the flakiness.
I think Peter's extra logging idea in PrepareProposal
in go/consensus/tendermint/abci/mux.go
is good, but it might spam the logs too much, so it might be better to add it as a metric instead (but this can be done in a separate PR with perhaps a few other new metrics as well).
9176a65
to
6ec1051
Compare
Ugh, fuzzing E2E tests indicate this stuff is somewhat racy as this situation is possible after node kill/restart:
This seems to contradict the CometBFT spec which says:
|
Are both proposals (A and B) for the same round? |
Yes, both are for the same round, but B is a replay from the old node process (this happens when a node crashes or is killed and an old proposal is replayed). I believe it is as such because of how replay is implemented which first pushes a replay of the timeout event, triggering a new round and a new proposal being generated which fails on the signing step (as this would trigger double signing, but during replay the error is ignored), but then pushes the old proposal which is passed to ProcessProposal. |
74d37ac
to
398ecd7
Compare
Ok, seems to be fixed now, continuing to run the e2e fuzzing tests though. Also filed an issue upstream (cometbft/cometbft#1018). |
txs [][]byte, | ||
lastCommit types.CommitInfo, | ||
misbehavior []types.Misbehavior, | ||
) error { |
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.
) error { | |
) { |
398ecd7
to
b386216
Compare
This also makes the nodes execute the proposal in the prepare/process phase such that advanced modification (e.g. including meta transactions based on results) and validation (e.g. rejecting blocks with invalid transactions) becomes possible.
Previously the raw RequestBeginBlock request was distributed to the various consensus services. This could result in these services using invalid state (e.g. using the req.Hash in the proposal preparation phase when this data is not yet available). These requests are no longer propagated and any relevant state is made available through the block context.
b386216
to
732f12f
Compare
This also makes the nodes execute the proposal in the prepare/process phase such that advanced modification (e.g. including meta transactions based on results) and validation (e.g. rejecting blocks with invalid transactions) becomes possible (although these are not implemented here).