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
9e0a279c
Unverified
Commit
9e0a279c
authored
Jul 25, 2023
by
mergify[bot]
Committed by
GitHub
Jul 25, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into aj/cannon-args
parents
ee33ff83
db1e486a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
l1_miner.go
op-e2e/actions/l1_miner.go
+1
-1
l2_proposer.go
op-e2e/actions/l2_proposer.go
+12
-2
setup.go
op-e2e/e2eutils/setup.go
+5
-0
No files found.
op-e2e/actions/l1_miner.go
View file @
9e0a279c
...
@@ -109,7 +109,7 @@ func (s *L1Miner) ActL1IncludeTx(from common.Address) Action {
...
@@ -109,7 +109,7 @@ func (s *L1Miner) ActL1IncludeTx(from common.Address) Action {
func
(
s
*
L1Miner
)
IncludeTx
(
t
Testing
,
tx
*
types
.
Transaction
)
{
func
(
s
*
L1Miner
)
IncludeTx
(
t
Testing
,
tx
*
types
.
Transaction
)
{
from
,
err
:=
s
.
l1Signer
.
Sender
(
tx
)
from
,
err
:=
s
.
l1Signer
.
Sender
(
tx
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
s
.
log
.
Info
(
"including tx"
,
"nonce"
,
tx
.
Nonce
(),
"from"
,
from
)
s
.
log
.
Info
(
"including tx"
,
"nonce"
,
tx
.
Nonce
(),
"from"
,
from
,
"to"
,
tx
.
To
()
)
if
tx
.
Gas
()
>
s
.
l1BuildingHeader
.
GasLimit
{
if
tx
.
Gas
()
>
s
.
l1BuildingHeader
.
GasLimit
{
t
.
Fatalf
(
"tx consumes %d gas, more than available in L1 block %d"
,
tx
.
Gas
(),
s
.
l1BuildingHeader
.
GasLimit
)
t
.
Fatalf
(
"tx consumes %d gas, more than available in L1 block %d"
,
tx
.
Gas
(),
s
.
l1BuildingHeader
.
GasLimit
)
}
}
...
...
op-e2e/actions/l2_proposer.go
View file @
9e0a279c
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
"time"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto"
...
@@ -15,6 +16,7 @@ import (
...
@@ -15,6 +16,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-proposer/metrics"
"github.com/ethereum-optimism/optimism/op-proposer/metrics"
"github.com/ethereum-optimism/optimism/op-proposer/proposer"
"github.com/ethereum-optimism/optimism/op-proposer/proposer"
...
@@ -31,6 +33,7 @@ type L2Proposer struct {
...
@@ -31,6 +33,7 @@ type L2Proposer struct {
log
log
.
Logger
log
log
.
Logger
l1
*
ethclient
.
Client
l1
*
ethclient
.
Client
driver
*
proposer
.
L2OutputSubmitter
driver
*
proposer
.
L2OutputSubmitter
contract
*
bindings
.
L2OutputOracleCaller
address
common
.
Address
address
common
.
Address
privKey
*
ecdsa
.
PrivateKey
privKey
*
ecdsa
.
PrivateKey
contractAddr
common
.
Address
contractAddr
common
.
Address
...
@@ -55,7 +58,6 @@ func (f fakeTxMgr) Send(_ context.Context, _ txmgr.TxCandidate) (*types.Receipt,
...
@@ -55,7 +58,6 @@ func (f fakeTxMgr) Send(_ context.Context, _ txmgr.TxCandidate) (*types.Receipt,
}
}
func
NewL2Proposer
(
t
Testing
,
log
log
.
Logger
,
cfg
*
ProposerCfg
,
l1
*
ethclient
.
Client
,
rollupCl
*
sources
.
RollupClient
)
*
L2Proposer
{
func
NewL2Proposer
(
t
Testing
,
log
log
.
Logger
,
cfg
*
ProposerCfg
,
l1
*
ethclient
.
Client
,
rollupCl
*
sources
.
RollupClient
)
*
L2Proposer
{
proposerCfg
:=
proposer
.
Config
{
proposerCfg
:=
proposer
.
Config
{
L2OutputOracleAddr
:
cfg
.
OutputOracleAddr
,
L2OutputOracleAddr
:
cfg
.
OutputOracleAddr
,
PollInterval
:
time
.
Second
,
PollInterval
:
time
.
Second
,
...
@@ -69,12 +71,20 @@ func NewL2Proposer(t Testing, log log.Logger, cfg *ProposerCfg, l1 *ethclient.Cl
...
@@ -69,12 +71,20 @@ func NewL2Proposer(t Testing, log log.Logger, cfg *ProposerCfg, l1 *ethclient.Cl
dr
,
err
:=
proposer
.
NewL2OutputSubmitter
(
proposerCfg
,
log
,
metrics
.
NoopMetrics
)
dr
,
err
:=
proposer
.
NewL2OutputSubmitter
(
proposerCfg
,
log
,
metrics
.
NoopMetrics
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
contract
,
err
:=
bindings
.
NewL2OutputOracleCaller
(
cfg
.
OutputOracleAddr
,
l1
)
require
.
NoError
(
t
,
err
)
address
:=
crypto
.
PubkeyToAddress
(
cfg
.
ProposerKey
.
PublicKey
)
proposer
,
err
:=
contract
.
PROPOSER
(
&
bind
.
CallOpts
{})
require
.
NoError
(
t
,
err
)
require
.
Equal
(
t
,
proposer
,
address
,
"PROPOSER must be the proposer's address"
)
return
&
L2Proposer
{
return
&
L2Proposer
{
log
:
log
,
log
:
log
,
l1
:
l1
,
l1
:
l1
,
driver
:
dr
,
driver
:
dr
,
address
:
crypto
.
PubkeyToAddress
(
cfg
.
ProposerKey
.
PublicKey
),
contract
:
contract
,
address
:
address
,
privKey
:
cfg
.
ProposerKey
,
privKey
:
cfg
.
ProposerKey
,
contractAddr
:
cfg
.
OutputOracleAddr
,
contractAddr
:
cfg
.
OutputOracleAddr
,
}
}
...
...
op-e2e/e2eutils/setup.go
View file @
9e0a279c
...
@@ -231,6 +231,11 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
...
@@ -231,6 +231,11 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
SystemConfigProxy
:
predeploys
.
DevSystemConfigAddr
,
SystemConfigProxy
:
predeploys
.
DevSystemConfigAddr
,
}
}
// Sanity check that the config is correct
require
.
Equal
(
t
,
deployParams
.
Secrets
.
Addresses
()
.
Batcher
,
deployParams
.
DeployConfig
.
BatchSenderAddress
)
require
.
Equal
(
t
,
deployParams
.
Secrets
.
Addresses
()
.
SequencerP2P
,
deployParams
.
DeployConfig
.
P2PSequencerAddress
)
require
.
Equal
(
t
,
deployParams
.
Secrets
.
Addresses
()
.
Proposer
,
deployParams
.
DeployConfig
.
L2OutputOracleProposer
)
return
&
SetupData
{
return
&
SetupData
{
L1Cfg
:
l1Genesis
,
L1Cfg
:
l1Genesis
,
L2Cfg
:
l2Genesis
,
L2Cfg
:
l2Genesis
,
...
...
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