mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Mainnet debug (#655)
* intro new timeout (#651) * intro new timeout * correct comment * disable ProcessForensics * disable ProcessForensics * change version * enable periodicProfilingFlag * fix: ignore old timeout msg * fix: ignore old timeout msg including equal to the current round * udpate version file
This commit is contained in:
parent
3fb1a015e0
commit
9751e41dd5
6 changed files with 18 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ var Flags = []cli.Flag{
|
|||
//blockprofilerateFlag,
|
||||
cpuprofileFlag,
|
||||
//traceFlag,
|
||||
//periodicProfilingFlag,
|
||||
periodicProfilingFlag,
|
||||
debugDataDirFlag,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue