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
2662ebb6
Commit
2662ebb6
authored
Dec 06, 2023
by
Matthew Slipper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e: Use deterministic RNG in l2 batcher test
parent
3adc2cc4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
l2_batcher_test.go
op-e2e/actions/l2_batcher_test.go
+4
-2
No files found.
op-e2e/actions/l2_batcher_test.go
View file @
2662ebb6
package
actions
package
actions
import
(
import
(
"crypto/rand"
"errors"
"errors"
"math/big"
"math/big"
"math/rand"
"testing"
"testing"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
...
@@ -467,6 +467,8 @@ func BigL2Txs(gt *testing.T, deltaTimeOffset *hexutil.Uint64) {
...
@@ -467,6 +467,8 @@ func BigL2Txs(gt *testing.T, deltaTimeOffset *hexutil.Uint64) {
tx
.
GasFeeCap
=
e2eutils
.
Ether
(
1
)
// be very generous with basefee, since we're spamming L1
tx
.
GasFeeCap
=
e2eutils
.
Ether
(
1
)
// be very generous with basefee, since we're spamming L1
}
}
rng
:=
rand
.
New
(
rand
.
NewSource
(
555
))
// build many L2 blocks filled to the brim with large txs of random data
// build many L2 blocks filled to the brim with large txs of random data
for
i
:=
0
;
i
<
40
;
i
++
{
for
i
:=
0
;
i
<
40
;
i
++
{
aliceNonce
,
err
:=
cl
.
PendingNonceAt
(
t
.
Ctx
(),
dp
.
Addresses
.
Alice
)
aliceNonce
,
err
:=
cl
.
PendingNonceAt
(
t
.
Ctx
(),
dp
.
Addresses
.
Alice
)
...
@@ -483,7 +485,7 @@ func BigL2Txs(gt *testing.T, deltaTimeOffset *hexutil.Uint64) {
...
@@ -483,7 +485,7 @@ func BigL2Txs(gt *testing.T, deltaTimeOffset *hexutil.Uint64) {
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
signer
:=
types
.
LatestSigner
(
sd
.
L2Cfg
.
Config
)
signer
:=
types
.
LatestSigner
(
sd
.
L2Cfg
.
Config
)
data
:=
make
([]
byte
,
120
_000
)
// very large L2 txs, as large as the tx-pool will accept
data
:=
make
([]
byte
,
120
_000
)
// very large L2 txs, as large as the tx-pool will accept
_
,
err
:=
r
and
.
Read
(
data
[
:
])
// fill with random bytes, to make compression ineffective
_
,
err
:=
r
ng
.
Read
(
data
[
:
])
// fill with random bytes, to make compression ineffective
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
gas
,
err
:=
core
.
IntrinsicGas
(
data
,
nil
,
false
,
true
,
true
,
false
)
gas
,
err
:=
core
.
IntrinsicGas
(
data
,
nil
,
false
,
true
,
true
,
false
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
...
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