From 4a559d210dd23444a91f8fbfd4184e61b0a80959 Mon Sep 17 00:00:00 2001 From: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:32:57 -0700 Subject: [PATCH] fix: increases txsim grpc client max receive message size (#3541) Closes #3437 Part of https://github.com/celestiaorg/celestia-app/issues/3557 --- test/e2e/benchmark/throughput.go | 10 +++++----- test/e2e/testnet/defaults.go | 2 +- test/e2e/testnet/setup.go | 4 ++++ test/txsim/run.go | 9 ++++++++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/test/e2e/benchmark/throughput.go b/test/e2e/benchmark/throughput.go index 8b73aa451b..ae283b8804 100644 --- a/test/e2e/benchmark/throughput.go +++ b/test/e2e/benchmark/throughput.go @@ -30,11 +30,11 @@ func TwoNodeSimple(logger *log.Logger) error { SelfDelegation: 10000000, CelestiaAppVersion: latestVersion, TxClientVersion: testnet.TxsimVersion, - EnableLatency: true, + EnableLatency: false, LatencyParams: LatencyParams{100, 10}, // in milliseconds - BlobsPerSeq: 1, - BlobSequences: 1, - BlobSizes: "10000-10000", + BlobsPerSeq: 6, + BlobSequences: 50, + BlobSizes: "200000", PerPeerBandwidth: 5 * 1024 * 1024, UpgradeHeight: 0, TimeoutCommit: 1 * time.Second, @@ -47,7 +47,7 @@ func TwoNodeSimple(logger *log.Logger) error { LocalTracingType: "local", PushTrace: false, DownloadTraces: false, - TestDuration: 30 * time.Second, + TestDuration: 2 * time.Minute, TxClients: 2, } diff --git a/test/e2e/testnet/defaults.go b/test/e2e/testnet/defaults.go index d4cf4c33a3..841c599751 100644 --- a/test/e2e/testnet/defaults.go +++ b/test/e2e/testnet/defaults.go @@ -7,4 +7,4 @@ var DefaultResources = Resources{ Volume: "1Gi", } -const TxsimVersion = "a92de72" +const TxsimVersion = "pr-3541" diff --git a/test/e2e/testnet/setup.go b/test/e2e/testnet/setup.go index 629d428e42..2f76976b08 100644 --- a/test/e2e/testnet/setup.go +++ b/test/e2e/testnet/setup.go @@ -93,5 +93,9 @@ func WriteAddressBook(peers []string, file string) error { func MakeAppConfig(_ *Node) (*serverconfig.Config, error) { srvCfg := serverconfig.DefaultConfig() srvCfg.MinGasPrices = fmt.Sprintf("0.001%s", app.BondDenom) + // updating MaxRecvMsgSize and MaxSendMsgSize allows submission of 128MiB worth of + // transactions simultaneously which is useful for big block tests. + srvCfg.GRPC.MaxRecvMsgSize = 128 * 1024 * 1024 + srvCfg.GRPC.MaxSendMsgSize = 128 * 1024 * 1024 return srvCfg, srvCfg.ValidateBasic() } diff --git a/test/txsim/run.go b/test/txsim/run.go index 02bae02136..cbc609db7c 100644 --- a/test/txsim/run.go +++ b/test/txsim/run.go @@ -18,6 +18,11 @@ import ( const DefaultSeed = 900183116 +const ( + grpcMaxRecvMsgSize = 128 * 1024 * 1024 + grpcMaxSendMsgSize = 128 * 1024 * 1024 +) + // Run is the entrypoint function for starting the txsim client. The lifecycle of the client is managed // through the context. At least one grpc and rpc endpoint must be provided. The client relies on a // single funded master account present in the keyring. The client allocates subaccounts for sequences @@ -39,7 +44,9 @@ func Run( opts.Fill() r := rand.New(rand.NewSource(opts.seed)) - conn, err := grpc.NewClient(grpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(grpcEndpoint, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(grpcMaxRecvMsgSize), grpc.MaxCallSendMsgSize(grpcMaxSendMsgSize))) if err != nil { return fmt.Errorf("dialing %s: %w", grpcEndpoint, err) }