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
6433af96
Commit
6433af96
authored
Sep 27, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove maxDepth cheat
parent
633f2f66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
helper.go
op-e2e/e2eutils/disputegame/helper.go
+11
-4
No files found.
op-e2e/e2eutils/disputegame/helper.go
View file @
6433af96
...
...
@@ -4,7 +4,6 @@ import (
"context"
"encoding/binary"
"fmt"
"math"
"math/big"
"testing"
"time"
...
...
@@ -175,16 +174,24 @@ func (h *FactoryHelper) StartCannonGameWithCorrectRoot(ctx context.Context, roll
L2BlockNumber
:
challengedOutput
.
L2BlockNumber
,
}
maxDepth
:=
uint64
(
math
.
MaxUint64
)
cannonTypeAddr
,
err
:=
h
.
factory
.
GameImpls
(
opts
,
cannonGameType
)
h
.
require
.
NoError
(
err
,
"fetch cannon game type impl"
)
gameImpl
,
err
:=
bindings
.
NewFaultDisputeGameCaller
(
cannonTypeAddr
,
h
.
client
)
h
.
require
.
NoError
(
err
,
"bind fault dispute game caller"
)
maxDepth
,
err
:=
gameImpl
.
MAXGAMEDEPTH
(
opts
)
h
.
require
.
NoError
(
err
,
"fetch max game depth"
)
provider
:=
cannon
.
NewTraceProviderFromInputs
(
testlog
.
Logger
(
h
.
t
,
log
.
LvlInfo
)
.
New
(
"role"
,
"CorrectTrace"
),
metrics
.
NoopMetrics
,
cfg
,
inputs
,
cfg
.
Datadir
,
maxDepth
,
maxDepth
.
Uint64
()
,
)
pos
:=
faultTypes
.
NewPosition
(
int
(
maxDepth
),
int
(
maxDepth
))
pos
:=
faultTypes
.
NewPosition
(
int
(
maxDepth
.
Uint64
()),
int
(
maxDepth
.
Uint64
()
))
rootClaim
,
err
:=
provider
.
Get
(
ctx
,
pos
)
h
.
require
.
NoError
(
err
,
"Compute correct root hash"
)
// Override the VM status to claim the root is invalid
...
...
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