diff --git a/consensus/XDPoS/engines/engine_v2/engine.go b/consensus/XDPoS/engines/engine_v2/engine.go index 9cc25d7fab..0b05d7e8c1 100644 --- a/consensus/XDPoS/engines/engine_v2/engine.go +++ b/consensus/XDPoS/engines/engine_v2/engine.go @@ -654,6 +654,10 @@ func (x *XDPoS_v2) VoteHandler(chain consensus.ChainReader, voteMsg *types.Vote) 3. Broadcast(Not part of consensus) */ func (x *XDPoS_v2) VerifyTimeoutMessage(chain consensus.ChainReader, timeoutMsg *types.Timeout) (bool, error) { + if timeoutMsg.Round <= x.currentRound { + log.Debug("[VerifyTimeoutMessage] Disqualified timeout message as the proposed round does not match currentRound", "timeoutHash", timeoutMsg.Hash(), "timeoutRound", timeoutMsg.Round, "currentRound", x.currentRound) + return false, nil + } snap, err := x.getSnapshot(chain, timeoutMsg.GapNumber, true) if err != nil || snap == nil { log.Error("[VerifyTimeoutMessage] Fail to get snapshot when verifying timeout message!", "messageGapNumber", timeoutMsg.GapNumber, "err", err) diff --git a/consensus/XDPoS/engines/engine_v2/forensics.go b/consensus/XDPoS/engines/engine_v2/forensics.go index 1c4542ab0e..df551a498f 100644 --- a/consensus/XDPoS/engines/engine_v2/forensics.go +++ b/consensus/XDPoS/engines/engine_v2/forensics.go @@ -86,6 +86,7 @@ Forensics runs in a seperate go routine as its no system critical Link to the flow diagram: https://hashlabs.atlassian.net/wiki/spaces/HASHLABS/pages/97878029/Forensics+Diagram+flow */ func (f *Forensics) ProcessForensics(chain consensus.ChainReader, engine *XDPoS_v2, incomingQC types.QuorumCert) error { + return nil log.Debug("Received a QC in forensics", "QC", incomingQC) // Clone the values to a temporary variable highestCommittedQCs := f.HighestCommittedQCs @@ -393,6 +394,7 @@ Forensics runs in a seperate go routine as its no system critical Link to the flow diagram: https://hashlabs.atlassian.net/wiki/spaces/HASHLABS/pages/99516417/Vote+Equivocation+detection+specification */ func (f *Forensics) ProcessVoteEquivocation(chain consensus.ChainReader, engine *XDPoS_v2, incomingVote *types.Vote) error { + return nil log.Debug("Received a vote in forensics", "vote", incomingVote) // Clone the values to a temporary variable highestCommittedQCs := f.HighestCommittedQCs @@ -483,6 +485,7 @@ func (f *Forensics) isVoteBlamed(chain consensus.ChainReader, highestCommittedQC } func (f *Forensics) DetectEquivocationInVotePool(vote *types.Vote, votePool *utils.Pool) { + return poolKey := vote.PoolKey() votePoolKeys := votePool.PoolObjKeysList() signer, err := GetVoteSignerAddresses(vote) diff --git a/eth/peer.go b/eth/peer.go index aa846a797e..8035f2a9f0 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -77,7 +77,7 @@ type peer struct { knownVote mapset.Set // Set of BFT Vote known to be known by this peer knownTimeout mapset.Set // Set of BFT timeout known to be known by this peer - knownSyncInfo mapset.Set // Set of BFT Sync Info known to be known by this peer` + knownSyncInfo mapset.Set // Set of BFT Sync Info known to be known by this peer } func newPeer(version int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer { diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 3b4ff04122..16a87c9810 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -106,7 +106,7 @@ var Flags = []cli.Flag{ //blockprofilerateFlag, cpuprofileFlag, //traceFlag, - //periodicProfilingFlag, + periodicProfilingFlag, debugDataDirFlag, } diff --git a/params/config.go b/params/config.go index 650722c4af..a68b80a74d 100644 --- a/params/config.go +++ b/params/config.go @@ -48,6 +48,14 @@ var ( TimeoutPeriod: 30, MinePeriod: 2, }, + 2000: { + MaxMasternodes: 108, + SwitchRound: 2000, + CertThreshold: 0.667, + TimeoutSyncThreshold: 2, + TimeoutPeriod: 600, + MinePeriod: 2, + }, } TestnetV2Configs = map[uint64]*V2Config{ diff --git a/params/version.go b/params/version.go index 1b5dea34b2..7cfed1a11a 100644 --- a/params/version.go +++ b/params/version.go @@ -22,7 +22,7 @@ import ( const ( VersionMajor = 2 // Major version component of the current release - VersionMinor = 0 // Minor version component of the current release + VersionMinor = 2 // Minor version component of the current release VersionPatch = 0 // Patch version component of the current release VersionMeta = "stable" // Version metadata to append to the version string )