Skip to content

Commit

Permalink
chore: set trusting_period=2m to hit pruning mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani committed Oct 19, 2023
1 parent 92477f7 commit 9662f7e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 37 deletions.
74 changes: 41 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci/cometbft-config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ enable = false
rpc_servers = ""
trust_height = 0
trust_hash = ""
trust_period = "168h0m0s"
trust_period = "2m"

# Time to spend discovering snapshots before initiating a restore.
discovery_time = "15s"
Expand Down
6 changes: 4 additions & 2 deletions ci/hermes-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ key_name = 'testkey'
store_prefix = 'ibc'
gas_price = { price = 0.001, denom = 'stake' }
clock_drift = '5s'
trusting_period = '14days'
# `trusting_period` default value is '14days', but for the purpose of testing
# the consensus state pruning mechanism of Tendermint client it is set to '2m'
trusting_period = '2m'

[chains.trust_threshold]
numerator = '1'
Expand All @@ -29,7 +31,7 @@ key_name = 'testkey'
store_prefix = 'ibc'
gas_price = { price = 0.001, denom = 'basecoin' }
clock_drift = '5s'
trusting_period = '14days'
trusting_period = '2m'
proof_specs = '''
[
{
Expand Down
2 changes: 2 additions & 0 deletions ci/one-chain
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ if [ $platform = 'linux' ]; then
sed -i 's#"localhost:6060"#"localhost:'"$PROF_PORT"'"#g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i 's/trust_period = "168h0m0s"/trust_period = "2m"/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
# sed -i '' 's#index-events = \[\]#index-events = \["message.action","send_packet.packet_src_channel","send_packet.packet_sequence"\]#g' $CHAIN_DIR/$CHAIN_ID/config/app.toml
else
Expand All @@ -135,6 +136,7 @@ else
sed -i '' 's#"localhost:6060"#"localhost:'"$PROF_PORT"'"#g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i '' 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i '' 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i '' 's/trust_period = "168h0m0s"/trust_period = "2m"/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
sed -i '' 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAIN_ID/config/config.toml
# sed -i '' 's/min-retain-blocks = 0/min-retain-blocks = 100/g' $CHAIN_DIR/$CHAIN_ID/config/app.toml
# sed -i '' 's#index-events = \[\]#index-events = \["message.action","send_packet.packet_src_channel","send_packet.packet_sequence"\]#g' $CHAIN_DIR/$CHAIN_ID/config/app.toml
Expand Down
2 changes: 1 addition & 1 deletion ci/tests/upgrade-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ hermes upgrade client --host-chain ibc-0 --client 07-tendermint-0 --upgrade-heig

echo "Test client upgradability of ibc-0 on basecoin-0"

hermes tx upgrade-chain --reference-chain ibc-0 --host-chain basecoin-0 --host-client 07-tendermint-0 --amount 10000000 --height-offset 35
hermes tx upgrade-chain --reference-chain ibc-0 --host-chain basecoin-0 --host-client 07-tendermint-0 --amount 10000000 --height-offset 30
sleep 3s
gaiad --node tcp://localhost:26657 tx gov vote 1 yes --home $HOME/data/ibc-0/data --keyring-backend test --keyring-dir $HOME/data/ibc-0 --chain-id ibc-0 --from validator --yes
sleep 3s
Expand Down

0 comments on commit 9662f7e

Please sign in to comment.