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

feat: increase max-recv-msg-size default to 20 MiB #4205

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions app/default_overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,5 +294,8 @@ func DefaultAppConfig() *serverconfig.Config {
cfg.StateSync.SnapshotInterval = 1500
cfg.StateSync.SnapshotKeepRecent = 2
cfg.MinGasPrices = fmt.Sprintf("%v%s", appconsts.DefaultMinGasPrice, BondDenom)

const mebibyte = 1048576
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a super tiny nit for a follow up issue would be to extract the mebibyte constant and export it somewhere. We have a lot of redefinitions of it, so it would be good to use the same one to avoid any mistakes

cfg.GRPC.MaxRecvMsgSize = 20 * mebibyte
return cfg
}
3 changes: 3 additions & 0 deletions app/default_overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func TestDefaultAppConfig(t *testing.T) {
assert.Equal(t, uint64(1500), cfg.StateSync.SnapshotInterval)
assert.Equal(t, uint32(2), cfg.StateSync.SnapshotKeepRecent)
assert.Equal(t, "0.002utia", cfg.MinGasPrices)

mebibyte := 1048576
assert.Equal(t, 20*mebibyte, cfg.GRPC.MaxRecvMsgSize)
}

func TestDefaultConsensusConfig(t *testing.T) {
Expand Down
Loading