diff --git a/utils/grpcutils/grpc.go b/utils/grpcutils/grpc.go index 3167b025dff..c1e8897f2e1 100644 --- a/utils/grpcutils/grpc.go +++ b/utils/grpcutils/grpc.go @@ -13,9 +13,10 @@ import ( "github.com/onflow/flow-go/network/p2p/keyutils" ) -// DefaultMaxMsgSize use 20MB as the default message size limit. -// grpc library default is 4MB -const DefaultMaxMsgSize = 1024 * 1024 * 20 +// DefaultMaxMsgSize use 1 GiB as the default message size limit. +// This enforces a sane max message size, while still allowing for reasonably large messages. +// grpc library default is 4 MiB. +const DefaultMaxMsgSize = 1 << (10 * 3) // 1 GiB // CertificateConfig is used to configure an Certificate type CertificateConfig struct {