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

fix: register consensus params #7220

Merged
merged 5 commits into from
Jan 9, 2024
Merged

Conversation

czarcas7ic
Copy link
Member

@czarcas7ic czarcas7ic commented Dec 31, 2023

Closes: #XXX

What is the purpose of the change

After upgrade:

~ % grpcurl \
    -plaintext \
    localhost:55894 \
    cosmos.consensus.v1.Query/Params
{
  "params": {
    "block": {
      "maxBytes": "5000000",
      "maxGas": "300000000"
    },
    "evidence": {
      "maxAgeNumBlocks": "100000",
      "maxAgeDuration": "172800s",
      "maxBytes": "1048576"
    },
    "validator": {
      "pubKeyTypes": [
        "ed25519"
      ]
    },
    "version": {

    }
  }
}

Testing and Verifying

Queried for the value pre v22 upgrade on E2E, does not exist.

Queried for the value post v22 upgrade on E2E, exists and is upgraded to the above values.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@czarcas7ic czarcas7ic added V:state/breaking State machine breaking PR A:no-changelog labels Dec 31, 2023
@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Dec 31, 2023
Comment on lines 28 to 33
// Properly register consensus params. In the process, change params as per:
// https://forum.osmosis.zone/t/raise-maximum-gas-to-300m-and-lower-max-bytes-to-5mb/1116
defaultConsensusParams := tmtypes.DefaultConsensusParams().ToProto()
defaultConsensusParams.Block.MaxBytes = 5000000
defaultConsensusParams.Block.MaxGas = 300000000
keepers.ConsensusParamsKeeper.Set(ctx, &defaultConsensusParams)
Copy link
Member Author

Choose a reason for hiding this comment

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

Need an ack that we are good with all defaults except for the MaxBytes and MaxGas here

@@ -14,7 +14,7 @@ const (
// number of blocks it takes to vote for a single validator to vote for a proposal
PropVoteBlocks float32 = 1
// number of blocks used as a calculation buffer
PropBufferBlocks float32 = 8
PropBufferBlocks float32 = 30
Copy link
Member Author

Choose a reason for hiding this comment

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

In the previous version of E2E, the block speed pre upgrade was normal, and the block speed post upgrade was accelerated. Now, block speed is accelerated both pre and post upgrade, so I increased the buffer accordingly.

@czarcas7ic czarcas7ic marked this pull request as ready for review January 1, 2024 17:39
// https://forum.osmosis.zone/t/raise-maximum-gas-to-300m-and-lower-max-bytes-to-5mb/1116
defaultConsensusParams := tmtypes.DefaultConsensusParams().ToProto()
defaultConsensusParams.Block.MaxBytes = 5000000
defaultConsensusParams.Block.MaxGas = 300000000
Copy link
Member

Choose a reason for hiding this comment

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

just for context, what's the reason we're only dealing with max byte and gas here + how did we get these numbers?

Copy link
Member Author

Choose a reason for hiding this comment

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

We utilize all defaults, except for the two block params that the in line comment links to.

Copy link
Member

Choose a reason for hiding this comment

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

Can the code comment paste what mainnet used to have>

Copy link
Member Author

Choose a reason for hiding this comment

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

Added previous mainnet values in-line comments here cb05474

@ValarDragon
Copy link
Member

We should definitely add a changelog for this

@czarcas7ic
Copy link
Member Author

@ValarDragon there is a changelog entry

* [#7220](https://github.com/osmosis-labs/osmosis/pull/7220) Register consensus params; Set MaxGas to 300m and MaxBytes to 5mb.

@ValarDragon
Copy link
Member

Sanity checked that we set the baseapp param store as well

@ValarDragon ValarDragon merged commit 5742333 into main Jan 9, 2024
1 check passed
@ValarDragon ValarDragon deleted the adam/register-consensus-params branch January 9, 2024 05:07
@github-actions github-actions bot mentioned this pull request Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants