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
830cdc64
Unverified
Commit
830cdc64
authored
Feb 15, 2024
by
Adrian Sutton
Committed by
GitHub
Feb 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: Increase timeouts in system_test. (#9550)
1 second time outs in CI is just asking for flakiness.
parent
e557662d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
system_test.go
op-e2e/system_test.go
+16
-16
No files found.
op-e2e/system_test.go
View file @
830cdc64
...
@@ -143,7 +143,7 @@ func TestL2OutputSubmitter(t *testing.T) {
...
@@ -143,7 +143,7 @@ func TestL2OutputSubmitter(t *testing.T) {
//
//
// NOTE: This assertion will change once the L2 output format is
// NOTE: This assertion will change once the L2 output format is
// finalized.
// finalized.
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
l2Output
,
err
:=
rollupClient
.
OutputAtBlock
(
ctx
,
l2ooBlockNumber
.
Uint64
())
l2Output
,
err
:=
rollupClient
.
OutputAtBlock
(
ctx
,
l2ooBlockNumber
.
Uint64
())
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -200,7 +200,7 @@ func TestL2OutputSubmitterFPAC(t *testing.T) {
...
@@ -200,7 +200,7 @@ func TestL2OutputSubmitterFPAC(t *testing.T) {
committedOutputRoot
,
err
:=
proxy
.
RootClaim
(
&
bind
.
CallOpts
{})
committedOutputRoot
,
err
:=
proxy
.
RootClaim
(
&
bind
.
CallOpts
{})
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
extradata
,
err
:=
proxy
.
ExtraData
(
&
bind
.
CallOpts
{})
extradata
,
err
:=
proxy
.
ExtraData
(
&
bind
.
CallOpts
{})
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -383,7 +383,7 @@ func TestConfirmationDepth(t *testing.T) {
...
@@ -383,7 +383,7 @@ func TestConfirmationDepth(t *testing.T) {
<-
time
.
After
(
time
.
Duration
((
cfg
.
DeployConfig
.
SequencerWindowSize
+
verConfDepth
+
3
)
*
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
<-
time
.
After
(
time
.
Duration
((
cfg
.
DeployConfig
.
SequencerWindowSize
+
verConfDepth
+
3
)
*
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
// within a second, get both L1 and L2 verifier and sequencer block heads
// within a second, get both L1 and L2 verifier and sequencer block heads
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
l1Head
,
err
:=
l1Client
.
BlockByNumber
(
ctx
,
nil
)
l1Head
,
err
:=
l1Client
.
BlockByNumber
(
ctx
,
nil
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
@@ -436,7 +436,7 @@ func TestPendingGasLimit(t *testing.T) {
...
@@ -436,7 +436,7 @@ func TestPendingGasLimit(t *testing.T) {
l2Seq
:=
sys
.
Clients
[
"sequencer"
]
l2Seq
:=
sys
.
Clients
[
"sequencer"
]
checkGasLimit
:=
func
(
client
*
ethclient
.
Client
,
number
*
big
.
Int
,
expected
uint64
)
*
types
.
Header
{
checkGasLimit
:=
func
(
client
*
ethclient
.
Client
,
number
*
big
.
Int
,
expected
uint64
)
*
types
.
Header
{
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
header
,
err
:=
client
.
HeaderByNumber
(
ctx
,
number
)
header
,
err
:=
client
.
HeaderByNumber
(
ctx
,
number
)
cancel
()
cancel
()
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
@@ -515,7 +515,7 @@ func TestMissingBatchE2E(t *testing.T) {
...
@@ -515,7 +515,7 @@ func TestMissingBatchE2E(t *testing.T) {
require
.
Nil
(
t
,
err
,
"Waiting for block on verifier"
)
require
.
Nil
(
t
,
err
,
"Waiting for block on verifier"
)
// Assert that the transaction is not found on the verifier
// Assert that the transaction is not found on the verifier
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
_
,
err
=
l2Verif
.
TransactionReceipt
(
ctx
,
receipt
.
TxHash
)
_
,
err
=
l2Verif
.
TransactionReceipt
(
ctx
,
receipt
.
TxHash
)
require
.
Equal
(
t
,
ethereum
.
NotFound
,
err
,
"Found transaction in verifier when it should not have been included"
)
require
.
Equal
(
t
,
ethereum
.
NotFound
,
err
,
"Found transaction in verifier when it should not have been included"
)
...
@@ -525,7 +525,7 @@ func TestMissingBatchE2E(t *testing.T) {
...
@@ -525,7 +525,7 @@ func TestMissingBatchE2E(t *testing.T) {
require
.
Nil
(
t
,
err
,
"timeout waiting for L2 reorg on sequencer safe head"
)
require
.
Nil
(
t
,
err
,
"timeout waiting for L2 reorg on sequencer safe head"
)
// Assert that the reconciliation process did an L2 reorg on the sequencer to remove the invalid block
// Assert that the reconciliation process did an L2 reorg on the sequencer to remove the invalid block
ctx2
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
)
ctx2
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
block
,
err
:=
l2Seq
.
BlockByNumber
(
ctx2
,
receipt
.
BlockNumber
)
block
,
err
:=
l2Seq
.
BlockByNumber
(
ctx2
,
receipt
.
BlockNumber
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1078,7 +1078,7 @@ func TestWithdrawals(t *testing.T) {
...
@@ -1078,7 +1078,7 @@ func TestWithdrawals(t *testing.T) {
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
// Start L2 balance
// Start L2 balance
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
startBalanceBeforeDeposit
,
err
:=
l2Verif
.
BalanceAt
(
ctx
,
fromAddr
,
nil
)
startBalanceBeforeDeposit
,
err
:=
l2Verif
.
BalanceAt
(
ctx
,
fromAddr
,
nil
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1091,7 +1091,7 @@ func TestWithdrawals(t *testing.T) {
...
@@ -1091,7 +1091,7 @@ func TestWithdrawals(t *testing.T) {
})
})
// Confirm L2 balance
// Confirm L2 balance
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
endBalanceAfterDeposit
,
err
:=
wait
.
ForBalanceChange
(
ctx
,
l2Verif
,
fromAddr
,
startBalanceBeforeDeposit
)
endBalanceAfterDeposit
,
err
:=
wait
.
ForBalanceChange
(
ctx
,
l2Verif
,
fromAddr
,
startBalanceBeforeDeposit
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1101,7 +1101,7 @@ func TestWithdrawals(t *testing.T) {
...
@@ -1101,7 +1101,7 @@ func TestWithdrawals(t *testing.T) {
require
.
Equal
(
t
,
mintAmount
,
diff
,
"Did not get expected balance change after mint"
)
require
.
Equal
(
t
,
mintAmount
,
diff
,
"Did not get expected balance change after mint"
)
// Start L2 balance for withdrawal
// Start L2 balance for withdrawal
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
startBalanceBeforeWithdrawal
,
err
:=
l2Seq
.
BalanceAt
(
ctx
,
fromAddr
,
nil
)
startBalanceBeforeWithdrawal
,
err
:=
l2Seq
.
BalanceAt
(
ctx
,
fromAddr
,
nil
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1113,12 +1113,12 @@ func TestWithdrawals(t *testing.T) {
...
@@ -1113,12 +1113,12 @@ func TestWithdrawals(t *testing.T) {
})
})
// Verify L2 balance after withdrawal
// Verify L2 balance after withdrawal
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
header
,
err
:=
l2Verif
.
HeaderByNumber
(
ctx
,
receipt
.
BlockNumber
)
header
,
err
:=
l2Verif
.
HeaderByNumber
(
ctx
,
receipt
.
BlockNumber
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
endBalanceAfterWithdrawal
,
err
:=
wait
.
ForBalanceChange
(
ctx
,
l2Seq
,
fromAddr
,
startBalanceBeforeWithdrawal
)
endBalanceAfterWithdrawal
,
err
:=
wait
.
ForBalanceChange
(
ctx
,
l2Seq
,
fromAddr
,
startBalanceBeforeWithdrawal
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1131,7 +1131,7 @@ func TestWithdrawals(t *testing.T) {
...
@@ -1131,7 +1131,7 @@ func TestWithdrawals(t *testing.T) {
require
.
Equal
(
t
,
withdrawAmount
,
diff
)
require
.
Equal
(
t
,
withdrawAmount
,
diff
)
// Take start balance on L1
// Take start balance on L1
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
startBalanceBeforeFinalize
,
err
:=
l1Client
.
BalanceAt
(
ctx
,
fromAddr
,
nil
)
startBalanceBeforeFinalize
,
err
:=
l1Client
.
BalanceAt
(
ctx
,
fromAddr
,
nil
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1139,7 +1139,7 @@ func TestWithdrawals(t *testing.T) {
...
@@ -1139,7 +1139,7 @@ func TestWithdrawals(t *testing.T) {
proveReceipt
,
finalizeReceipt
,
resolveClaimReceipt
,
resolveReceipt
:=
ProveAndFinalizeWithdrawal
(
t
,
cfg
,
sys
,
"verifier"
,
ethPrivKey
,
receipt
)
proveReceipt
,
finalizeReceipt
,
resolveClaimReceipt
,
resolveReceipt
:=
ProveAndFinalizeWithdrawal
(
t
,
cfg
,
sys
,
"verifier"
,
ethPrivKey
,
receipt
)
// Verify balance after withdrawal
// Verify balance after withdrawal
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
endBalanceAfterFinalize
,
err
:=
wait
.
ForBalanceChange
(
ctx
,
l1Client
,
fromAddr
,
startBalanceBeforeFinalize
)
endBalanceAfterFinalize
,
err
:=
wait
.
ForBalanceChange
(
ctx
,
l1Client
,
fromAddr
,
startBalanceBeforeFinalize
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1480,7 +1480,7 @@ func TestBatcherMultiTx(t *testing.T) {
...
@@ -1480,7 +1480,7 @@ func TestBatcherMultiTx(t *testing.T) {
_
,
err
=
geth
.
WaitForBlock
(
big
.
NewInt
(
10
),
l2Seq
,
time
.
Duration
(
cfg
.
DeployConfig
.
L2BlockTime
*
15
)
*
time
.
Second
)
_
,
err
=
geth
.
WaitForBlock
(
big
.
NewInt
(
10
),
l2Seq
,
time
.
Duration
(
cfg
.
DeployConfig
.
L2BlockTime
*
15
)
*
time
.
Second
)
require
.
Nil
(
t
,
err
,
"Waiting for L2 blocks"
)
require
.
Nil
(
t
,
err
,
"Waiting for L2 blocks"
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
5
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
l1Number
,
err
:=
l1Client
.
BlockNumber
(
ctx
)
l1Number
,
err
:=
l1Client
.
BlockNumber
(
ctx
)
require
.
Nil
(
t
,
err
)
require
.
Nil
(
t
,
err
)
...
@@ -1507,7 +1507,7 @@ func TestBatcherMultiTx(t *testing.T) {
...
@@ -1507,7 +1507,7 @@ func TestBatcherMultiTx(t *testing.T) {
}
}
func
latestBlock
(
t
*
testing
.
T
,
client
*
ethclient
.
Client
)
uint64
{
func
latestBlock
(
t
*
testing
.
T
,
client
*
ethclient
.
Client
)
uint64
{
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
1
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
defer
cancel
()
defer
cancel
()
blockAfter
,
err
:=
client
.
BlockNumber
(
ctx
)
blockAfter
,
err
:=
client
.
BlockNumber
(
ctx
)
require
.
Nil
(
t
,
err
,
"Error getting latest block"
)
require
.
Nil
(
t
,
err
,
"Error getting latest block"
)
...
@@ -1703,7 +1703,7 @@ func TestRequiredProtocolVersionChangeAndHalt(t *testing.T) {
...
@@ -1703,7 +1703,7 @@ func TestRequiredProtocolVersionChangeAndHalt(t *testing.T) {
// Checking if the engine is down is not trivial in op-e2e.
// Checking if the engine is down is not trivial in op-e2e.
// In op-geth we have halting tests covering the Engine API, in op-e2e we instead check if the API stops.
// In op-geth we have halting tests covering the Engine API, in op-e2e we instead check if the API stops.
_
,
err
=
retry
.
Do
(
context
.
Background
(),
10
,
retry
.
Fixed
(
time
.
Second
*
10
),
func
()
(
struct
{},
error
)
{
_
,
err
=
retry
.
Do
(
context
.
Background
(),
10
,
retry
.
Fixed
(
time
.
Second
*
10
),
func
()
(
struct
{},
error
)
{
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Second
*
10
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Second
)
_
,
err
:=
sys
.
Clients
[
"verifier"
]
.
ChainID
(
ctx
)
_
,
err
:=
sys
.
Clients
[
"verifier"
]
.
ChainID
(
ctx
)
cancel
()
cancel
()
if
err
!=
nil
&&
!
errors
.
Is
(
err
,
ctx
.
Err
())
{
// waiting for client to stop responding to chainID requests
if
err
!=
nil
&&
!
errors
.
Is
(
err
,
ctx
.
Err
())
{
// waiting for client to stop responding to chainID requests
...
...
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