Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
df80b5d3
Unverified
Commit
df80b5d3
authored
Feb 23, 2024
by
Adrian Sutton
Committed by
GitHub
Feb 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-dispute-mon: Include the output root block number in unexpected game result error logs. (#9615)
parent
ca7b022f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
detector.go
op-dispute-mon/mon/detector.go
+4
-1
forecast.go
op-dispute-mon/mon/forecast.go
+12
-4
No files found.
op-dispute-mon/mon/detector.go
View file @
df80b5d3
...
...
@@ -76,7 +76,10 @@ func (d *detector) checkAgreement(ctx context.Context, addr common.Address, bloc
expectedResult
=
types
.
GameStatusChallengerWon
}
if
status
!=
expectedResult
{
d
.
logger
.
Error
(
"Unexpected game result"
,
"gameAddr"
,
addr
,
"expectedResult"
,
expectedResult
,
"actualResult"
,
status
,
"rootClaim"
,
rootClaim
,
"correctClaim"
,
expectedClaim
)
d
.
logger
.
Error
(
"Unexpected game result"
,
"gameAddr"
,
addr
,
"blockNum"
,
blockNum
,
"expectedResult"
,
expectedResult
,
"actualResult"
,
status
,
"rootClaim"
,
rootClaim
,
"correctClaim"
,
expectedClaim
)
}
}
return
batch
,
nil
...
...
op-dispute-mon/mon/forecast.go
View file @
df80b5d3
...
...
@@ -77,19 +77,27 @@ func (f *forecast) forecastGame(ctx context.Context, game monTypes.EnrichedGameD
// If we agree with the output root proposal, the Defender should win, defending that claim.
if
status
==
types
.
GameStatusChallengerWon
{
metrics
.
AgreeChallengerAhead
++
f
.
logger
.
Warn
(
"Forecasting unexpected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
f
.
logger
.
Warn
(
"Forecasting unexpected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"blockNum"
,
game
.
L2BlockNumber
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
}
else
{
metrics
.
AgreeDefenderAhead
++
f
.
logger
.
Debug
(
"Forecasting expected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
f
.
logger
.
Debug
(
"Forecasting expected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"blockNum"
,
game
.
L2BlockNumber
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
}
}
else
{
// If we disagree with the output root proposal, the Challenger should win, challenging that claim.
if
status
==
types
.
GameStatusDefenderWon
{
metrics
.
DisagreeDefenderAhead
++
f
.
logger
.
Warn
(
"Forecasting unexpected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
f
.
logger
.
Warn
(
"Forecasting unexpected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"blockNum"
,
game
.
L2BlockNumber
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
}
else
{
metrics
.
DisagreeChallengerAhead
++
f
.
logger
.
Debug
(
"Forecasting expected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
f
.
logger
.
Debug
(
"Forecasting expected game result"
,
"status"
,
status
,
"game"
,
game
.
Proxy
,
"blockNum"
,
game
.
L2BlockNumber
,
"rootClaim"
,
game
.
RootClaim
,
"expected"
,
expected
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment