follow #7961 and complete process proposal to spec

This commit is contained in:
Callum Waters
2022-07-28 15:17:13 +02:00
parent d9d6a2f513
commit 227db0267b
18 changed files with 747 additions and 440 deletions
+5
View File
@@ -261,3 +261,8 @@ func (app *CounterApplication) PrepareProposal(
req abci.RequestPrepareProposal) abci.ResponsePrepareProposal {
return abci.ResponsePrepareProposal{BlockData: req.BlockData}
}
func (app *CounterApplication) ProcessProposal(
req abci.RequestProcessProposal) abci.ResponseProcessProposal {
return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}
}
+2 -2
View File
@@ -1286,7 +1286,7 @@ func (cs *State) defaultDoPrevote(height int64, round int32) {
liveness properties. Please see `PrepareProosal`-`ProcessProposal` coherence and determinism
properties in the ABCI++ specification.
*/
stateMachineValidBlock, err := cs.blockExec.ProcessProposal(cs.ProposalBlock)
isAppValid, err := cs.blockExec.ProcessProposal(cs.ProposalBlock, cs.state)
if err != nil {
panic(fmt.Sprintf(
"state machine returned an error (%v) when calling ProcessProposal", err,
@@ -1294,7 +1294,7 @@ func (cs *State) defaultDoPrevote(height int64, round int32) {
}
// Vote nil if the Application rejected the block
if !stateMachineValidBlock {
if !isAppValid {
logger.Error("prevote step: state machine rejected a proposed block; this should not happen:"+
"the proposer may be misbehaving; prevoting nil", "err", err)
cs.signAddVote(tmproto.PrevoteType, nil, types.PartSetHeader{})