generated from dymensionxyz/rollapp
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add minimal updating stript for genesis (#133)
- Loading branch information
1 parent
794042b
commit 16e9706
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -x | ||
if [ "$GENESIS_FILE" = "" ]; then | ||
DEFAULT_GENESIS_FILE_PATH="${HOME}/.rollapp_evm/config/genesis.json" | ||
echo "GENESIS_FILE is not set, using default: ${DEFAULT_GENESIS_FILE_PATH}" | ||
export GENESIS_FILE=$DEFAULT_GENESIS_FILE_PATH | ||
fi | ||
|
||
update_params() { | ||
local success=true | ||
|
||
BLOCK_SIZE="500000" | ||
|
||
dasel put -f "$GENESIS_FILE" '.consensus_params.block.max_gas' -v "400000000" || success=false | ||
dasel put -f "$GENESIS_FILE" '.consensus_params.block.max_bytes' -v "$BLOCK_SIZE" || success=false | ||
dasel put -f "$GENESIS_FILE" '.consensus_params.evidence.max_bytes' -v "$BLOCK_SIZE" || success=false | ||
dasel put -f "$GENESIS_FILE" 'app_state.distribution.params.base_proposer_reward' -v '0.8' || success=false | ||
dasel put -f "$GENESIS_FILE" 'app_state.distribution.params.community_tax' -v "0.00002" || success=false | ||
# these vary depending on environment | ||
dasel put -f "$GENESIS_FILE" 'app_state.gov.voting_params.voting_period' -v "300s" || success=false | ||
dasel put -f "$GENESIS_FILE" '.app_state.sequencers.params.unbonding_time' -v "1209600s" || success=false # 2 weeks | ||
dasel put -f "$GENESIS_FILE" '.app_state.staking.params.unbonding_time' -v "1209600s" || success=false # 2 weeks | ||
|
||
if [ "$success" = false ]; then | ||
echo "An error occurred." | ||
return 1 | ||
fi | ||
set +x | ||
} | ||
|
||
update_params |