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
55667361
Unverified
Commit
55667361
authored
Dec 01, 2023
by
protolambda
Committed by
GitHub
Dec 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8358 from testinprod-io/tip/spanbatch-hardfork-e2e
op-e2e: Improve e2e test for span batches
parents
918459c4
d1d67e80
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
382 additions
and
27 deletions
+382
-27
l2_batcher.go
op-e2e/actions/l2_batcher.go
+10
-1
span_batch_test.go
op-e2e/actions/span_batch_test.go
+372
-26
No files found.
op-e2e/actions/l2_batcher.go
View file @
55667361
...
...
@@ -44,6 +44,9 @@ type BatcherCfg struct {
BatcherKey
*
ecdsa
.
PrivateKey
GarbageCfg
*
GarbageChannelCfg
ForceSubmitSingularBatch
bool
ForceSubmitSpanBatch
bool
}
type
L2BlockRefs
interface
{
...
...
@@ -157,7 +160,13 @@ func (s *L2Batcher) Buffer(t Testing) error {
var
batchType
uint
=
derive
.
SingularBatchType
var
spanBatchBuilder
*
derive
.
SpanBatchBuilder
=
nil
if
s
.
rollupCfg
.
IsDelta
(
block
.
Time
())
{
if
s
.
l2BatcherCfg
.
ForceSubmitSingularBatch
&&
s
.
l2BatcherCfg
.
ForceSubmitSpanBatch
{
t
.
Fatalf
(
"ForceSubmitSingularBatch and ForceSubmitSpanBatch cannot be set to true at the same time"
)
}
else
if
s
.
l2BatcherCfg
.
ForceSubmitSingularBatch
{
// use SingularBatchType
}
else
if
s
.
l2BatcherCfg
.
ForceSubmitSpanBatch
||
s
.
rollupCfg
.
IsDelta
(
block
.
Time
())
{
// If both ForceSubmitSingularBatch and ForceSubmitSpanbatch are false, use SpanBatch automatically if Delta HF is activated.
batchType
=
derive
.
SpanBatchType
spanBatchBuilder
=
derive
.
NewSpanBatchBuilder
(
s
.
rollupCfg
.
Genesis
.
L2Time
,
s
.
rollupCfg
.
L2ChainID
)
}
...
...
op-e2e/actions/span_batch_test.go
View file @
55667361
This diff is collapsed.
Click to expand it.
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