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
88e243d5
Unverified
Commit
88e243d5
authored
Dec 05, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e: Update output_cannon e2e test to execute a step and resolve the game.
parent
301e996d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
output_cannon_test.go
op-e2e/faultproofs/output_cannon_test.go
+22
-0
No files found.
op-e2e/faultproofs/output_cannon_test.go
View file @
88e243d5
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
op_e2e
"github.com/ethereum-optimism/optimism/op-e2e"
op_e2e
"github.com/ethereum-optimism/optimism/op-e2e"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/challenger"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/challenger"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/disputegame"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/disputegame"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
)
...
@@ -42,4 +43,25 @@ func TestOutputCannonGame(t *testing.T) {
...
@@ -42,4 +43,25 @@ func TestOutputCannonGame(t *testing.T) {
// Wait for the challenger to post the first claim in the cannon trace
// Wait for the challenger to post the first claim in the cannon trace
game
.
WaitForClaimAtDepth
(
ctx
,
int
(
splitDepth
+
1
))
game
.
WaitForClaimAtDepth
(
ctx
,
int
(
splitDepth
+
1
))
game
.
LogGameData
(
ctx
)
game
.
LogGameData
(
ctx
)
game
.
Attack
(
ctx
,
splitDepth
+
1
,
common
.
Hash
{
0x00
,
0xcc
})
gameDepth
:=
game
.
MaxDepth
(
ctx
)
for
i
:=
splitDepth
+
3
;
i
<
gameDepth
;
i
+=
2
{
// Wait for challenger to respond
game
.
WaitForClaimAtDepth
(
ctx
,
int
(
i
))
game
.
LogGameData
(
ctx
)
// Respond to push the game down to the max depth
game
.
Defend
(
ctx
,
i
,
common
.
Hash
{
0x00
,
0xdd
})
game
.
LogGameData
(
ctx
)
}
game
.
LogGameData
(
ctx
)
// Challenger should be able to call step and counter the leaf claim.
game
.
WaitForClaimAtMaxDepth
(
ctx
,
true
)
game
.
LogGameData
(
ctx
)
sys
.
TimeTravelClock
.
AdvanceTime
(
game
.
GameDuration
(
ctx
))
require
.
NoError
(
t
,
wait
.
ForNextBlock
(
ctx
,
l1Client
))
game
.
WaitForGameStatus
(
ctx
,
disputegame
.
StatusChallengerWins
)
}
}
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