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

[Documentation]: Simulator parameter file example #20820

Open
fmorency opened this issue Jun 28, 2024 · 1 comment
Open

[Documentation]: Simulator parameter file example #20820

fmorency opened this issue Jun 28, 2024 · 1 comment
Labels
C:Simulations T:Docs Changes and features related to documentation.

Comments

@fmorency
Copy link
Contributor

Summary

I would love to see an example of a complete parameter file with both module and simulation parameters. I can change the simulation weights, as described in https://github.com/cosmos/cosmos-sdk/blob/d426a5db677506a981cb094249bb6eaaf6324d39/simapp/params/doc.go, but not module parameters, e.g., mint.params.bond_denom

@fmorency fmorency added the T:Docs Changes and features related to documentation. label Jun 28, 2024
@fmorency
Copy link
Contributor Author

fmorency commented Jul 5, 2024

I was able to set some module parameters, e.g.

{
  "op_weight_msg_delegate": 0,
  "op_weight_msg_undelegate": 0,
  "op_weight_msg_begin_redelegate": 0,
  "op_weight_msg_cancel_unbonding_delegation": 0,
  "op_weight_msg_create_validator": 0,
  "op_weight_msg_edit_validator": 0,

  "inflation": "0.000000000000000000",
  "annual_provisions": "0.000000000000000000",
  "inflation_rate_change": "0.000000000000000000",
  "inflation_max": "0.000000000000000000",
  "inflation_min": "0.000000000000000000",
  "goal_bonded": "0.670000000000000000",
  "blocks_per_year": "6311520",

  "slash_fraction_double_sign": "0.000000000000000000",
  "slash_fraction_downtime": "0.000000000000000000",

  "community_tax": "0.0",
}

but some other parameters can't be set because they are hardcoded in the simulator, e.g.,

mint_denom

mintDenom := simState.BondDenom

bond_denom

params := types.NewParams(simState.UnbondTime, maxVals, 7, simState.BondDenom, minCommissionRate, rotationFee)

where BondDenom = sdk.DefaultBondDenom

The way the parameter file is handled can also lead to key collisions as nothing prevents module X from defining the same key as module Y. I was bitten by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Simulations T:Docs Changes and features related to documentation.
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants