Skip to content

Commit

Permalink
Dockernet Slash Test Configuration (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampocs authored Nov 16, 2022
1 parent 8e3668a commit 1ba0b50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions scripts/init_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ set_host_genesis() {
jq "del(.app_state.interchain_accounts)" $genesis_config > json.tmp && mv json.tmp $genesis_config
interchain_accts=$(cat $SCRIPT_DIR/config/ica.json)
jq ".app_state += $interchain_accts" $genesis_config > json.tmp && mv json.tmp $genesis_config

# Slightly harshen slashing parameters (if 5 blocks are missed, the validator will be slashed)
# This makes it easier to test updating weights after a host zone validator is slashed
sed -i -E 's|"signed_blocks_window": "100"|"signed_blocks_window": "10"|g' $genesis_config
sed -i -E 's|"downtime_jail_duration": "600s"|"downtime_jail_duration": "10s"|g' $genesis_config
sed -i -E 's|"slash_fraction_downtime": "0.010000000000000000"|"slash_fraction_downtime": "0.100000000000000000"|g' $genesis_config
}

MAIN_ID=1 # Node responsible for genesis and persistent_peers
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ for chain_id in ${HOST_CHAINS[@]}; do
docker-compose logs -f relayer-${chain_name} | sed -r -u "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" >> ${LOGS}/relayer-${chain_name}.log 2>&1 &
done

$SCRIPT_DIR/create_logs.sh ${HOST_CHAINS[@]} &
$SCRIPT_DIR/create_logs.sh ${HOST_CHAINS[@]} &

0 comments on commit 1ba0b50

Please sign in to comment.