Skip to content

Commit

Permalink
fix(da): grpc da error batch size above limit (#1081)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Tsitrin <[email protected]>
  • Loading branch information
srene and mtsitrin authored Sep 19, 2024
1 parent 5972ffe commit 22a222e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions block/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"crypto/rand"
"sync/atomic"

"testing"
"time"

Expand Down Expand Up @@ -190,7 +189,6 @@ func TestProduceOnlyAfterSynced(t *testing.T) {
}

func TestRetrieveDaBatchesFailed(t *testing.T) {

manager, err := testutil.GetManager(testutil.GetManagerConfig(), nil, 1, 1, 0, nil, nil)
require.NoError(t, err)
require.NotNil(t, manager)
Expand Down
4 changes: 3 additions & 1 deletion da/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"github.com/tendermint/tendermint/libs/pubsub"
)

const maxBlobSize = 2097152 // 2MB (equivalent to avail or celestia)

// DataAvailabilityLayerClient is a generic client that proxies all DA requests via gRPC.
type DataAvailabilityLayerClient struct {
config Config
Expand Down Expand Up @@ -121,7 +123,7 @@ func (d *DataAvailabilityLayerClient) CheckBatchAvailability(daMetaData *da.DASu

// GetMaxBlobSizeBytes returns the maximum allowed blob size in the DA, used to check the max batch size configured
func (d *DataAvailabilityLayerClient) GetMaxBlobSizeBytes() uint32 {
return 0
return maxBlobSize
}

// RetrieveBatches proxies RetrieveBlocks request to gRPC server.
Expand Down
2 changes: 1 addition & 1 deletion third_party/dymension/rollapp/types/block_descriptor.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/pb/dymint/state.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 22a222e

Please sign in to comment.