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
874c0e98
Unverified
Commit
874c0e98
authored
Sep 26, 2024
by
Minhyuk Kim
Committed by
GitHub
Sep 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make honestActorConfig public so that it can be used in asterisc e2e tests (#12108)
parent
2d1f41c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
output_cannon_helper.go
op-e2e/e2eutils/disputegame/output_cannon_helper.go
+16
-16
No files found.
op-e2e/e2eutils/disputegame/output_cannon_helper.go
View file @
874c0e98
...
...
@@ -47,23 +47,23 @@ func (g *OutputCannonGameHelper) StartChallenger(ctx context.Context, name strin
return
c
}
type
h
onestActorConfig
struct
{
p
restateBlock
uint64
p
oststateBlock
uint64
c
hallengerOpts
[]
challenger
.
Option
type
H
onestActorConfig
struct
{
P
restateBlock
uint64
P
oststateBlock
uint64
C
hallengerOpts
[]
challenger
.
Option
}
type
HonestActorOpt
func
(
cfg
*
h
onestActorConfig
)
type
HonestActorOpt
func
(
cfg
*
H
onestActorConfig
)
func
WithClaimedL2BlockNumber
(
num
uint64
)
HonestActorOpt
{
return
func
(
cfg
*
h
onestActorConfig
)
{
cfg
.
p
oststateBlock
=
num
return
func
(
cfg
*
H
onestActorConfig
)
{
cfg
.
P
oststateBlock
=
num
}
}
func
WithPrivKey
(
privKey
*
ecdsa
.
PrivateKey
)
HonestActorOpt
{
return
func
(
cfg
*
h
onestActorConfig
)
{
cfg
.
challengerOpts
=
append
(
cfg
.
c
hallengerOpts
,
challenger
.
WithPrivKey
(
privKey
))
return
func
(
cfg
*
H
onestActorConfig
)
{
cfg
.
ChallengerOpts
=
append
(
cfg
.
C
hallengerOpts
,
challenger
.
WithPrivKey
(
privKey
))
}
}
...
...
@@ -75,21 +75,21 @@ func (g *OutputCannonGameHelper) CreateHonestActor(ctx context.Context, l2Node s
g
.
Require
.
NoError
(
err
,
"Failed to load block range"
)
splitDepth
:=
g
.
SplitDepth
(
ctx
)
rollupClient
:=
g
.
System
.
RollupClient
(
l2Node
)
actorCfg
:=
&
h
onestActorConfig
{
p
restateBlock
:
realPrestateBlock
,
p
oststateBlock
:
realPostStateBlock
,
c
hallengerOpts
:
g
.
defaultChallengerOptions
(),
actorCfg
:=
&
H
onestActorConfig
{
P
restateBlock
:
realPrestateBlock
,
P
oststateBlock
:
realPostStateBlock
,
C
hallengerOpts
:
g
.
defaultChallengerOptions
(),
}
for
_
,
option
:=
range
options
{
option
(
actorCfg
)
}
cfg
:=
challenger
.
NewChallengerConfig
(
g
.
T
,
g
.
System
,
l2Node
,
actorCfg
.
c
hallengerOpts
...
)
cfg
:=
challenger
.
NewChallengerConfig
(
g
.
T
,
g
.
System
,
l2Node
,
actorCfg
.
C
hallengerOpts
...
)
dir
:=
filepath
.
Join
(
cfg
.
Datadir
,
"honest"
)
prestateProvider
:=
outputs
.
NewPrestateProvider
(
rollupClient
,
actorCfg
.
p
restateBlock
)
prestateProvider
:=
outputs
.
NewPrestateProvider
(
rollupClient
,
actorCfg
.
P
restateBlock
)
l1Head
:=
g
.
GetL1Head
(
ctx
)
accessor
,
err
:=
outputs
.
NewOutputCannonTraceAccessor
(
logger
,
metrics
.
NoopMetrics
,
cfg
.
Cannon
,
vm
.
NewOpProgramServerExecutor
(),
l2Client
,
prestateProvider
,
cfg
.
CannonAbsolutePreState
,
rollupClient
,
dir
,
l1Head
,
splitDepth
,
actorCfg
.
prestateBlock
,
actorCfg
.
p
oststateBlock
)
logger
,
metrics
.
NoopMetrics
,
cfg
.
Cannon
,
vm
.
NewOpProgramServerExecutor
(),
l2Client
,
prestateProvider
,
cfg
.
CannonAbsolutePreState
,
rollupClient
,
dir
,
l1Head
,
splitDepth
,
actorCfg
.
PrestateBlock
,
actorCfg
.
P
oststateBlock
)
g
.
Require
.
NoError
(
err
,
"Failed to create output cannon trace accessor"
)
return
NewOutputHonestHelper
(
g
.
T
,
g
.
Require
,
&
g
.
OutputGameHelper
,
g
.
Game
,
accessor
)
}
...
...
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