Skip to content

Commit

Permalink
init script update
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Aug 29, 2024
1 parent 9d69065 commit b0ea176
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,23 @@ add_denom_metadata() {
fi
}

set_consensus_params() {
local success=true

BLOCK_SIZE="500000"
COMMIT=$(git log -1 --format='%H')

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.rollappparams.params.version' -v "$COMMIT" || success=false

if [ "$success" = false ]; then
echo "An error occurred. Please refer to README.md"
return 1
fi
}

# --------------------------------- run init --------------------------------- #
if ! command -v "$EXECUTABLE" >/dev/null; then
echo "$EXECUTABLE does not exist"
Expand Down Expand Up @@ -217,6 +234,7 @@ update_configuration
add_genesis_accounts
generate_denom_metadata
update_configuration
set_consensus_params

# --------------------- adding keys and genesis accounts --------------------- #
#local genesis account
Expand Down

0 comments on commit b0ea176

Please sign in to comment.