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
68b52398
Unverified
Commit
68b52398
authored
Sep 18, 2024
by
Hamdi Allam
Committed by
GitHub
Sep 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update op-e2e setup (#11857)
parent
924896be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
setup.go
op-e2e/system/e2esys/setup.go
+28
-4
No files found.
op-e2e/system/e2esys/setup.go
View file @
68b52398
...
@@ -33,6 +33,7 @@ import (
...
@@ -33,6 +33,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/node"
...
@@ -266,6 +267,9 @@ type SystemConfig struct {
...
@@ -266,6 +267,9 @@ type SystemConfig struct {
// Explicitly disable batcher, for tests that rely on unsafe L2 payloads
// Explicitly disable batcher, for tests that rely on unsafe L2 payloads
DisableBatcher
bool
DisableBatcher
bool
// Explicitly disable setting `RollupSequencerHTTP` to forward txs from sentry nodes
DisableTxForwarder
bool
// Configure data-availability type that is used by the batcher.
// Configure data-availability type that is used by the batcher.
DataAvailabilityType
batcherFlags
.
DataAvailabilityType
DataAvailabilityType
batcherFlags
.
DataAvailabilityType
...
@@ -610,25 +614,44 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
...
@@ -610,25 +614,44 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
return
nil
,
err
return
nil
,
err
}
}
// Ordered such that the Sequencer is initialized first. Setup this way so that
// the `RollupSequencerHTTP` GethOption can be supplied to any sentry nodes.
l2Nodes
:=
[]
string
{
RoleSeq
}
for
name
:=
range
cfg
.
Nodes
{
for
name
:=
range
cfg
.
Nodes
{
if
name
==
Role
L1
{
if
name
==
Role
Seq
{
return
nil
,
fmt
.
Errorf
(
"node name %s is reserved for L1 node"
,
RoleL1
)
continue
}
}
l2Nodes
=
append
(
l2Nodes
,
name
)
}
for
_
,
name
:=
range
l2Nodes
{
var
ethClient
services
.
EthInstance
var
ethClient
services
.
EthInstance
if
cfg
.
ExternalL2Shim
==
""
{
if
cfg
.
ExternalL2Shim
==
""
{
if
name
!=
RoleSeq
&&
!
cfg
.
DisableTxForwarder
{
cfg
.
GethOptions
[
name
]
=
append
(
cfg
.
GethOptions
[
name
],
func
(
ethCfg
*
ethconfig
.
Config
,
nodeCfg
*
node
.
Config
)
error
{
ethCfg
.
RollupSequencerHTTP
=
sys
.
EthInstances
[
RoleSeq
]
.
UserRPC
()
.
RPC
()
return
nil
})
}
l2Geth
,
err
:=
geth
.
InitL2
(
name
,
l2Genesis
,
cfg
.
JWTFilePath
,
cfg
.
GethOptions
[
name
]
...
)
l2Geth
,
err
:=
geth
.
InitL2
(
name
,
l2Genesis
,
cfg
.
JWTFilePath
,
cfg
.
GethOptions
[
name
]
...
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
err
=
l2Geth
.
Node
.
Start
()
if
err
:=
l2Geth
.
Node
.
Start
();
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
ethClient
=
l2Geth
ethClient
=
l2Geth
}
else
{
}
else
{
if
len
(
cfg
.
GethOptions
[
name
])
>
0
{
if
len
(
cfg
.
GethOptions
[
name
])
>
0
{
t
.
Skip
(
"External L2 nodes do not support configuration through GethOptions"
)
t
.
Skip
(
"External L2 nodes do not support configuration through GethOptions"
)
}
}
if
name
!=
RoleSeq
&&
!
cfg
.
DisableTxForwarder
{
cfg
.
Loggers
[
name
]
.
Warn
(
"External L2 nodes do not support `RollupSequencerHTTP` configuration. No tx forwarding support."
)
}
ethClient
=
(
&
ExternalRunner
{
ethClient
=
(
&
ExternalRunner
{
Name
:
name
,
Name
:
name
,
BinPath
:
cfg
.
ExternalL2Shim
,
BinPath
:
cfg
.
ExternalL2Shim
,
...
@@ -636,6 +659,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
...
@@ -636,6 +659,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
JWTPath
:
cfg
.
JWTFilePath
,
JWTPath
:
cfg
.
JWTFilePath
,
})
.
Run
(
t
)
})
.
Run
(
t
)
}
}
sys
.
EthInstances
[
name
]
=
ethClient
sys
.
EthInstances
[
name
]
=
ethClient
}
}
...
...
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