Cosmos-sdk: Add an ability to update ConsensusParams

Created on 12 May 2020  Â·  9Comments  Â·  Source: cosmos/cosmos-sdk

Summary

Adding an ability to update ConsensusParams by collecting ConsensusParamUpdates from Module.EndBlock.

Problem Definition

Updating ConsensusParams can be done by passing changes to Tendermint through ResponseEndBlock.

We can decide whether to change using the governance module.

However, ModuleManager does not collect ConsensusParamUpdates nor passes them to Tendermint because the interface of AppModule.EndBlock returns only ValidatorUpdate.

https://github.com/cosmos/cosmos-sdk/blob/80be50319ca5e0e70a4c8325a8c5972a2bd2edf9/types/module/module.go#L312-L334

Proposal

  • AppModule.EndBlock returns ConsensusParamUpdates also.
  • passes it to Tendermint

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
tendermint

Most helpful comment

yes they should be sent to Tendermint. If not then while the application changes the params the Tendermint logic will adhere to the genesis consensus params and this may cause problems

All 9 comments

The SDK now manages consensus parameters via the x/params module and are changed via governance proposals. That being said, we should probably figure out if we need to send these to Tendermint at all.

Do we need to @marbar3778 @melekes ?

yes they should be sent to Tendermint. If not then while the application changes the params the Tendermint logic will adhere to the genesis consensus params and this may cause problems

Any schedule to handle this issue?

Add this to #6365 as it should be done prioir to the next major release

What do you mean @marbar3778 -- this was already done. https://github.com/cosmos/cosmos-sdk/pull/5952

The SDK now manages consensus parameters via the x/params module and are changed via governance proposals. That being said, we should probably figure out if we need to send these to Tendermint at all.

ah based off this comment I thought it wasn't

The SDK now manages consensus parameters via the x/params module and are changed via governance proposals. That being said, we should probably figure out if we need to send these to Tendermint at all.

ah based off this comment I thought it wasn't

As @marbar3778 said, this issue is not done. I agree with him.
PTAL @alexanderbez

What do you mean it's not done? I pointed to the PR that completes the work => https://github.com/cosmos/cosmos-sdk/pull/5952

ConsensusParams should be updated in Endblock via:

`ConsensusParamUpdates (ConsensusParams)`: Changes to consensus-critical time, size, and other parameters.

This is not implemented yet.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

johnmcdowall picture johnmcdowall  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

rigelrozanski picture rigelrozanski  Â·  3Comments