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
d1d67e80
Commit
d1d67e80
authored
Dec 01, 2023
by
Tei Im
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set batch type explicitly for l2 batcher
parent
f03327d6
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
90 deletions
+82
-90
l2_batcher.go
op-e2e/actions/l2_batcher.go
+10
-1
span_batch_test.go
op-e2e/actions/span_batch_test.go
+72
-89
No files found.
op-e2e/actions/l2_batcher.go
View file @
d1d67e80
...
@@ -44,6 +44,9 @@ type BatcherCfg struct {
...
@@ -44,6 +44,9 @@ type BatcherCfg struct {
BatcherKey
*
ecdsa
.
PrivateKey
BatcherKey
*
ecdsa
.
PrivateKey
GarbageCfg
*
GarbageChannelCfg
GarbageCfg
*
GarbageChannelCfg
ForceSubmitSingularBatch
bool
ForceSubmitSpanBatch
bool
}
}
type
L2BlockRefs
interface
{
type
L2BlockRefs
interface
{
...
@@ -157,7 +160,13 @@ func (s *L2Batcher) Buffer(t Testing) error {
...
@@ -157,7 +160,13 @@ func (s *L2Batcher) Buffer(t Testing) error {
var
batchType
uint
=
derive
.
SingularBatchType
var
batchType
uint
=
derive
.
SingularBatchType
var
spanBatchBuilder
*
derive
.
SpanBatchBuilder
=
nil
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
batchType
=
derive
.
SpanBatchType
spanBatchBuilder
=
derive
.
NewSpanBatchBuilder
(
s
.
rollupCfg
.
Genesis
.
L2Time
,
s
.
rollupCfg
.
L2ChainID
)
spanBatchBuilder
=
derive
.
NewSpanBatchBuilder
(
s
.
rollupCfg
.
Genesis
.
L2Time
,
s
.
rollupCfg
.
L2ChainID
)
}
}
...
...
op-e2e/actions/span_batch_test.go
View file @
d1d67e80
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