From bd3ff30248d271719c687cc10159de479fdd904d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 15:57:38 -0400 Subject: [PATCH] [DEC-2155] Set `gov.params.min_initial_deposit_ratio` to 0.2 to avoid spamming (backport #670) (#680) * [DEC-2155] Set `gov.params.min_initial_deposit_ratio` to 0.2 to avoid spamming (#670) * use 0.20 to avoid spam * run make * manually remove null values * update testnet-external/pregenesis.sh * apply to dev/staging genesis (cherry picked from commit 98464cbb1001ba7a1c7488d7aa7d8d6a70fa8c55) # Conflicts: # protocol/testing/testnet-external/pregenesis.sh * resolve merge conflict --------- Co-authored-by: ttl33 <19664986+ttl33@users.noreply.github.com> --- protocol/scripts/genesis/prod_pregenesis.sh | 1 + protocol/scripts/genesis/sample_pregenesis.json | 2 +- protocol/testing/genesis.sh | 4 +++- protocol/testing/testnet-external/pregenesis.sh | 5 +---- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol/scripts/genesis/prod_pregenesis.sh b/protocol/scripts/genesis/prod_pregenesis.sh index af0da31421..f0d5e936ce 100755 --- a/protocol/scripts/genesis/prod_pregenesis.sh +++ b/protocol/scripts/genesis/prod_pregenesis.sh @@ -107,6 +107,7 @@ function overwrite_genesis_production() { dasel put -t string -f "$GENESIS" '.app_state.gov.params.quorum' -v '0.33400' # 33.4% dasel put -t string -f "$GENESIS" '.app_state.gov.params.threshold' -v '0.50000' # 50% dasel put -t string -f "$GENESIS" '.app_state.gov.params.veto_threshold' -v '0.33400' # 33.4% + dasel put -t string -f "$GENESIS" '.app_state.gov.params.min_initial_deposit_ratio' -v '0.20000' # 20% dasel put -t bool -f "$GENESIS" '.app_state.gov.params.burn_proposal_deposit_prevote' -v 'false' dasel put -t bool -f "$GENESIS" '.app_state.gov.params.burn_vote_quorum' -v 'false' dasel put -t bool -f "$GENESIS" '.app_state.gov.params.burn_vote_veto' -v 'true' diff --git a/protocol/scripts/genesis/sample_pregenesis.json b/protocol/scripts/genesis/sample_pregenesis.json index 55e6f244d6..489ec0456b 100644 --- a/protocol/scripts/genesis/sample_pregenesis.json +++ b/protocol/scripts/genesis/sample_pregenesis.json @@ -766,7 +766,7 @@ "denom": "asample" } ], - "min_initial_deposit_ratio": "0.000000000000000000", + "min_initial_deposit_ratio": "0.20000", "quorum": "0.33400", "threshold": "0.50000", "veto_threshold": "0.33400", diff --git a/protocol/testing/genesis.sh b/protocol/testing/genesis.sh index 6ae48da6ae..6ed3d41633 100755 --- a/protocol/testing/genesis.sh +++ b/protocol/testing/genesis.sh @@ -73,7 +73,9 @@ function edit_genesis() { # reduced deposit period dasel put -t string -f "$GENESIS" '.app_state.gov.params.max_deposit_period' -v '300s' # reduced voting period - dasel put -t string -f "$GENESIS" '.app_state.gov.params.voting_period' -v '300s' + dasel put -t string -f "$GENESIS" '.app_state.gov.params.voting_period' -v '300s' + # set initial deposit ratio to prevent spamming + dasel put -t string -f "$GENESIS" '.app_state.gov.params.min_initial_deposit_ratio' -v '0.20000' # 20% # Update staking module. dasel put -t string -f "$GENESIS" '.app_state.staking.params.unbonding_time' -v '1814400s' # 21 days diff --git a/protocol/testing/testnet-external/pregenesis.sh b/protocol/testing/testnet-external/pregenesis.sh index 3266c34ab6..48af9c305d 100755 --- a/protocol/testing/testnet-external/pregenesis.sh +++ b/protocol/testing/testnet-external/pregenesis.sh @@ -163,10 +163,7 @@ function overwrite_genesis_public_testnet() { dasel put -t string -f "$GENESIS" '.app_state.gov.params.quorum' -v '0.33400' # 33.4% dasel put -t string -f "$GENESIS" '.app_state.gov.params.threshold' -v '0.50000' # 50% dasel put -t string -f "$GENESIS" '.app_state.gov.params.veto_threshold' -v '0.33400' # 33.4% - - # Consensus params - dasel put -t string -f "$GENESIS" '.consensus_params.block.max_bytes' -v '22020096' - dasel put -t string -f "$GENESIS" '.consensus_params.block.max_gas' -v '-1' + dasel put -t string -f "$GENESIS" '.app_state.gov.params.min_initial_deposit_ratio' -v '0.20000' # 20% } create_pregenesis_file() {