Commit 93364273 authored by Adrian Sutton's avatar Adrian Sutton Committed by GitHub

op-dispute-mon,op-challenger: Increase default monitoring window (#10659)

Ensures sufficient monitoring period even in the worst case of clock extension.
parent eb454ac7
...@@ -660,7 +660,7 @@ func TestGameWindow(t *testing.T) { ...@@ -660,7 +660,7 @@ func TestGameWindow(t *testing.T) {
}) })
t.Run("ParsesDefault", func(t *testing.T) { t.Run("ParsesDefault", func(t *testing.T) {
cfg := configForArgs(t, addRequiredArgs(config.TraceTypeAlphabet, "--game-window=360h")) cfg := configForArgs(t, addRequiredArgs(config.TraceTypeAlphabet, "--game-window=672h"))
require.Equal(t, config.DefaultGameWindow, cfg.GameWindow) require.Equal(t, config.DefaultGameWindow, cfg.GameWindow)
}) })
} }
......
...@@ -96,9 +96,10 @@ const ( ...@@ -96,9 +96,10 @@ const (
DefaultAsteriscInfoFreq = uint(10_000_000) DefaultAsteriscInfoFreq = uint(10_000_000)
// DefaultGameWindow is the default maximum time duration in the past // DefaultGameWindow is the default maximum time duration in the past
// that the challenger will look for games to progress. // that the challenger will look for games to progress.
// The default value is 15 days, which is an 8 day resolution buffer // The default value is 28 days. The worst case duration for a game is 16 days
// and bond claiming buffer plus the 7 day game finalization window. // (due to clock extension), plus 7 days WETH withdrawal delay leaving a 5 day
DefaultGameWindow = time.Duration(15 * 24 * time.Hour) // buffer to monitor games to ensure bonds are claimed.
DefaultGameWindow = time.Duration(28 * 24 * time.Hour)
DefaultMaxPendingTx = 10 DefaultMaxPendingTx = 10
) )
......
...@@ -20,9 +20,10 @@ var ( ...@@ -20,9 +20,10 @@ var (
const ( const (
// DefaultGameWindow is the default maximum time duration in the past // DefaultGameWindow is the default maximum time duration in the past
// to look for games to monitor. The default value is 11 days, which // to look for games to monitor. The default value is 28 days. The worst case duration
// is a 4 day resolution buffer plus the 7 day game finalization window. // for a game is 16 days (due to clock extension), plus 7 days WETH withdrawal delay
DefaultGameWindow = time.Duration(11 * 24 * time.Hour) // leaving a 5 day buffer to monitor games after they should be fully resolved.
DefaultGameWindow = 28 * 24 * time.Hour
// DefaultMonitorInterval is the default interval at which the dispute // DefaultMonitorInterval is the default interval at which the dispute
// monitor will check for new games to monitor. // monitor will check for new games to monitor.
DefaultMonitorInterval = time.Second * 30 DefaultMonitorInterval = time.Second * 30
......
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