-
Notifications
You must be signed in to change notification settings - Fork 296
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
migration: update cometbft tx size for t78 migration #4614
Conversation
1d4e7be
to
dd79f5e
Compare
Encountered some errors while testing this. In short, the TendermintConfig struct is stricter about type validation than CometBFT is. For example, |
dd79f5e
to
1099505
Compare
/// Edit the node's CometBFT config file to set mempool.max_tx_bytes to the required value. | ||
/// This value will affect consensus, but the config setting is specified for CometBFT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Edit the node's CometBFT config file to set mempool.max_tx_bytes to the required value. | |
/// This value will affect consensus, but the config setting is specified for CometBFT | |
/// Edit the node's CometBFT config file to set mempool.max_txs_bytes to the required value. | |
/// This value won't affect consensus, but the config setting is specified for CometBFT |
1099505
to
dbc7c33
Compare
dbc7c33
to
869dee8
Compare
I'm happy with these changes: the cometbft munging will bail out before overwriting if it cannot interpret the on-disk cometbft file, logging a warning. That works well enough with the variety of munged configs I tested against. |
// We expect the pre-migration value to be '1073741824', assuming it's unedited from `pd testnet join`. | ||
// let pre_migration_value = cometbft_config.mempool.max_txs_bytes; | ||
// The new value was updated in GH4594 and represents ~10MB or (2^20 * 10). | ||
let post_migration_value = 10485760; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two max_tx_bytes
parameters that we want to change:
- the first one is a
mempool
config parameter that controls the maximum size of a transaction to be included in the mempool/gossiped to other nodes - the second is a consensus parameter that controls the maximum size of block data (including headers)
We want to change both values:
- the mempool value should be set to something around 30KB (x-ref pd: pick a smaller value for
mempool.max_tx_bytes
#4629) - the consensus value should be set to 1MIB (x-ref #block size pd: configure cometbft with
max_bytes
to 1MiB #4597)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two different mempool configuration parameters that are easily mixed up.
max_txs_bytes
is what this PR is aboutmax_tx_bytes
is what pd: pick a smaller value formempool.max_tx_bytes
#4629 is about, though it'd make sense to add it to this PR, too, after template(comet): lower mempool.max_tx_bytes from 1MiB to 30KiB #4632 gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The max_tx_bytes
vs max_txs_bytes
distinction is certainly ripe for confusion, but if we're changing two values in the CometBFT config for Testnet 78, then we should update both values as part of the migration flow. I'll make a change to this PR to accommodate.
869dee8
to
8e312f4
Compare
8e312f4
to
4eecfcb
Compare
This is ready for review again. After migration, the cometbft config's mempool block should look like:
I made sure to test with a customized config that set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
## Describe your changes During team sync today we decided that this new value is superior. ## Issue ticket number and link Follow-up to related work in #4614, #4627, and #4632. ## Checklist before requesting a review - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > This change does affect consensus and so should be treated carefully. Co-authored-by: Conor Schaefer <[email protected]>
Describe your changes
We've already updated the CometBFT config template, but running nodes on the current testnet will still be using the prior value, generated at time of join. Let's update the value as part of
pd migrate
, logging a warning if we fail to do so.Issue ticket number and link
Refs #4594, #4582.
Checklist before requesting a review
If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: