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
ad0bdd60
Unverified
Commit
ad0bdd60
authored
Nov 01, 2023
by
Adrian Sutton
Committed by
GitHub
Nov 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7975 from mdehoog/michael/batcher-panic
Fix batcher panic on invalid configuration
parents
bcdfa0b7
f6662356
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
+24
-4
service.go
op-batcher/batcher/service.go
+5
-3
setup.go
op-e2e/setup.go
+8
-1
system_test.go
op-e2e/system_test.go
+11
-0
No files found.
op-batcher/batcher/service.go
View file @
ad0bdd60
...
...
@@ -290,8 +290,10 @@ func (bs *BatcherService) Stop(ctx context.Context) error {
bs
.
Log
.
Info
(
"Stopping batcher"
)
var
result
error
if
err
:=
bs
.
driver
.
StopBatchSubmittingIfRunning
(
ctx
);
err
!=
nil
{
result
=
errors
.
Join
(
result
,
fmt
.
Errorf
(
"failed to stop batch submitting: %w"
,
err
))
if
bs
.
driver
!=
nil
{
if
err
:=
bs
.
driver
.
StopBatchSubmittingIfRunning
(
ctx
);
err
!=
nil
{
result
=
errors
.
Join
(
result
,
fmt
.
Errorf
(
"failed to stop batch submitting: %w"
,
err
))
}
}
if
bs
.
rpcServer
!=
nil
{
...
...
@@ -328,7 +330,7 @@ func (bs *BatcherService) Stop(ctx context.Context) error {
if
result
==
nil
{
bs
.
stopped
.
Store
(
true
)
bs
.
driver
.
Log
.
Info
(
"Batch Submitter stopped"
)
bs
.
Log
.
Info
(
"Batch Submitter stopped"
)
}
return
result
}
...
...
op-e2e/setup.go
View file @
ad0bdd60
...
...
@@ -203,6 +203,9 @@ type SystemConfig struct {
// Target L1 tx size for the batcher transactions
BatcherTargetL1TxSizeBytes
uint64
// Max L1 tx size for the batcher transactions
BatcherMaxL1TxSizeBytes
uint64
// SupportL1TimeTravel determines if the L1 node supports quickly skipping forward in time
SupportL1TimeTravel
bool
}
...
...
@@ -684,13 +687,17 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
if
os
.
Getenv
(
"OP_E2E_USE_SPAN_BATCH"
)
==
"true"
{
batchType
=
derive
.
SpanBatchType
}
batcherMaxL1TxSizeBytes
:=
cfg
.
BatcherMaxL1TxSizeBytes
if
batcherMaxL1TxSizeBytes
==
0
{
batcherMaxL1TxSizeBytes
=
240
_000
}
batcherCLIConfig
:=
&
bss
.
CLIConfig
{
L1EthRpc
:
sys
.
EthInstances
[
"l1"
]
.
WSEndpoint
(),
L2EthRpc
:
sys
.
EthInstances
[
"sequencer"
]
.
WSEndpoint
(),
RollupRpc
:
sys
.
RollupNodes
[
"sequencer"
]
.
HTTPEndpoint
(),
MaxPendingTransactions
:
0
,
MaxChannelDuration
:
1
,
MaxL1TxSize
:
240
_000
,
MaxL1TxSize
:
batcherMaxL1TxSizeBytes
,
CompressorConfig
:
compressor
.
CLIConfig
{
TargetL1TxSizeBytes
:
cfg
.
BatcherTargetL1TxSizeBytes
,
TargetNumFrames
:
1
,
...
...
op-e2e/system_test.go
View file @
ad0bdd60
...
...
@@ -1553,3 +1553,14 @@ func TestRequiredProtocolVersionChangeAndHalt(t *testing.T) {
require
.
NoError
(
t
,
err
)
t
.
Log
(
"verified that op-geth closed!"
)
}
func
TestIncorrectBatcherConfiguration
(
t
*
testing
.
T
)
{
InitParallel
(
t
)
cfg
:=
DefaultSystemConfig
(
t
)
// make the batcher configuration invalid
cfg
.
BatcherMaxL1TxSizeBytes
=
1
_
,
err
:=
cfg
.
Start
(
t
)
require
.
Error
(
t
,
err
,
"Expected error on invalid batcher configuration"
)
}
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