Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement(core): increase message size to 64Mb #4133

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions nodebuilder/core/constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,22 @@ import (
"github.com/celestiaorg/celestia-node/libs/utils"
)

const xtokenFileName = "xtoken.json"
const (
// gRPC client requires fetching a block on initialization that can be larger
// than the default message size set in gRPC. Increasing defaults up to 64MB
// to avoid fixing it every time the block size increases.
// TODO(@vgonkivs): Revisit this constant once the block size reaches 64MB.
defaultGRPCMessageSize = 64 * 1024 * 1024 // 64Mb
xtokenFileName = "xtoken.json"
)

func grpcClient(lc fx.Lifecycle, cfg Config) (*grpc.ClientConn, error) {
var opts []grpc.DialOption
opts := []grpc.DialOption{
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(defaultGRPCMessageSize),
grpc.MaxCallSendMsgSize(defaultGRPCMessageSize),
),
}
if cfg.TLSEnabled {
opts = append(opts, grpc.WithTransportCredentials(
credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12})),
Expand Down
Loading