Skip to content

Commit

Permalink
fix: increases txsim grpc client max receive message size (#3541)
Browse files Browse the repository at this point in the history
Closes #3437
Part of #3557
  • Loading branch information
staheri14 authored Jun 24, 2024
1 parent 37c96de commit 4a559d2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
10 changes: 5 additions & 5 deletions test/e2e/benchmark/throughput.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/testnet/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ var DefaultResources = Resources{
Volume: "1Gi",
}

const TxsimVersion = "a92de72"
const TxsimVersion = "pr-3541"
4 changes: 4 additions & 0 deletions test/e2e/testnet/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
9 changes: 8 additions & 1 deletion test/txsim/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down

0 comments on commit 4a559d2

Please sign in to comment.