From 808a26145bb69d27a9b59d3548c334e6aaf6ee10 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:29:30 +0100 Subject: [PATCH 1/9] refactor: remove unused LastPrecommits We don't need LastPrecommits because they are only used in Tenderdash to construct commit. In our case, it's enough to just set LastCommit, as we use threshold signatures and don't need these precommits. --- internal/consensus/block_executor.go | 1 - internal/consensus/gossiper.go | 4 -- internal/consensus/gossiper_test.go | 4 +- internal/consensus/peer_state.go | 8 +--- internal/consensus/reactor.go | 5 ++- internal/consensus/state_add_vote.go | 41 -------------------- internal/consensus/state_data.go | 10 +---- internal/consensus/types/peer_round_state.go | 6 +-- internal/consensus/types/round_state.go | 1 - 9 files changed, 9 insertions(+), 71 deletions(-) diff --git a/internal/consensus/block_executor.go b/internal/consensus/block_executor.go index 6a0e768857..e6a90098e4 100644 --- a/internal/consensus/block_executor.go +++ b/internal/consensus/block_executor.go @@ -42,7 +42,6 @@ func (c *blockExecutor) create(ctx context.Context, rs *cstypes.RoundState, roun // The commit is empty, but not nil. commit = types.NewCommit(0, 0, types.BlockID{}, nil, nil) case rs.LastCommit != nil: - // Make the commit from LastPrecommits commit = rs.LastCommit default: // This shouldn't happen. diff --git a/internal/consensus/gossiper.go b/internal/consensus/gossiper.go index 4a3dc5991c..c1ec94adb0 100644 --- a/internal/consensus/gossiper.go +++ b/internal/consensus/gossiper.go @@ -311,10 +311,6 @@ func (g *msgGossiper) ensurePeerPartSetHeader(blockPartSetHeader types.PartSetHe // there is a vote to send and (nil,false) otherwise. func (g *msgGossiper) pickVoteForGossip(rs cstypes.RoundState, prs *cstypes.PeerRoundState) (*types.Vote, bool) { var voteSets []*types.VoteSet - // if there are lastPrecommits to send - if prs.Step == cstypes.RoundStepNewHeight { - voteSets = append(voteSets, rs.LastPrecommits) - } if prs.Round != -1 && prs.Round <= rs.Round { // if there are POL prevotes to send if prs.Step <= cstypes.RoundStepPropose && prs.ProposalPOLRound != -1 { diff --git a/internal/consensus/gossiper_test.go b/internal/consensus/gossiper_test.go index 7007b31b2c..fc04ac89bf 100644 --- a/internal/consensus/gossiper_test.go +++ b/internal/consensus/gossiper_test.go @@ -471,8 +471,6 @@ func (suite *GossiperSuiteTest) TestGossipGossipVote() { defer cancel() precommitH99 := suite.makeSignedVote(99, 0, tmproto.PrecommitType) - lastPercommits := types.NewVoteSet(factory.DefaultTestChainID, 99, 0, tmproto.PrecommitType, suite.valSet) - _, _ = lastPercommits.AddVote(precommitH99) prevoteH100R0 := suite.makeSignedVote(100, 0, tmproto.PrevoteType) prevoteH100R1 := suite.makeSignedVote(100, 1, tmproto.PrevoteType) @@ -490,7 +488,7 @@ func (suite *GossiperSuiteTest) TestGossipGossipVote() { wantMsg *tmproto.Vote }{ { - rs: cstypes.RoundState{LastPrecommits: lastPercommits}, + rs: cstypes.RoundState{}, prs: cstypes.PeerRoundState{ Height: 100, Round: -1, diff --git a/internal/consensus/peer_state.go b/internal/consensus/peer_state.go index 607fc3be86..a060fc8104 100644 --- a/internal/consensus/peer_state.go +++ b/internal/consensus/peer_state.go @@ -268,7 +268,7 @@ func (ps *PeerState) getVoteBitArray(height int64, round int32, votesType tmprot return nil case tmproto.PrecommitType: - return ps.PRS.LastPrecommits + return ps.PRS.Precommits } } @@ -335,10 +335,6 @@ func (ps *PeerState) ensureVoteBitArrays(height int64, numValidators int) { if ps.PRS.ProposalPOL == nil { ps.PRS.ProposalPOL = bits.NewBitArray(numValidators) } - } else if ps.PRS.Height == height+1 { - if ps.PRS.LastPrecommits == nil { - ps.PRS.LastPrecommits = bits.NewBitArray(numValidators) - } } } @@ -530,10 +526,8 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) { // Shift Precommits to LastPrecommits. if psHeight+1 == msg.Height && psRound == msg.LastCommitRound { ps.PRS.LastCommitRound = msg.LastCommitRound - ps.PRS.LastPrecommits = ps.PRS.Precommits.Copy() } else { ps.PRS.LastCommitRound = msg.LastCommitRound - ps.PRS.LastPrecommits = nil } // we'll update the BitArray capacity later diff --git a/internal/consensus/reactor.go b/internal/consensus/reactor.go index d16e1c3543..48499df38b 100644 --- a/internal/consensus/reactor.go +++ b/internal/consensus/reactor.go @@ -682,7 +682,8 @@ func (r *Reactor) handleVoteMessage(ctx context.Context, envelope *p2p.Envelope, case *tmcons.Vote: stateData := r.state.stateDataStore.Get() isValidator := stateData.isValidator(r.state.privValidator.ProTxHash) - height, valSize, lastCommitSize := stateData.Height, stateData.Validators.Size(), stateData.LastPrecommits.Size() + height, valSize := stateData.Height, stateData.Validators.Size() + lastValSize := len(stateData.LastValidators.Validators) if isValidator { // ignore votes on non-validator nodes; TODO don't even send it vMsg := msgI.(*VoteMessage) @@ -692,7 +693,7 @@ func (r *Reactor) handleVoteMessage(ctx context.Context, envelope *p2p.Envelope, } ps.EnsureVoteBitArrays(height, valSize) - ps.EnsureVoteBitArrays(height-1, lastCommitSize) + ps.EnsureVoteBitArrays(height-1, lastValSize) if err := ps.SetHasVote(vMsg.Vote); err != nil { return err } diff --git a/internal/consensus/state_add_vote.go b/internal/consensus/state_add_vote.go index 26fc4c87f1..3374a1aa36 100644 --- a/internal/consensus/state_add_vote.go +++ b/internal/consensus/state_add_vote.go @@ -45,7 +45,6 @@ func newAddVoteAction(cs *State, ctrl *Controller, statsQueue *chanQueue[msgInfo statsMw := addVoteStatsMw(statsQueue) dispatchPrecommitMw := addVoteDispatchPrecommitMw(ctrl) verifyVoteExtensionMw := addVoteVerifyVoteExtensionMw(cs.privValidator, cs.blockExec, cs.metrics, cs.emitter) - addToLastPrecommitMw := addVoteToLastPrecommitMw(cs.eventPublisher, ctrl) return &AddVoteAction{ prevote: withVoterMws( addToVoteSet, @@ -62,7 +61,6 @@ func newAddVoteAction(cs *State, ctrl *Controller, statsQueue *chanQueue[msgInfo dispatchPrecommitMw, verifyVoteExtensionMw, validateVoteMw, - addToLastPrecommitMw, errorMw, statsMw, ), @@ -101,45 +99,6 @@ func addVoteToVoteSetFunc(metrics *Metrics, ep *EventPublisher) AddVoteFunc { } } -func addVoteToLastPrecommitMw(ep *EventPublisher, ctrl *Controller) AddVoteMiddlewareFunc { - return func(next AddVoteFunc) AddVoteFunc { - return func(ctx context.Context, stateData *StateData, vote *types.Vote) (bool, error) { - if vote.Height+1 != stateData.Height || vote.Type != tmproto.PrecommitType { - return next(ctx, stateData, vote) - } - logger := log.FromCtxOrNop(ctx) - if stateData.Step != cstypes.RoundStepNewHeight { - // Late precommit at prior height is ignored - logger.Trace("precommit vote came in after commit timeout and has been ignored") - return false, nil - } - if stateData.LastPrecommits == nil { - logger.Debug("no last round precommits on node", "vote", vote) - return false, nil - } - added, err := stateData.LastPrecommits.AddVote(vote) - if !added { - logger.Debug("vote not added to last precommits", logKeyValsWithError(nil, err)...) - return false, nil - } - logger.Trace("added vote to last precommits", "last_precommits", stateData.LastPrecommits) - - err = ep.PublishVoteEvent(vote) - if err != nil { - return added, err - } - - // if we can skip timeoutCommit and have all the votes now, - if stateData.bypassCommitTimeout() && stateData.LastPrecommits.HasAll() { - // go straight to new round (skip timeout commit) - // c.scheduleTimeout(time.Duration(0), c.Height, 0, cstypes.RoundStepNewHeight) - _ = ctrl.Dispatch(ctx, &EnterNewRoundEvent{Height: stateData.Height}, stateData) - } - return added, err - } - } -} - func addVoteUpdateValidBlockMw(ep *EventPublisher) AddVoteMiddlewareFunc { return func(next AddVoteFunc) AddVoteFunc { return func(ctx context.Context, stateData *StateData, vote *types.Vote) (bool, error) { diff --git a/internal/consensus/state_data.go b/internal/consensus/state_data.go index 519d60175a..984a62e56b 100644 --- a/internal/consensus/state_data.go +++ b/internal/consensus/state_data.go @@ -226,7 +226,6 @@ func (s *StateData) updateToState(state sm.State, commit *types.Commit) { switch { case state.LastBlockHeight == 0: // Very first commit should be empty. s.LastCommit = (*types.Commit)(nil) - s.LastPrecommits = (*types.VoteSet)(nil) case s.CommitRound > -1 && s.Votes != nil && commit == nil: // Otherwise, use cs.Votes if !s.Votes.Precommits(s.CommitRound).HasTwoThirdsMajority() { panic(fmt.Sprintf( @@ -234,14 +233,9 @@ func (s *StateData) updateToState(state sm.State, commit *types.Commit) { state.LastBlockHeight, s.CommitRound, s.Votes.Precommits(s.CommitRound), )) } - s.LastPrecommits = s.Votes.Precommits(s.CommitRound) - s.LastCommit = s.LastPrecommits.MakeCommit() + precommits := s.Votes.Precommits(s.CommitRound) + s.LastCommit = precommits.MakeCommit() case commit != nil: - // We either got the commit from a remote node - // In which Last precommits will be nil - // Or we got the commit from finalize commit - // In which Last precommits will not be nil - s.LastPrecommits = s.Votes.Precommits(s.CommitRound) s.LastCommit = commit case s.LastCommit == nil: // NOTE: when Tendermint starts, it has no votes. reconstructLastCommit diff --git a/internal/consensus/types/peer_round_state.go b/internal/consensus/types/peer_round_state.go index e5e2e3e6fb..4649e8f9af 100644 --- a/internal/consensus/types/peer_round_state.go +++ b/internal/consensus/types/peer_round_state.go @@ -34,7 +34,6 @@ type PeerRoundState struct { Prevotes *bits.BitArray `json:"prevotes"` // All votes peer has for this round Precommits *bits.BitArray `json:"precommits"` // All precommits peer has for this round LastCommitRound int32 `json:"last_commit_round"` // Round of commit for last height. -1 if none. - LastPrecommits *bits.BitArray `json:"last_commit"` // All commit precommits of commit for last height. HasCommit bool `json:"has_commit"` @@ -69,7 +68,6 @@ func (prs PeerRoundState) Copy() PeerRoundState { prs.ProposalPOL = prs.ProposalPOL.Copy() prs.Prevotes = prs.Prevotes.Copy() prs.Precommits = prs.Precommits.Copy() - prs.LastPrecommits = prs.LastPrecommits.Copy() prs.CatchupCommit = prs.CatchupCommit.Copy() return prs @@ -83,7 +81,7 @@ func (prs PeerRoundState) StringIndented(indent string) string { %s POL %v (round %v) %s Prevotes %v %s Precommits %v -%s LastPrecommits %v (round %v) +%s Last commit round %v %s Catchup %v (round %v) %s}`, indent, prs.Height, prs.Round, prs.Step, prs.StartTime, @@ -91,7 +89,7 @@ func (prs PeerRoundState) StringIndented(indent string) string { indent, prs.ProposalPOL, prs.ProposalPOLRound, indent, prs.Prevotes, indent, prs.Precommits, - indent, prs.LastPrecommits, prs.LastCommitRound, + indent, prs.LastCommitRound, indent, prs.CatchupCommit, prs.CatchupCommitRound, indent) } diff --git a/internal/consensus/types/round_state.go b/internal/consensus/types/round_state.go index 8c9181b9a0..1e93d8d8c7 100644 --- a/internal/consensus/types/round_state.go +++ b/internal/consensus/types/round_state.go @@ -103,7 +103,6 @@ type RoundState struct { ValidBlockParts *types.PartSet `json:"valid_block_parts"` Votes *HeightVoteSet `json:"votes"` CommitRound int32 `json:"commit_round"` - LastPrecommits *types.VoteSet `json:"last_precommits"` LastCommit *types.Commit `json:"last_commit"` LastValidators *types.ValidatorSet `json:"last_validators"` TriggeredTimeoutPrecommit bool `json:"triggered_timeout_precommit"` From 0de3757eca8a999bbc39d2f3726c4a113055ed2c Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:22:16 +0100 Subject: [PATCH 2/9] chore(consensus): remove unused function --- internal/consensus/msg_handlers.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/internal/consensus/msg_handlers.go b/internal/consensus/msg_handlers.go index 282becf5ef..3f25c3556c 100644 --- a/internal/consensus/msg_handlers.go +++ b/internal/consensus/msg_handlers.go @@ -185,13 +185,6 @@ func msgInfoWithCtxMiddleware() msgMiddlewareFunc { } } -func logKeyValsWithError(keyVals []any, err error) []any { - if err == nil { - return keyVals - } - return append(keyVals, "error", err) -} - func makeLogArgsFromMessage(msg Message) []any { switch m := msg.(type) { case *ProposalMessage: From 5fd554de2f68cd71ed758a0e1792c0ecbe539bf5 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:26:18 +0100 Subject: [PATCH 3/9] refactor!: remove consensus params commit timeout --- internal/consensus/reactor_test.go | 1 - internal/consensus/state.go | 5 +- internal/consensus/state_add_commit.go | 7 +- internal/consensus/state_add_vote.go | 2 +- internal/consensus/state_data.go | 23 +-- internal/consensus/state_test.go | 2 - internal/test/factory/params.go | 10 +- proto/tendermint/types/params.pb.go | 233 ++++++------------------- proto/tendermint/types/params.proto | 12 -- types/params.go | 52 ++---- types/params_test.go | 72 +++----- version/version.go | 2 +- 12 files changed, 112 insertions(+), 309 deletions(-) diff --git a/internal/consensus/reactor_test.go b/internal/consensus/reactor_test.go index 8d51c51e2f..b5a0a03a39 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -556,7 +556,6 @@ func TestReactorValidatorSetChanges(t *testing.T) { validatorUpdates: updates, consensusParams: factory.ConsensusParams(func(cp *types.ConsensusParams) { cp.Timeout.Propose = 2 * time.Second - cp.Timeout.Commit = 1 * time.Second cp.Timeout.Vote = 1 * time.Second }), } diff --git a/internal/consensus/state.go b/internal/consensus/state.go index 91af6fac30..edf21edf12 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -512,8 +512,9 @@ func (cs *State) OnStop() { if cs.GetRoundState().Step == cstypes.RoundStepApplyCommit { select { case <-cs.getOnStopCh(): - case <-time.After(stateData.state.ConsensusParams.Timeout.Commit): - cs.logger.Error("OnStop: timeout waiting for commit to finish", "time", stateData.state.ConsensusParams.Timeout.Commit) + case <-time.After(stateData.state.ConsensusParams.Timeout.Vote): + // we wait vote timeout, just in case + cs.logger.Error("OnStop: timeout waiting for commit to finish", "time", stateData.state.ConsensusParams.Timeout.Vote) } } diff --git a/internal/consensus/state_add_commit.go b/internal/consensus/state_add_commit.go index 17981f909f..3cfcfe70d4 100644 --- a/internal/consensus/state_add_commit.go +++ b/internal/consensus/state_add_commit.go @@ -47,9 +47,10 @@ func (c *AddCommitAction) Execute(ctx context.Context, stateEvent StateEvent) er if err != nil { return fmt.Errorf("error adding commit: %w", err) } - if stateData.bypassCommitTimeout() { - _ = stateEvent.Ctrl.Dispatch(ctx, &EnterNewRoundEvent{Height: stateData.Height}, stateData) - } + + // We go to next round, as in Tenderdash we don't need to wait for new commits + _ = stateEvent.Ctrl.Dispatch(ctx, &EnterNewRoundEvent{Height: stateData.Height}, stateData) + _ = c.statsQueue.send(ctx, msgInfoFromCtx(ctx)) return nil } diff --git a/internal/consensus/state_add_vote.go b/internal/consensus/state_add_vote.go index 3374a1aa36..d97fbf95cb 100644 --- a/internal/consensus/state_add_vote.go +++ b/internal/consensus/state_add_vote.go @@ -209,7 +209,7 @@ func addVoteDispatchPrecommitMw(ctrl *Controller) AddVoteMiddlewareFunc { return added, err } _ = ctrl.Dispatch(ctx, &EnterCommitEvent{Height: height, CommitRound: vote.Round}, stateData) - if stateData.bypassCommitTimeout() && precommits.HasAll() { + if precommits.HasTwoThirdsMajority() { _ = ctrl.Dispatch(ctx, &EnterNewRoundEvent{Height: stateData.Height}, stateData) } return added, err diff --git a/internal/consensus/state_data.go b/internal/consensus/state_data.go index 984a62e56b..edc5b038ea 100644 --- a/internal/consensus/state_data.go +++ b/internal/consensus/state_data.go @@ -260,13 +260,9 @@ func (s *StateData) updateToState(state sm.State, commit *types.Commit) { if s.CommitTime.IsZero() { // "Now" makes it easier to sync up dev nodes. - // We add timeoutCommit to allow transactions - // to be gathered for the first block. - // And alternative solution that relies on clocks: - // cs.StartTime = state.LastBlockTime.Add(timeoutCommit) - s.StartTime = s.commitTime(tmtime.Now()) + s.StartTime = tmtime.Now() } else { - s.StartTime = s.commitTime(s.CommitTime) + s.StartTime = s.CommitTime } if s.Validators == nil || !bytes.Equal(s.Validators.QuorumHash, validators.QuorumHash) { @@ -308,14 +304,6 @@ func (s *StateData) HeightVoteSet() (int64, *cstypes.HeightVoteSet) { return s.Height, s.Votes } -func (s *StateData) commitTime(t time.Time) time.Time { - c := s.state.ConsensusParams.Timeout.Commit - if s.config.UnsafeCommitTimeoutOverride != 0 { - c = s.config.UnsafeProposeTimeoutOverride - } - return t.Add(c) -} - func (s *StateData) proposalIsTimely() bool { if s.Height == s.state.InitialHeight { // by definition, initial block must have genesis time @@ -453,13 +441,6 @@ func (s *StateData) voteTimeout(round int32) time.Duration { ) * time.Nanosecond } -func (s *StateData) bypassCommitTimeout() bool { - if s.config.UnsafeBypassCommitTimeoutOverride != nil { - return *s.config.UnsafeBypassCommitTimeoutOverride - } - return s.state.ConsensusParams.Timeout.BypassCommitTimeout -} - func (s *StateData) isValidForPrevote() error { // Check that a proposed block was not received within this round (and thus executing this from a timeout). if s.ProposalBlock == nil { diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index e6420a1b30..ea3cda10af 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -2733,7 +2733,6 @@ func TestStartNextHeightCorrectlyAfterTimeout(t *testing.T) { cs1, vss := makeState(ctx, t, makeStateArgs{config: config}) stateData := cs1.GetStateData() - stateData.state.ConsensusParams.Timeout.BypassCommitTimeout = false err := stateData.Save() require.NoError(t, err) cs1.txNotifier = &fakeTxNotifier{ch: make(chan struct{})} @@ -2798,7 +2797,6 @@ func TestResetTimeoutPrecommitUponNewHeight(t *testing.T) { cs1, vss := makeState(ctx, t, makeStateArgs{config: config}) stateData := cs1.GetStateData() - stateData.state.ConsensusParams.Timeout.BypassCommitTimeout = false err := stateData.Save() require.NoError(t, err) diff --git a/internal/test/factory/params.go b/internal/test/factory/params.go index dcbe137a2e..b4d73727c4 100644 --- a/internal/test/factory/params.go +++ b/internal/test/factory/params.go @@ -11,12 +11,10 @@ import ( func ConsensusParams(opts ...func(*types.ConsensusParams)) *types.ConsensusParams { c := types.DefaultConsensusParams() c.Timeout = types.TimeoutParams{ - Commit: 10 * time.Millisecond, - Propose: 40 * time.Millisecond, - ProposeDelta: 1 * time.Millisecond, - Vote: 10 * time.Millisecond, - VoteDelta: 1 * time.Millisecond, - BypassCommitTimeout: true, + Propose: 40 * time.Millisecond, + ProposeDelta: 1 * time.Millisecond, + Vote: 10 * time.Millisecond, + VoteDelta: 1 * time.Millisecond, } for _, opt := range opts { opt(c) diff --git a/proto/tendermint/types/params.pb.go b/proto/tendermint/types/params.pb.go index 1d48708289..2b2c4813c0 100644 --- a/proto/tendermint/types/params.pb.go +++ b/proto/tendermint/types/params.pb.go @@ -487,16 +487,6 @@ type TimeoutParams struct { // to the next step immediately. Vote *time.Duration `protobuf:"bytes,3,opt,name=vote,proto3,stdduration" json:"vote,omitempty"` VoteDelta *time.Duration `protobuf:"bytes,4,opt,name=vote_delta,json=voteDelta,proto3,stdduration" json:"vote_delta,omitempty"` - // commit configures how long Tendermint will wait after receiving a quorum of - // precommits before beginning consensus for the next height. This can be - // used to allow slow precommits to arrive for inclusion in the next height before progressing. - Commit *time.Duration `protobuf:"bytes,5,opt,name=commit,proto3,stdduration" json:"commit,omitempty"` - // bypass_commit_timeout configures the node to proceed immediately to - // the next height once the node has received all precommits for a block, forgoing - // the remaining commit timeout. - // Setting bypass_commit_timeout false (the default) causes Tendermint to wait - // for the full commit timeout. - BypassCommitTimeout bool `protobuf:"varint,6,opt,name=bypass_commit_timeout,json=bypassCommitTimeout,proto3" json:"bypass_commit_timeout,omitempty"` } func (m *TimeoutParams) Reset() { *m = TimeoutParams{} } @@ -560,20 +550,6 @@ func (m *TimeoutParams) GetVoteDelta() *time.Duration { return nil } -func (m *TimeoutParams) GetCommit() *time.Duration { - if m != nil { - return m.Commit - } - return nil -} - -func (m *TimeoutParams) GetBypassCommitTimeout() bool { - if m != nil { - return m.BypassCommitTimeout - } - return false -} - // ABCIParams configure functionality specific to the Application Blockchain Interface. type ABCIParams struct { // Indicates if CheckTx should be called on all the transactions @@ -636,53 +612,51 @@ func init() { func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) } var fileDescriptor_e12598271a686f57 = []byte{ - // 731 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0xcf, 0x6e, 0xd3, 0x4a, - 0x14, 0xc6, 0xe3, 0x26, 0x4d, 0x93, 0x93, 0xa6, 0xa9, 0xe6, 0xde,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ab, 0x92, 0xea, 0x71, - 0x08, 0xed, 0x43, 0x65, 0x44, 0x13, 0x22, 0x8f, 0x81, 0x1b, 0x61, 0x21, 0x46, 0x8f, 0x01, 0xf8, - 0xaf, 0xf4, 0xad, 0x2c, 0x98, 0x03, 0x47, 0x72, 0xd3, 0xfb, 0x50, 0x75, 0x69, 0x10, 0xf8, 0x89, - 0x3c, 0x01, 0x6e, 0x64, 0xa5, 0x1c, 0xed, 0xc1, 0x3f, 0x4e, 0x16, 0x61, 0xc6, 0xec, 0x7c, 0xc1, - 0xbe, 0x7c, 0x14, 0xd4, 0xac, 0xbf, 0xf2, 0x62, 0x57, 0xd4, 0x64, 0xd0, 0xfa, 0x0e, 0xc0, 0xf4, - 0xbb, 0x46, 0x9b, 0x00, 0x31, 0x71, 0x07, 0xc4, 0x3d, 0xb1, 0x93, 0xb1, 0xc8, 0xbc, 0x66, 0xd5, - 0xe5, 0xca, 0xd1, 0xb8, 0x63, 0x7d, 0x9a, 0x68, 0xca, 0xe9, 0x44, 0x53, 0xce, 0x26, 0x9a, 0xf2, - 0x63, 0xa2, 0x29, 0xef, 0xcf, 0xb5, 0xd2, 0xd9, 0xb9, 0x56, 0xfa, 0x7a, 0xae, 0x95, 0x8e, 0xef, - 0x7a, 0x7e, 0x32, 0x48, 0x1d, 0xc3, 0xa5, 0x81, 0xd9, 0xc7, 0x6c, 0x10, 0xe1, 0xcc, 0xcc, 0x0f, - 0x11, 0x7e, 0x97, 0x1f, 0xfb, 0xe6, 0xfc, 0x5f, 0x89, 0x53, 0x15, 0xeb, 0xfb, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xaa, 0x0f, 0x78, 0xde, 0x65, 0x06, 0x00, 0x00, + // 692 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4c, + 0x14, 0xc5, 0xe3, 0x26, 0x6d, 0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0x43, 0x68, 0x1f, 0x6a, + 0x23, 0x9a, 0x11, 0x79, 0x0d, 0xfc, 0x13, 0x16, 0x62, 0xf4, 0x18, 0x80, 0xff, 0x4a, 0xdf, 0xda, + 0x82, 0x39, 0x70, 0x44, 0x98, 0x9a, 0xbb, 0x00, 0xd3, 0xa3, 0x86, 0xb6, 0x00, 0x52, 0xe2, 0x0f, + 0x88, 0x7f, 0xea, 0x66, 0x63, 0x11, 0x43, 0xdd, 0x69, 0xc8, 0x95, 0xe3, 0x71, 0xd7, 0xf9, 0x3c, + 0x31, 0xb4, 0xb3, 0x89, 0xa1, 0x9d, 0x4f, 0x0c, 0xed, 0xe7, 0xc4, 0xd0, 0x3e, 0x5c, 0x18, 0x95, + 0xf3, 0x0b, 0xa3, 0xf2, 0xed, 0xc2, 0xa8, 0x9c, 0xdc, 0x0b, 0xc2, 0x6c, 0x90, 0x7b, 0x96, 0x4f, + 0x23, 0xbb, 0x8f, 0xd9, 0x20, 0xc1, 0x85, 0x5d, 0x9e, 0x6b, 0xfe, 0x54, 0xde, 0xc4, 0xf6, 0xfc, + 0xed, 0xee, 0xad, 0x88, 0xf5, 0xfd, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xdf, 0xd1, 0x2a, + 0xf8, 0x05, 0x00, 0x00, } func (this *ConsensusParams) Equal(that interface{}) bool { @@ -958,18 +932,6 @@ func (this *TimeoutParams) Equal(that interface{}) bool { } else if that1.VoteDelta != nil { return false } - if this.Commit != nil && that1.Commit != nil { - if *this.Commit != *that1.Commit { - return false - } - } else if this.Commit != nil { - return false - } else if that1.Commit != nil { - return false - } - if this.BypassCommitTimeout != that1.BypassCommitTimeout { - return false - } return true } func (this *ABCIParams) Equal(that interface{}) bool { @@ -1333,64 +1295,44 @@ func (m *TimeoutParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.BypassCommitTimeout { - i-- - if m.BypassCommitTimeout { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.Commit != nil { - n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Commit, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit):]) + if m.VoteDelta != nil { + n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):]) if err11 != nil { return 0, err11 } i -= n11 i = encodeVarintParams(dAtA, i, uint64(n11)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } - if m.VoteDelta != nil { - n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):]) + if m.Vote != nil { + n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):]) if err12 != nil { return 0, err12 } i -= n12 i = encodeVarintParams(dAtA, i, uint64(n12)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } - if m.Vote != nil { - n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):]) + if m.ProposeDelta != nil { + n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):]) if err13 != nil { return 0, err13 } i -= n13 i = encodeVarintParams(dAtA, i, uint64(n13)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if m.ProposeDelta != nil { - n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):]) + if m.Propose != nil { + n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):]) if err14 != nil { return 0, err14 } i -= n14 i = encodeVarintParams(dAtA, i, uint64(n14)) i-- - dAtA[i] = 0x12 - } - if m.Propose != nil { - n15, err15 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):]) - if err15 != nil { - return 0, err15 - } - i -= n15 - i = encodeVarintParams(dAtA, i, uint64(n15)) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1590,13 +1532,6 @@ func (m *TimeoutParams) Size() (n int) { l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta) n += 1 + l + sovParams(uint64(l)) } - if m.Commit != nil { - l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit) - n += 1 + l + sovParams(uint64(l)) - } - if m.BypassCommitTimeout { - n += 2 - } return n } @@ -2663,62 +2598,6 @@ func (m *TimeoutParams) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commit == nil { - m.Commit = new(time.Duration) - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Commit, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BypassCommitTimeout", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BypassCommitTimeout = bool(v != 0) default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index 302ca71971..3fdb8a4557 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -115,18 +115,6 @@ message TimeoutParams { // to the next step immediately. google.protobuf.Duration vote = 3 [(gogoproto.stdduration) = true]; google.protobuf.Duration vote_delta = 4 [(gogoproto.stdduration) = true]; - - // commit configures how long Tendermint will wait after receiving a quorum of - // precommits before beginning consensus for the next height. This can be - // used to allow slow precommits to arrive for inclusion in the next height before progressing. - google.protobuf.Duration commit = 5 [(gogoproto.stdduration) = true]; - - // bypass_commit_timeout configures the node to proceed immediately to - // the next height once the node has received all precommits for a block, forgoing - // the remaining commit timeout. - // Setting bypass_commit_timeout false (the default) causes Tendermint to wait - // for the full commit timeout. - bool bypass_commit_timeout = 6; } // ABCIParams configure functionality specific to the Application Blockchain Interface. diff --git a/types/params.go b/types/params.go index 04ceda4693..5e6c65bd59 100644 --- a/types/params.go +++ b/types/params.go @@ -86,12 +86,10 @@ type SynchronyParams struct { // TimeoutParams configure the timings of the steps of the Tendermint consensus algorithm. type TimeoutParams struct { - Propose time.Duration `json:"propose,string"` - ProposeDelta time.Duration `json:"propose_delta,string"` - Vote time.Duration `json:"vote,string"` - VoteDelta time.Duration `json:"vote_delta,string"` - Commit time.Duration `json:"commit,string"` - BypassCommitTimeout bool `json:"bypass_commit_timeout"` + Propose time.Duration `json:"propose,string"` + ProposeDelta time.Duration `json:"propose_delta,string"` + Vote time.Duration `json:"vote,string"` + VoteDelta time.Duration `json:"vote_delta,string"` } // ABCIParams configure ABCI functionality specific to the Application Blockchain @@ -172,12 +170,10 @@ func (s SynchronyParams) SynchronyParamsOrDefaults() SynchronyParams { func DefaultTimeoutParams() TimeoutParams { return TimeoutParams{ - Propose: 3000 * time.Millisecond, - ProposeDelta: 500 * time.Millisecond, - Vote: 1000 * time.Millisecond, - VoteDelta: 500 * time.Millisecond, - Commit: 1000 * time.Millisecond, - BypassCommitTimeout: false, + Propose: 3000 * time.Millisecond, + ProposeDelta: 500 * time.Millisecond, + Vote: 1000 * time.Millisecond, + VoteDelta: 500 * time.Millisecond, } } @@ -207,9 +203,6 @@ func (t TimeoutParams) TimeoutParamsOrDefaults() TimeoutParams { if t.VoteDelta == 0 { t.VoteDelta = defaults.VoteDelta } - if t.Commit == 0 { - t.Commit = defaults.Commit - } return t } @@ -227,13 +220,6 @@ func (t TimeoutParams) VoteTimeout(round int32) time.Duration { ) * time.Nanosecond } -// CommitTime accepts ti, the time at which the consensus engine received +2/3 -// precommits for a block and returns the point in time at which the consensus -// engine should begin consensus on the next block. -func (t TimeoutParams) CommitTime(ti time.Time) time.Time { - return ti.Add(t.Commit) -} - func (val *ValidatorParams) IsValidPubkeyType(pubkeyType string) bool { for i := 0; i < len(val.PubKeyTypes); i++ { if val.PubKeyTypes[i] == pubkeyType { @@ -319,10 +305,6 @@ func (params ConsensusParams) ValidateConsensusParams() error { return fmt.Errorf("timeout.VoteDelta must be greater than 0. Got: %d", params.Timeout.VoteDelta) } - if params.Timeout.Commit <= 0 { - return fmt.Errorf("timeout.Commit must be greater than 0. Got: %d", params.Timeout.Commit) - } - if len(params.Validator.PubKeyTypes) == 0 { return errors.New("len(Validator.PubKeyTypes) must be greater than 0") } @@ -418,10 +400,6 @@ func (params ConsensusParams) UpdateConsensusParams(params2 *tmproto.ConsensusPa if params2.Timeout.VoteDelta != nil { res.Timeout.VoteDelta = *params2.Timeout.GetVoteDelta() } - if params2.Timeout.Commit != nil { - res.Timeout.Commit = *params2.Timeout.GetCommit() - } - res.Timeout.BypassCommitTimeout = params2.Timeout.GetBypassCommitTimeout() } if params2.Abci != nil { res.ABCI.RecheckTx = params2.Abci.GetRecheckTx() @@ -451,12 +429,10 @@ func (params *ConsensusParams) ToProto() tmproto.ConsensusParams { Precision: ¶ms.Synchrony.Precision, }, Timeout: &tmproto.TimeoutParams{ - Propose: ¶ms.Timeout.Propose, - ProposeDelta: ¶ms.Timeout.ProposeDelta, - Vote: ¶ms.Timeout.Vote, - VoteDelta: ¶ms.Timeout.VoteDelta, - Commit: ¶ms.Timeout.Commit, - BypassCommitTimeout: params.Timeout.BypassCommitTimeout, + Propose: ¶ms.Timeout.Propose, + ProposeDelta: ¶ms.Timeout.ProposeDelta, + Vote: ¶ms.Timeout.Vote, + VoteDelta: ¶ms.Timeout.VoteDelta, }, Abci: &tmproto.ABCIParams{ RecheckTx: params.ABCI.RecheckTx, @@ -503,10 +479,6 @@ func ConsensusParamsFromProto(pbParams tmproto.ConsensusParams) ConsensusParams if pbParams.Timeout.VoteDelta != nil { c.Timeout.VoteDelta = *pbParams.Timeout.GetVoteDelta() } - if pbParams.Timeout.Commit != nil { - c.Timeout.Commit = *pbParams.Timeout.GetCommit() - } - c.Timeout.BypassCommitTimeout = pbParams.Timeout.BypassCommitTimeout } if pbParams.Abci != nil { c.ABCI.RecheckTx = pbParams.Abci.GetRecheckTx() diff --git a/types/params_test.go b/types/params_test.go index 7e74c21315..a5abcfa6a4 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -173,21 +173,19 @@ func TestConsensusParamsValidation(t *testing.T) { } type makeParamsArgs struct { - blockBytes int64 - blockGas int64 - recheck bool - evidenceAge int64 - maxEvidenceBytes int64 - pubkeyTypes []string - precision time.Duration - messageDelay time.Duration - bypassCommitTimeout bool + blockBytes int64 + blockGas int64 + recheck bool + evidenceAge int64 + maxEvidenceBytes int64 + pubkeyTypes []string + precision time.Duration + messageDelay time.Duration propose *time.Duration proposeDelta *time.Duration vote *time.Duration voteDelta *time.Duration - commit *time.Duration } func makeParams(args makeParamsArgs) ConsensusParams { @@ -206,9 +204,7 @@ func makeParams(args makeParamsArgs) ConsensusParams { if args.voteDelta == nil { args.voteDelta = durationPtr(1) } - if args.commit == nil { - args.commit = durationPtr(1) - } + return ConsensusParams{ Block: BlockParams{ MaxBytes: args.blockBytes, @@ -227,12 +223,10 @@ func makeParams(args makeParamsArgs) ConsensusParams { MessageDelay: args.messageDelay, }, Timeout: TimeoutParams{ - Propose: *args.propose, - ProposeDelta: *args.proposeDelta, - Vote: *args.vote, - VoteDelta: *args.voteDelta, - Commit: *args.commit, - BypassCommitTimeout: args.bypassCommitTimeout, + Propose: *args.propose, + ProposeDelta: *args.proposeDelta, + Vote: *args.vote, + VoteDelta: *args.voteDelta, }, ABCI: ABCIParams{ RecheckTx: args.recheck, @@ -293,30 +287,24 @@ func TestConsensusParamsUpdate(t *testing.T) { { // update timeout params initialParams: makeParams(makeParamsArgs{ - propose: durationPtr(3 * time.Second), - proposeDelta: durationPtr(500 * time.Millisecond), - vote: durationPtr(time.Second), - voteDelta: durationPtr(500 * time.Millisecond), - commit: durationPtr(time.Second), - bypassCommitTimeout: false, + propose: durationPtr(3 * time.Second), + proposeDelta: durationPtr(500 * time.Millisecond), + vote: durationPtr(time.Second), + voteDelta: durationPtr(500 * time.Millisecond), }), updates: &tmproto.ConsensusParams{ Timeout: &tmproto.TimeoutParams{ - Propose: durationPtr(2 * time.Second), - ProposeDelta: durationPtr(400 * time.Millisecond), - Vote: durationPtr(5 * time.Second), - VoteDelta: durationPtr(400 * time.Millisecond), - Commit: durationPtr(time.Minute), - BypassCommitTimeout: true, + Propose: durationPtr(2 * time.Second), + ProposeDelta: durationPtr(400 * time.Millisecond), + Vote: durationPtr(5 * time.Second), + VoteDelta: durationPtr(400 * time.Millisecond), }, }, updatedParams: makeParams(makeParamsArgs{ - propose: durationPtr(2 * time.Second), - proposeDelta: durationPtr(400 * time.Millisecond), - vote: durationPtr(5 * time.Second), - voteDelta: durationPtr(400 * time.Millisecond), - commit: durationPtr(time.Minute), - bypassCommitTimeout: true, + propose: durationPtr(2 * time.Second), + proposeDelta: durationPtr(400 * time.Millisecond), + vote: durationPtr(5 * time.Second), + voteDelta: durationPtr(400 * time.Millisecond), }), }, // fine updates @@ -396,12 +384,10 @@ func TestProto(t *testing.T) { makeParams(makeParamsArgs{precision: time.Second, messageDelay: time.Minute}), makeParams(makeParamsArgs{precision: time.Nanosecond, messageDelay: time.Millisecond}), makeParams(makeParamsArgs{ - propose: durationPtr(2 * time.Second), - proposeDelta: durationPtr(400 * time.Millisecond), - vote: durationPtr(5 * time.Second), - voteDelta: durationPtr(400 * time.Millisecond), - commit: durationPtr(time.Minute), - bypassCommitTimeout: true, + propose: durationPtr(2 * time.Second), + proposeDelta: durationPtr(400 * time.Millisecond), + vote: durationPtr(5 * time.Second), + voteDelta: durationPtr(400 * time.Millisecond), }), } diff --git a/version/version.go b/version/version.go index 32920fa07a..2e555df1c1 100644 --- a/version/version.go +++ b/version/version.go @@ -11,7 +11,7 @@ const ( // when not using git describe. It is formatted with semantic versioning. TMVersionDefault = "0.14.0-dev.2" // ABCISemVer is the semantic version of the ABCI library - ABCISemVer = "0.25.1" + ABCISemVer = "0.26.1" ABCIVersion = ABCISemVer ) From 8dff0db056393d6b5bfb98fbf7dfc96567020e8b Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:24:54 +0100 Subject: [PATCH 4/9] chore: update version.go --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 2e555df1c1..206bb1716b 100644 --- a/version/version.go +++ b/version/version.go @@ -9,7 +9,7 @@ var ( const ( // TMVersionDefault is the used as the fallback version for Tenderdash // when not using git describe. It is formatted with semantic versioning. - TMVersionDefault = "0.14.0-dev.2" + TMVersionDefault = "0.14.0-dev.3" // ABCISemVer is the semantic version of the ABCI library ABCISemVer = "0.26.1" From 04d6d151d44c0c2b1bba99d58a621966b21cabcc Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:32:43 +0100 Subject: [PATCH 5/9] chore(proto): consensus params commit timeout settings marked as reserved --- proto/tendermint/types/params.pb.go | 92 +++++++++++++++-------------- proto/tendermint/types/params.proto | 4 ++ 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/proto/tendermint/types/params.pb.go b/proto/tendermint/types/params.pb.go index 2b2c4813c0..e8573e5a47 100644 --- a/proto/tendermint/types/params.pb.go +++ b/proto/tendermint/types/params.pb.go @@ -612,51 +612,53 @@ func init() { func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) } var fileDescriptor_e12598271a686f57 = []byte{ - // 692 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4c, - 0x14, 0xc5, 0xe3, 0x26, 0x6d, 0x93, 0x9b, 0xa6, 0xa9, 0x46, 0x9f, 0xf4, 0x99, 0x42, 0x9d, 0xe2, - 0x05, 0xaa, 0x54, 0xc9, 0xae, 0x28, 0x2c, 0x90, 0xf8, 0xa3, 0xa6, 0x41, 0x80, 0x50, 0x11, 0x32, - 0x15, 0x8b, 0x6e, 0xac, 0xb1, 0x33, 0x38, 0x56, 0x63, 0x8f, 0xe5, 0xb1, 0xa3, 0xf8, 0x01, 0xd8, - 0xb3, 0x42, 0x3c, 0x02, 0x6c, 0x78, 0x8e, 0x2e, 0xbb, 0x64, 0x05, 0x28, 0x7d, 0x11, 0x34, 0xe3, - 0x99, 0x86, 0xa4, 0x14, 0xb2, 0x4a, 0x3c, 0xf7, 0xfc, 0x7c, 0x3c, 0xe7, 0xde, 0x19, 0xd8, 0xca, - 0x48, 0xdc, 0x27, 0x69, 0x14, 0xc6, 0x99, 0x9d, 0x15, 0x09, 0x61, 0x76, 0x82, 0x53, 0x1c, 0x31, - 0x2b, 0x49, 0x69, 0x46, 0xd1, 0xc6, 0xb4, 0x6c, 0x89, 0xf2, 0xe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 0xed, 0xee, 0xad, 0x88, 0xf5, 0xfd, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xdf, 0xd1, 0x2a, - 0xf8, 0x05, 0x00, 0x00, + // 724 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0x4f, 0x6f, 0xd3, 0x48, + 0x18, 0xc6, 0xe3, 0xc6, 0xcd, 0x9f, 0x37, 0x4d, 0x13, 0x8d, 0x76, 0xb5, 0xde, 0xee, 0xd6, 0xe9, + 0xfa, 0xb0, 0xaa, 0x54, 0xc9, 0xae, 0xb6, 0xbb, 0x87, 0x95, 0xf8, 0xa3, 0xa6, 0x41, 0x40, 0x51, + 0x11, 0x32, 0x15, 0x87, 0x5e, 0xac, 0xb1, 0x33, 0x38, 0x56, 0x63, 0x8f, 0xe5, 0xb1, 0xa3, 0xf8, + 0x5b, 0x70, 0x42, 0x7c, 0x04, 0xb8, 0x20, 0x3e, 0x46, 0x8f, 0x3d, 0x72, 0x02, 0x94, 0x7e, 0x11, + 0x34, 0xe3, 0x71, 0x43, 0x52, 0x0a, 0x39, 0xc5, 0x33, 0xef, 0xf3, 0xf3, 0xe3, 0x79, 0xde, 0xd7, + 0x0e, 0x6c, 0xa7, 0x24, 0x1a, 0x92, 0x24, 0x0c, 0xa2, 0xd4, 0x4a, 0xf3, 0x98, 0x30, 0x2b, 0xc6, + 0x09, 0x0e, 0x99, 0x19, 0x27, 0x34, 0xa5, 0xa8, 0x3b, 0x2f, 0x9b, 0xa2, 0xbc, 0xf5, 0x8b, 0x4f, + 0x7d, 0x2a, 0x8a, 0x16, 0xbf, 0x2a, 0x74, 0x5b, 0xba, 0x4f, 0xa9, 0x3f, 0x26, 0x96, 0x58, 0xb9, + 0xd9, 0x4b, 0x6b, 0x98, 0x25, 0x38, 0x0d, 0x68, 0x54, 0xd4, 0x8d, 0xf7, 0x55, 0xe8, 0x1c,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 0x11, 0xb8, 0x35, 0xb1, 0x7f, 0xf0, 0x35, 0x00, 0x00, 0xff, 0xff, 0x17, 0x03, 0x59, 0x60, + 0x23, 0x06, 0x00, 0x00, } func (this *ConsensusParams) Equal(that interface{}) bool { diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index 3fdb8a4557..5d0ce28cc6 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -115,6 +115,10 @@ message TimeoutParams { // to the next step immediately. google.protobuf.Duration vote = 3 [(gogoproto.stdduration) = true]; google.protobuf.Duration vote_delta = 4 [(gogoproto.stdduration) = true]; + + // removed fields in 0.14 + reserved "commit", "bypass_commit_timeout"; + reserved 5, 6; } // ABCIParams configure functionality specific to the Application Blockchain Interface. From 15aa5222ff6505ed26b5db2be28e9bf2adcffa84 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:58:02 +0100 Subject: [PATCH 6/9] chore: backwards-compat removal of ConsensusParams.Timeout.Commit and ConsensusParams.Timeout.BypassCommitTimeout --- types/params.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/types/params.go b/types/params.go index 5e6c65bd59..3242f005fd 100644 --- a/types/params.go +++ b/types/params.go @@ -4,6 +4,7 @@ import ( "crypto/sha256" "errors" "fmt" + "os" "time" "github.com/dashpay/tenderdash/crypto/bls12381" @@ -90,6 +91,11 @@ type TimeoutParams struct { ProposeDelta time.Duration `json:"propose_delta,string"` Vote time.Duration `json:"vote,string"` VoteDelta time.Duration `json:"vote_delta,string"` + + // Unused, TODO: Remove in 0.15 + Commit time.Duration `json:"commit,string"` + // Unused, TODO: Remove in 0.15 + BypassCommitTimeout bool `json:"bypass_commit_timeout"` } // ABCIParams configure ABCI functionality specific to the Application Blockchain @@ -309,6 +315,15 @@ func (params ConsensusParams) ValidateConsensusParams() error { return errors.New("len(Validator.PubKeyTypes) must be greater than 0") } + // TODO: Remove in v0.15 + if params.Timeout.Commit != 0 { + fmt.Fprintln(os.Stderr, "WARNING: ConsensusParams.Timeout.Commit is not used and will be removed in v0.15") + } + // TODO: Remove in v0.15 + if params.Timeout.BypassCommitTimeout { + fmt.Fprintln(os.Stderr, "WARNING: ConsensusParams.Timeout.BypassCommitTimeout is not used and will be removed in v0.15") + } + // Check if keyType is a known ABCIPubKeyType for i := 0; i < len(params.Validator.PubKeyTypes); i++ { keyType := params.Validator.PubKeyTypes[i] From 0b186d26de9f8fc431b437d77ae631c48cddcfd4 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:48:51 +0100 Subject: [PATCH 7/9] test(consensus): remove gossip vote test for removed last precommits --- internal/consensus/gossiper_test.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/internal/consensus/gossiper_test.go b/internal/consensus/gossiper_test.go index fc04ac89bf..fdfb30e440 100644 --- a/internal/consensus/gossiper_test.go +++ b/internal/consensus/gossiper_test.go @@ -470,8 +470,6 @@ func (suite *GossiperSuiteTest) TestGossipGossipVote() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - precommitH99 := suite.makeSignedVote(99, 0, tmproto.PrecommitType) - prevoteH100R0 := suite.makeSignedVote(100, 0, tmproto.PrevoteType) prevoteH100R1 := suite.makeSignedVote(100, 1, tmproto.PrevoteType) prevoteH100R2 := suite.makeSignedVote(100, 2, tmproto.PrevoteType) @@ -487,16 +485,6 @@ func (suite *GossiperSuiteTest) TestGossipGossipVote() { prs cstypes.PeerRoundState wantMsg *tmproto.Vote }{ - { - rs: cstypes.RoundState{}, - prs: cstypes.PeerRoundState{ - Height: 100, - Round: -1, - ProposalPOLRound: -1, - Step: cstypes.RoundStepNewHeight, - }, - wantMsg: precommitH99.ToProto(), - }, { rs: cstypes.RoundState{Votes: votesH100}, prs: cstypes.PeerRoundState{ From d60bd6dfda6543a78e0401064c731fd32de43b59 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:02:18 +0100 Subject: [PATCH 8/9] test(state): remove commit timeout from test genesis --- config/toml.go | 4 +--- internal/state/state_test.go | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/config/toml.go b/config/toml.go index 7eb8bcc845..3f1d27467e 100644 --- a/config/toml.go +++ b/config/toml.go @@ -664,9 +664,7 @@ const testGenesisFmt = `{ "propose": "30000000", "propose_delta": "50000", "vote": "30000000", - "vote_delta": "50000", - "commit": "10000000", - "bypass_timeout_commit": true + "vote_delta": "50000" }, "evidence": { "max_age_num_blocks": "100000", diff --git a/internal/state/state_test.go b/internal/state/state_test.go index 7d77af19ca..ebf3d17701 100644 --- a/internal/state/state_test.go +++ b/internal/state/state_test.go @@ -1100,20 +1100,22 @@ func TestStateProto(t *testing.T) { for _, tt := range tc { tt := tt - pbs, err := tt.state.ToProto() - if !tt.expPass1 { - assert.Error(t, err) - } else { - assert.NoError(t, err, tt.testName) - } + t.Run(tt.testName, func(t *testing.T) { + pbs, err := tt.state.ToProto() + if !tt.expPass1 { + assert.Error(t, err) + } else { + assert.NoError(t, err, tt.testName) + } - smt, err := sm.FromProto(pbs) - if tt.expPass2 { - require.NoError(t, err, tt.testName) - require.Equal(t, tt.state, smt, tt.testName) - } else { - require.Error(t, err, tt.testName) - } + smt, err := sm.FromProto(pbs) + if tt.expPass2 { + require.NoError(t, err, tt.testName) + require.Equal(t, tt.state, smt, tt.testName) + } else { + require.Error(t, err, tt.testName) + } + }) } } From 6ce127140e15c3784f516ff3a32981643ca1c830 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:26:16 +0100 Subject: [PATCH 9/9] test(e2e): bump TestApp_TxTooBig timeout to 2 mins --- test/e2e/tests/app_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/app_test.go b/test/e2e/tests/app_test.go index 470c523bfe..b14e1ef684 100644 --- a/test/e2e/tests/app_test.go +++ b/test/e2e/tests/app_test.go @@ -218,7 +218,7 @@ func TestApp_TxTooBig(t *testing.T) { /// Timeout to read response from single node const readTimeout = 1 * time.Second /// Time to process whole mempool - const includeInBlockTimeout = 75 * time.Second + const includeInBlockTimeout = 120 * time.Second mainCtx, cancel := context.WithCancel(context.Background()) defer cancel()