diff --git a/consensus/consensus_v2.go b/consensus/consensus_v2.go index dfcce475a..bf58e5aaa 100644 --- a/consensus/consensus_v2.go +++ b/consensus/consensus_v2.go @@ -32,10 +32,10 @@ var ( // timeout constant const ( // CommitSigSenderTimeout is the timeout for sending the commit sig to finish block proposal - CommitSigSenderTimeout = 6 * time.Second + CommitSigSenderTimeout = 10 * time.Second // CommitSigReceiverTimeout is the timeout for the receiving side of the commit sig // if timeout, the receiver should instead ready directly from db for the commit sig - CommitSigReceiverTimeout = 4 * time.Second + CommitSigReceiverTimeout = 8 * time.Second ) // IsViewChangingMode return true if curernt mode is viewchanging diff --git a/consensus/leader.go b/consensus/leader.go index 22313885a..ea331f8b1 100644 --- a/consensus/leader.go +++ b/consensus/leader.go @@ -211,6 +211,17 @@ func (consensus *Consensus) onCommit(msg *msg_pb.Message) { if !consensus.isRightBlockNumAndViewID(recvMsg) { return } + // proceed only when the message is not received before + for _, signer := range recvMsg.SenderPubkeys { + signed := consensus.Decider.ReadBallot(quorum.Commit, signer.Bytes) + if signed != nil { + consensus.getLogger().Debug(). + Str("validatorPubKey", signer.Bytes.Hex()). + Msg("[OnCommit] Already Received commit message from the validator") + return + } + } + commitBitmap := consensus.commitBitmap // has to be called before verifying signature diff --git a/internal/chain/reward.go b/internal/chain/reward.go index eeaf1e873..10c1cae30 100644 --- a/internal/chain/reward.go +++ b/internal/chain/reward.go @@ -31,7 +31,7 @@ import ( // timeout constant const ( // AsyncBlockProposalTimeout is the timeout which will abort the async block proposal. - AsyncBlockProposalTimeout = 5 * time.Second + AsyncBlockProposalTimeout = 9 * time.Second ) func ballotResultBeaconchain(