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
0e022d1b
Unverified
Commit
0e022d1b
authored
Oct 20, 2022
by
mergify[bot]
Committed by
GitHub
Oct 20, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3725 from ethereum-optimism/jg/limit_blocks_per_channel
op-batcher: Limit number of blocks per channel
parents
ef32b59d
afba7c22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
batch_submitter.go
op-batcher/batch_submitter.go
+8
-1
No files found.
op-batcher/batch_submitter.go
View file @
0e022d1b
...
...
@@ -313,7 +313,14 @@ mainLoop:
l
.
ch
=
ch
}
prevID
:=
l
.
lastSubmittedBlock
for
i
:=
l
.
lastSubmittedBlock
.
Number
+
1
;
i
<=
syncStatus
.
UnsafeL2
.
Number
;
i
++
{
maxBlocksPerChannel
:=
uint64
(
100
)
// Hacky min() here to ensure that we don't batch submit more than 100 blocks per channel.
// TODO: use proper channel size here instead.
upToBlockNumber
:=
syncStatus
.
UnsafeL2
.
Number
if
l
.
lastSubmittedBlock
.
Number
+
1
+
maxBlocksPerChannel
<
upToBlockNumber
{
upToBlockNumber
=
l
.
lastSubmittedBlock
.
Number
+
1
+
maxBlocksPerChannel
}
for
i
:=
l
.
lastSubmittedBlock
.
Number
+
1
;
i
<=
upToBlockNumber
;
i
++
{
ctx
,
cancel
:=
context
.
WithTimeout
(
l
.
ctx
,
time
.
Second
*
10
)
block
,
err
:=
l
.
cfg
.
L2Client
.
BlockByNumber
(
ctx
,
new
(
big
.
Int
)
.
SetUint64
(
i
))
cancel
()
...
...
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