Cosmos-sdk: Gov param-change not working

Created on 13 Mar 2020  Â·  7Comments  Â·  Source: cosmos/cosmos-sdk

Hi there I am struggling to change the MaxDepositPeriod & MaxVotingPeriod params on a testnet… What am I doing wrong here?

{
  "title": "Deposit/Vote Time",
  "description": "This is a testnet, lets make this quicker",
  "changes": [
    {
      "subspace": "gov",
        "key": "max_deposit_period",
      "value": 72800000000000
    }
  ],
  "deposit": [
    {
      "denom": "testtoken",
      "amount": "10000000"
    }
  ]
}

I have checked this link, and if I add "key": deposit params & "subkey" max_deposit_period .. it still doesnt work.
https://github.com/gavinly/CosmosParametersWiki/blob/master/Governance.md#technical-specifications

Could someone please assist in figuring this out for me.

All 7 comments

Can you post the error you're receiving? Also would be good if you could post the entire transaction as shown before signing in the CLI? And if you're able to successfully submit it but don't see the change take place, if you could query the resulting transaction receipt with gaiacli q tx TX_RECEIPT the results might also be helpful.

Otherwise I believe @gavinly wrote that guide and might also be able to more quickly see the problem

Please review the params of module before attempting to make a change. Here is x/gov.

So the changes should look like:

"changes": [
    {
      "subspace": "gov",
        "key": "depositparams",
        "value": {"max_deposit_period":"72800000000000"},
    }
  ]

Note, only x/gov is like this -- meaning its the only module that has an object for its parameter values. That being said, I'm 95% sure you don't need to include the entire object, just the field(s) you want to change.

@dbriggsie thanks for bringing this to our attention. I tested out a parameter change proposal here: https://hubble.figment.network/cosmos/chains/gaia-13007/governance/proposals/30

These are the contents of the JSON file that I used for the proposal:

{
  "title": "Param-change test",
  "description": "This is to test the transaction to send a parameter-change governance proposal that would change the minimum deposit to 0.2 testnet ATOMs.",
  "changes": [
    {
      "subspace": "gov",
      "key": "depositparams",
      "value": {"mindeposit":"200000umuon"}
    }
  ],
  "deposit": [
    {
      "denom": "umuon",
      "amount": "100000"
    }
  ]
}

@gavinly

So i managed to get the depositparam done with your above guideline..
However for votingparams i continue to get an error as below...

{
  "title": "Param-Change Voting Period",
  "description": "This is to change the voting time on Testnet to be 8 hours."
  "changes": [
    {
      "subspace": "gov",
      "key": "votingparams",
      "value": {"voting_period":"28800000000000"}
     }
    ],
   "deposit": [
     {
       "denom": "testtoken",
       "amount": "10000000"
     }
    ]
}

ERROR: invalid character '"' after object key:value pair

Nevermind its my syntax

@dbriggsie it was the unnecessary underscore in "votingperiod" right?

@gavinly no the _ worked fine it was the way I had layed out the json.. it wasnt happy.
voting_period worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  Â·  3Comments

rigelrozanski picture rigelrozanski  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

mossid picture mossid  Â·  3Comments