Intro to Params

Parameters

Adding new Parameters

Visit this page for implementation details on how to add new parameters.

MsgUpdateParams vs MsgUpdateParam

This is a critical distinction that can impact all onchain parameters.

When submitting changes using MsgUpdateParams (note the s), you must specify all parameters in the module even if just modifying one.

MsgUpdateParams
MsgUpdateParam

Cosmos SDK

✅ (All params)

❌ (Not available)

Pocket

✅ (All params)

✅ (Single param)

Summary of Key Differences:

  • Cosmos SDK uses MsgUpdateParams (with s) which requires specifying all parameters in the module, even when modifying just one

  • This repo implemented MsgUpdateParam (no s) allowing updates to one parameter at a time

  • More details on the Cosmos SDK MsgUpdateParams can be found here.

  • More details on poktroll's MsgUpdateParam can be found here.

This distinction is critical when making on-chain parameter changes in either system.

Examples

Example: Changing Num Suppliers Per Session

To query the number of suppliers per session, use the following command:

To update the number of suppliers per session, you need to create a new file with the transaction like so:

Followed by running:

Example: Block Size Change

For example, here's a transaction that will increase the block size (a parameter in the consensus module):

note

For convenience, we have put it in tools/scripts/params/consensus_block_size_6mb.json.

To check the current consensus parameters (before and after the change), use this command:

Before the upgrade:

To submit the transaction that increases the block size:

After the upgrade:

Last updated

Was this helpful?