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
c62ab3ea
Unverified
Commit
c62ab3ea
authored
Apr 18, 2023
by
Michael de Hoog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
461b2134
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
channel_builder.go
op-batcher/batcher/channel_builder.go
+2
-2
channel_manager_test.go
op-batcher/batcher/channel_manager_test.go
+4
-0
target_size_compressor_test.go
op-batcher/batcher/target_size_compressor_test.go
+1
-1
No files found.
op-batcher/batcher/channel_builder.go
View file @
c62ab3ea
...
@@ -102,11 +102,11 @@ func (cc *ChannelConfig) NewCompressor() (derive.Compressor, error) {
...
@@ -102,11 +102,11 @@ func (cc *ChannelConfig) NewCompressor() (derive.Compressor, error) {
switch
cc
.
CompressorKind
{
switch
cc
.
CompressorKind
{
case
flags
.
CompressorShadow
:
case
flags
.
CompressorShadow
:
return
NewShadowCompressor
(
return
NewShadowCompressor
(
cc
.
MaxFrameSize
,
// subtract 1 byte for version
cc
.
MaxFrameSize
,
)
)
default
:
default
:
return
NewTargetSizeCompressor
(
return
NewTargetSizeCompressor
(
cc
.
TargetFrameSize
,
// subtract 1 byte for version
cc
.
TargetFrameSize
,
cc
.
TargetNumFrames
,
cc
.
TargetNumFrames
,
cc
.
ApproxComprRatio
,
cc
.
ApproxComprRatio
,
)
)
...
...
op-batcher/batcher/channel_manager_test.go
View file @
c62ab3ea
...
@@ -99,6 +99,7 @@ func TestChannelManagerReturnsErrReorgWhenDrained(t *testing.T) {
...
@@ -99,6 +99,7 @@ func TestChannelManagerReturnsErrReorgWhenDrained(t *testing.T) {
m
:=
NewChannelManager
(
log
,
metrics
.
NoopMetrics
,
m
:=
NewChannelManager
(
log
,
metrics
.
NoopMetrics
,
ChannelConfig
{
ChannelConfig
{
TargetFrameSize
:
1
,
TargetFrameSize
:
1
,
TargetNumFrames
:
1
,
MaxFrameSize
:
120
_000
,
MaxFrameSize
:
120
_000
,
ApproxComprRatio
:
1.0
,
ApproxComprRatio
:
1.0
,
})
})
...
@@ -172,6 +173,7 @@ func TestChannelManager_Clear(t *testing.T) {
...
@@ -172,6 +173,7 @@ func TestChannelManager_Clear(t *testing.T) {
// be able to output any frames
// be able to output any frames
MaxFrameSize
:
24
,
MaxFrameSize
:
24
,
TargetFrameSize
:
24
,
TargetFrameSize
:
24
,
TargetNumFrames
:
1
,
ApproxComprRatio
:
1.0
,
ApproxComprRatio
:
1.0
,
})
})
...
@@ -332,6 +334,7 @@ func TestChannelManager_TxResend(t *testing.T) {
...
@@ -332,6 +334,7 @@ func TestChannelManager_TxResend(t *testing.T) {
m
:=
NewChannelManager
(
log
,
metrics
.
NoopMetrics
,
m
:=
NewChannelManager
(
log
,
metrics
.
NoopMetrics
,
ChannelConfig
{
ChannelConfig
{
TargetFrameSize
:
1
,
TargetFrameSize
:
1
,
TargetNumFrames
:
1
,
MaxFrameSize
:
120
_000
,
MaxFrameSize
:
120
_000
,
ApproxComprRatio
:
1.0
,
ApproxComprRatio
:
1.0
,
})
})
...
@@ -398,6 +401,7 @@ func TestChannelManagerCloseNoPendingChannel(t *testing.T) {
...
@@ -398,6 +401,7 @@ func TestChannelManagerCloseNoPendingChannel(t *testing.T) {
m
:=
NewChannelManager
(
log
,
metrics
.
NoopMetrics
,
m
:=
NewChannelManager
(
log
,
metrics
.
NoopMetrics
,
ChannelConfig
{
ChannelConfig
{
TargetFrameSize
:
1
,
TargetFrameSize
:
1
,
TargetNumFrames
:
1
,
MaxFrameSize
:
100
,
MaxFrameSize
:
100
,
ApproxComprRatio
:
1.0
,
ApproxComprRatio
:
1.0
,
ChannelTimeout
:
1000
,
ChannelTimeout
:
1000
,
...
...
op-batcher/batcher/target_size_compressor_test.go
View file @
c62ab3ea
package
batcher_test
package
batcher_test
import
(
import
(
"github.com/ethereum-optimism/optimism/op-batcher/flags"
"math"
"math"
"testing"
"testing"
"github.com/ethereum-optimism/optimism/op-batcher/batcher"
"github.com/ethereum-optimism/optimism/op-batcher/batcher"
"github.com/ethereum-optimism/optimism/op-batcher/flags"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
)
...
...
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