alter permissiveness of latent tests and aggressiveness in validation to validate/negate hypothesis

This commit is contained in:
Cassandra Heart 2024-05-29 15:41:38 -05:00
parent 58456c1057
commit 838815882e
No known key found for this signature in database
GPG Key ID: 6352152859385958
2 changed files with 21 additions and 25 deletions

View File

@ -176,12 +176,6 @@ func (e *MasterClockConsensusEngine) handleSelfTestReport(
timestamp := binary.BigEndian.Uint64(proof[:8]) timestamp := binary.BigEndian.Uint64(proof[:8])
proof = proof[8:] proof = proof[8:]
// Ignore outdated reports, give 3 minutes + proof time for propagation
// delay
if int64(timestamp) < (time.Now().UnixMilli() - (480 * 1000)) {
return nil
}
challenge := binary.BigEndian.AppendUint64([]byte{}, report.MasterHeadFrame) challenge := binary.BigEndian.AppendUint64([]byte{}, report.MasterHeadFrame)
challenge = append(challenge, peerID...) challenge = append(challenge, peerID...)

View File

@ -491,6 +491,7 @@ type verifyChallenge struct {
func (e *MasterClockConsensusEngine) performVerifyTest( func (e *MasterClockConsensusEngine) performVerifyTest(
challenge verifyChallenge, challenge verifyChallenge,
) { ) {
go func() {
if !e.frameProver.VerifyChallengeProof( if !e.frameProver.VerifyChallengeProof(
challenge.challenge, challenge.challenge,
challenge.timestamp, challenge.timestamp,
@ -510,6 +511,7 @@ func (e *MasterClockConsensusEngine) performVerifyTest(
info := e.peerInfoManager.GetPeerInfo(challenge.peerID) info := e.peerInfoManager.GetPeerInfo(challenge.peerID)
info.LastSeen = time.Now().UnixMilli() info.LastSeen = time.Now().UnixMilli()
} }
}()
} }
func (e *MasterClockConsensusEngine) performBandwidthTest(peerID []byte) { func (e *MasterClockConsensusEngine) performBandwidthTest(peerID []byte) {