Commit 1812f168 authored by refcell's avatar refcell Committed by GitHub

fix(op-dispute-mon): Unresolved Claim Logging (#10394)

* fix(op-dispute-mon): unresolved claim logging

* fix(op-dispute-mon): lints

* fix(op-dispute-mon): unresolved claim logging

* fix(op-dispute-mon): move resolution response buffer to a constant
parent fc458665
...@@ -10,6 +10,8 @@ import ( ...@@ -10,6 +10,8 @@ import (
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
) )
const MaximumResolutionResponseBuffer = time.Minute
type RClock interface { type RClock interface {
Now() time.Time Now() time.Time
} }
...@@ -117,7 +119,11 @@ func (c *ClaimMonitor) checkGameClaims( ...@@ -117,7 +119,11 @@ func (c *ClaimMonitor) checkGameClaims(
} }
} else { } else {
if clockExpired { if clockExpired {
c.logger.Warn("Claim unresolved after clock expiration", "game", game.Proxy, "claimContractIndex", claim.ContractIndex) // SAFETY: accumulatedTime must be larger than or equal to maxChessTime since clockExpired
overflow := accumulatedTime - maxChessTime
if overflow >= MaximumResolutionResponseBuffer {
c.logger.Warn("Claim unresolved after clock expiration", "game", game.Proxy, "claimContractIndex", claim.ContractIndex, "delay", overflow)
}
if firstHalf { if firstHalf {
claimStatus[metrics.FirstHalfExpiredUnresolved]++ claimStatus[metrics.FirstHalfExpiredUnresolved]++
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment