From 67e6d1293cbbd10ddf94ed0415106fb473e245d4 Mon Sep 17 00:00:00 2001 From: Peter Argue <89119817+peterargue@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:23:30 -0700 Subject: [PATCH] [Access] Update default max message size to 1GiB --- utils/grpcutils/grpc.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 {