From 9169ea28ac66181aea1cefcf8316a4c941955e6e Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Thu, 22 Dec 2022 09:22:32 -0500 Subject: [PATCH] Revert "consensus: correctly save reference to previous height precommits (backport #9760) (#9775)" (#9945) This reverts commit 5703cc3455c45acc8be3400a25cf21c09267e7c4. --- CHANGELOG_PENDING.md | 1 - consensus/reactor.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 5edc5dd32..b87bdbc3c 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -46,7 +46,6 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi - [proto] \#9356 Migrate from `gogo/protobuf` to `cosmos/gogoproto` (@julienrbrt) - [rpc] \#9276 Added `header` and `header_by_hash` queries to the RPC client (@samricotta) - [abci] \#5706 Added `AbciVersion` to `RequestInfo` allowing applications to check ABCI version when connecting to Tendermint. (@marbar3778) -- [consensus] \#9760 Save peer LastCommit correctly to achieve 50% reduction in gossiped precommits. (@williambanfield) ### BUG FIXES diff --git a/consensus/reactor.go b/consensus/reactor.go index eec98c9f0..b0d3e3675 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -1294,7 +1294,6 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) { psRound := ps.PRS.Round psCatchupCommitRound := ps.PRS.CatchupCommitRound psCatchupCommit := ps.PRS.CatchupCommit - lastPrecommits := ps.PRS.Precommits startTime := tmtime.Now().Add(-1 * time.Duration(msg.SecondsSinceStartTime) * time.Second) ps.PRS.Height = msg.Height @@ -1322,7 +1321,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) { // Shift Precommits to LastCommit. if psHeight+1 == msg.Height && psRound == msg.LastCommitRound { ps.PRS.LastCommitRound = msg.LastCommitRound - ps.PRS.LastCommit = lastPrecommits + ps.PRS.LastCommit = ps.PRS.Precommits } else { ps.PRS.LastCommitRound = msg.LastCommitRound ps.PRS.LastCommit = nil