Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ jobs:
- run:
name: test op-e2e
command: |
gotestsum --junitfile /test-results/op-e2e.xml -- -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out -covermode=atomic ./...
gotestsum --format standard-verbose --junitfile /test-results/op-e2e.xml -- -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out -covermode=atomic ./...
Comment thread
mslipper marked this conversation as resolved.
Comment thread
mslipper marked this conversation as resolved.
working_directory: op-e2e
- run:
name: test op-service
Expand Down
10 changes: 2 additions & 8 deletions op-e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,17 +541,11 @@ func (cfg SystemConfig) start() (*System, error) {
}
}

rollupEndpoint := fmt.Sprintf(
"http://%s:%d",
sys.cfg.Nodes["sequencer"].RPC.ListenAddr,
sys.cfg.Nodes["sequencer"].RPC.ListenPort,
)

// L2Output Submitter
sys.l2OutputSubmitter, err = l2os.NewL2OutputSubmitter(l2os.Config{
L1EthRpc: sys.nodes["l1"].WSEndpoint(),
L2EthRpc: sys.nodes["sequencer"].WSEndpoint(),
RollupRpc: rollupEndpoint,
RollupRpc: sys.rollupNodes["sequencer"].HTTPEndpoint(),
L2OOAddress: sys.L2OOContractAddr.String(),
PollInterval: 50 * time.Millisecond,
NumConfirmations: 1,
Comment thread
mslipper marked this conversation as resolved.
Expand All @@ -576,7 +570,7 @@ func (cfg SystemConfig) start() (*System, error) {
sys.batchSubmitter, err = bss.NewBatchSubmitter(bss.Config{
L1EthRpc: sys.nodes["l1"].WSEndpoint(),
L2EthRpc: sys.nodes["sequencer"].WSEndpoint(),
RollupRpc: rollupEndpoint,
RollupRpc: sys.rollupNodes["sequencer"].HTTPEndpoint(),
MinL1TxSize: 1,
MaxL1TxSize: 120000,
ChannelTimeout: sys.cfg.RollupConfig.ChannelTimeout,
Comment thread
mslipper marked this conversation as resolved.
Expand Down
16 changes: 13 additions & 3 deletions op-e2e/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func defaultSystemConfig(t *testing.T) SystemConfig {
// Submitter PrivKey is set in system start for rollup nodes where sequencer = true
RPC: node.RPCConfig{
ListenAddr: "127.0.0.1",
ListenPort: 9093,
ListenPort: 0,
EnableAdmin: true,
},
L1EpochPollInterval: time.Second * 4,
Expand Down Expand Up @@ -154,6 +154,7 @@ func defaultSystemConfig(t *testing.T) SystemConfig {
}

func TestL2OutputSubmitter(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand All @@ -166,7 +167,7 @@ func TestL2OutputSubmitter(t *testing.T) {

l1Client := sys.Clients["l1"]

rollupRPCClient, err := rpc.DialContext(context.Background(), cfg.Nodes["sequencer"].RPC.HttpEndpoint())
rollupRPCClient, err := rpc.DialContext(context.Background(), sys.rollupNodes["sequencer"].HTTPEndpoint())
require.Nil(t, err)
rollupClient := sources.NewRollupClient(rollupRPCClient)

Expand Down Expand Up @@ -229,6 +230,7 @@ func TestL2OutputSubmitter(t *testing.T) {
// TestSystemE2E sets up a L1 Geth node, a rollup node, and a L2 geth node and then confirms that L1 deposits are reflected on L2.
// All nodes are run in process (but are the full nodes, not mocked or stubbed).
func TestSystemE2E(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -328,7 +330,7 @@ func TestSystemE2E(t *testing.T) {
require.Equal(t, verifBlock.ParentHash(), seqBlock.ParentHash(), "Verifier and sequencer blocks parent hashes not the same after including a batch tx")
require.Equal(t, verifBlock.Hash(), seqBlock.Hash(), "Verifier and sequencer blocks not the same after including a batch tx")

rollupRPCClient, err := rpc.DialContext(context.Background(), cfg.Nodes["sequencer"].RPC.HttpEndpoint())
rollupRPCClient, err := rpc.DialContext(context.Background(), sys.rollupNodes["sequencer"].HTTPEndpoint())
require.Nil(t, err)
rollupClient := sources.NewRollupClient(rollupRPCClient)
// basic check that sync status works
Expand All @@ -343,6 +345,7 @@ func TestSystemE2E(t *testing.T) {

// TestConfirmationDepth runs the rollup with both sequencer and verifier not immediately processing the tip of the chain.
func TestConfirmationDepth(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -390,6 +393,7 @@ func TestConfirmationDepth(t *testing.T) {

// TestFinalize tests if L2 finalizes after sufficient time after L1 finalizes
func TestFinalize(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -417,6 +421,7 @@ func TestFinalize(t *testing.T) {
}

func TestMintOnRevertedDeposit(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -490,6 +495,7 @@ func TestMintOnRevertedDeposit(t *testing.T) {
}

func TestMissingBatchE2E(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -599,6 +605,7 @@ func L1InfoFromState(ctx context.Context, contract *bindings.L1Block, l2Number *
// TestSystemMockP2P sets up a L1 Geth node, a rollup node, and a L2 geth node and then confirms that
// the nodes can sync L2 blocks before they are confirmed on L1.
func TestSystemMockP2P(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -672,6 +679,7 @@ func TestSystemMockP2P(t *testing.T) {
}

func TestL1InfoContract(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -795,6 +803,7 @@ func calcL1GasUsed(data []byte, overhead *big.Int) *big.Int {
// balance changes on L1 and L2 and has to include gas fees in the balance checks.
// It does not check that the withdrawal can be executed prior to the end of the finality period.
func TestWithdrawals(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down Expand Up @@ -970,6 +979,7 @@ func TestWithdrawals(t *testing.T) {

// TestFees checks that L1/L2 fees are handled.
func TestFees(t *testing.T) {
t.Parallel()
if !verboseGethNodes {
log.Root().SetHandler(log.DiscardHandler())
}
Expand Down
8 changes: 8 additions & 0 deletions op-node/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,11 @@ func (n *OpNode) Close() error {
}
return result.ErrorOrNil()
}

func (n *OpNode) ListenAddr() string {
return n.server.listenAddr.String()
}

func (n *OpNode) HTTPEndpoint() string {
return fmt.Sprintf("http://%s", n.ListenAddr())
}