Skip to content

Commit

Permalink
chore: Address review change requests
Browse files Browse the repository at this point in the history
  • Loading branch information
red-0ne committed Jan 14, 2025
1 parent 8cbd066 commit 8bb6f9c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 10 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,19 @@ validators:
instrumentation:
prometheus: true
log_level: "info"
# Increase the rpc and mempool max bytes to support larger proof transactions.
# Increase the rpc and mempool max bytes to support large transactions.
# DEV_NOTE: These values were selected arbitrarily, but chosen to be large,
# as a result of load testing and seeing large proof messages during the
# Claim & Proof lifecycle.
rpc:
# Controls how large any single RPC request accepted by the CometBFT
# server (offchain) can be.
max_body_bytes: "100000000"
mempool:
# Control how big any single transaction accepted by the CometBFT server
# (offchain) can be.
# Since multiple messages are bundled into a single transaction,
# max_tx_bytes needs to be increased alongside max_txs_bytes as well.
max_tx_bytes: "100000000"
client:
chain-id: poktroll
Expand Down
11 changes: 6 additions & 5 deletions pkg/client/tx/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import (
)

// maxGRPCMsgSize is the maximum message size the gRPC client can send and receive.
// The current value has been arbitrarily set to a large value after observing
// proof messages bundled within transactions exceeding the default 4MB limit.
// TODO_TECHDEBT: Adjust the max message size to a more sensible value.
// DEV_NOTE: This value should adjusted in concert with the CometBFT's rpc max_body_bytes,
// mempool max_tx_bytes and max_txs_bytes.
// The current value has been set arbitrarily to a large value after empirically
// observing multiple Proof messages bundled within a single transaction exceeding
// the default 4MB limit.
// TODO_MAINNET: Adjust the max message size to a more sensible value.
// DEV_NOTE: This value should adjusted in concert with the CometBFT's rpc
// max_body_bytes, mempool max_tx_bytes and max_txs_bytes.
const maxGRPCMsgSize = 100 * 1024 * 1024 // 100MB

var _ client.TxContext = (*cosmosTxContext)(nil)
Expand Down

0 comments on commit 8bb6f9c

Please sign in to comment.