Skip to content

Commit

Permalink
op-dispute-mon,op-challenger: Increase default monitoring window (#10659
Browse files Browse the repository at this point in the history
)

Ensures sufficient monitoring period even in the worst case of clock extension.
  • Loading branch information
ajsutton committed May 29, 2024
1 parent eb454ac commit 9336427
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion op-challenger/cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ func TestGameWindow(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)
})
}
Expand Down
7 changes: 4 additions & 3 deletions op-challenger/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ const (
DefaultAsteriscInfoFreq = uint(10_000_000)
// DefaultGameWindow is the default maximum time duration in the past
// that the challenger will look for games to progress.
// The default value is 15 days, which is an 8 day resolution buffer
// and bond claiming buffer plus the 7 day game finalization window.
DefaultGameWindow = time.Duration(15 * 24 * time.Hour)
// The default value is 28 days. The worst case duration for a game is 16 days
// (due to clock extension), plus 7 days WETH withdrawal delay leaving a 5 day
// buffer to monitor games to ensure bonds are claimed.
DefaultGameWindow = time.Duration(28 * 24 * time.Hour)
DefaultMaxPendingTx = 10
)

Expand Down
7 changes: 4 additions & 3 deletions op-dispute-mon/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ var (

const (
// DefaultGameWindow is the default maximum time duration in the past
// to look for games to monitor. The default value is 11 days, which
// is a 4 day resolution buffer plus the 7 day game finalization window.
DefaultGameWindow = time.Duration(11 * 24 * time.Hour)
// to look for games to monitor. The default value is 28 days. The worst case duration
// for a game is 16 days (due to clock extension), plus 7 days WETH withdrawal delay
// 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
// monitor will check for new games to monitor.
DefaultMonitorInterval = time.Second * 30
Expand Down

0 comments on commit 9336427

Please sign in to comment.