Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend RPC-based pull event source over WebSocket-based push event source #4190

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ci/misbehaviour-ics/double_sign_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ "$DEBUG" = true ]; then
set -x
fi

# User balance of stake tokens
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
Expand Down Expand Up @@ -144,7 +144,7 @@ do
interchain-security-pd genesis gentx $PROV_KEY $STAKE --chain-id provider --home ${PROV_NODE_DIR} --keyring-backend test --moniker $MONIKER
sleep 1

# Copy gentxs to the lead validator for possible future collection.
# Copy gentxs to the lead validator for possible future collection.
# Obviously we don't need to copy the first validator's gentx to itself
if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then
cp ${PROV_NODE_DIR}/config/gentx/* ${LEAD_VALIDATOR_PROV_DIR}/config/gentx/
Expand Down Expand Up @@ -496,7 +496,7 @@ enabled = true
id = "consumer"
type = "CosmosSdk"
rpc_addr = "http://${NODE_IP}:${CRPC_LADDR_PORT}"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:${CRPC_LADDR_PORT}/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }
grpc_addr = "tcp://${NODE_IP}:${CGRPC_LADDR_PORT}"
account_prefix = "cosmos"
clock_drift = "5s"
Expand All @@ -520,7 +520,7 @@ ccv_consumer_chain = true
id = "provider"
type = "CosmosSdk"
rpc_addr = "http://${NODE_IP}:${PRPC_LADDR_PORT}"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:${PRPC_LADDR_PORT}/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }
grpc_addr = "tcp://${NODE_IP}:${PGRPC_LADDR_PORT}"
account_prefix = "cosmos"
clock_drift = "5s"
Expand Down Expand Up @@ -590,7 +590,7 @@ do
sleep 5

MSG="successfully submitted double voting evidence to chain"

if grep -c "$MSG" $HOME_DIR/hermes-evidence-logs.txt; then
echo "[SUCCESS] Successfully submitted double voting evidence to provider chain"
exit 0
Expand Down
12 changes: 6 additions & 6 deletions ci/misbehaviour-ics/light_client_attack_freeze_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ waiting() {
}


# User balance of stake tokens
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
Expand Down Expand Up @@ -296,7 +296,7 @@ rpc_addr = "http://${NODE_IP}:26648"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26648/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand All @@ -319,7 +319,7 @@ rpc_addr = "http://${NODE_IP}:26658"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand All @@ -340,7 +340,7 @@ $HERMES_BIN keys add --key-file ${PROV_NODE_DIR}/${PROV_KEY}.json --chain provi

waiting 5 "for a block"

# CCV connection
# CCV connection
$HERMES_BIN create connection \
--a-chain consumer \
--a-client 07-tendermint-0 \
Expand Down Expand Up @@ -419,7 +419,7 @@ rpc_addr = "http://${NODE_IP}:26638"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26638/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand All @@ -442,7 +442,7 @@ rpc_addr = "http://${NODE_IP}:26658"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand Down
10 changes: 5 additions & 5 deletions ci/misbehaviour-ics/light_client_attack_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ waiting() {
}


# User balance of stake tokens
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
Expand Down Expand Up @@ -305,7 +305,7 @@ rpc_addr = "http://${NODE_IP}:26648"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26648/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand All @@ -328,7 +328,7 @@ rpc_addr = "http://${NODE_IP}:26658"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand Down Expand Up @@ -445,7 +445,7 @@ rpc_addr = "http://${NODE_IP}:26638"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26638/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand All @@ -467,7 +467,7 @@ rpc_addr = "http://${NODE_IP}:26658"
rpc_timeout = "10s"
store_prefix = "ibc"
trusting_period = "2days"
event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

[chains.gas_price]
denom = "stake"
Expand Down
38 changes: 19 additions & 19 deletions ci/misbehaviour/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ grpc_addr = 'http://127.0.0.1:9090'

# Specify the WebSocket address and port where the chain WebSocket server
# listens on. Required
event_source = { mode = 'push', url = 'ws://127.0.0.1:26657/websocket', batch_delay = '500ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment above needs update.


# Specify the maximum amount of time (duration) that the RPC requests should
# take before timing out. Default: 10s (10 seconds)
Expand Down Expand Up @@ -158,22 +158,22 @@ address_type = { derivation = 'cosmos' }
store_prefix = 'ibc'

# Gas Parameters
#
#
# The term 'gas' is used to denote the amount of computation needed to execute
# and validate a transaction on-chain. It can be thought of as fuel that gets
# and validate a transaction on-chain. It can be thought of as fuel that gets
# spent in order to power the on-chain execution of a transaction.
#
# Hermes attempts to simulate how much gas a transaction will expend on its
# Hermes attempts to simulate how much gas a transaction will expend on its
# target chain. From that, it calculates the cost of that gas by multiplying the
# amount of estimated gas by the `gas_multiplier` and the `gas_price`
# (estimated gas * `gas_multiplier` * `gas_price`) in order to compute the
# (estimated gas * `gas_multiplier` * `gas_price`) in order to compute the
# total fee to be deducted from the relayer's wallet.
#
#
# The `simulate_tx` operation does not always correctly estimate the appropriate
# amount of gas that a transaction requires. In those cases when the operation
# fails, Hermes will attempt to submit the transaction using the specified
# `default_gas` and `max_gas` parameters. In the case that a transaction would
# require more than `max_gas`, it doesn't get submitted and a
# amount of gas that a transaction requires. In those cases when the operation
# fails, Hermes will attempt to submit the transaction using the specified
# `default_gas` and `max_gas` parameters. In the case that a transaction would
# require more than `max_gas`, it doesn't get submitted and a
# `TxSimulateGasEstimateExceeded` error is returned.

# Specify the default amount of gas to be used in case the tx simulation fails,
Expand All @@ -187,12 +187,12 @@ default_gas = 100000
max_gas = 400000

# Specify the price per gas used of the fee to submit a transaction and
# the denomination of the fee.
#
# the denomination of the fee.
#
# The specified gas price should always be greater or equal to the `min-gas-price`
# configured on the chain. This is to ensure that at least some minimal price is
# configured on the chain. This is to ensure that at least some minimal price is
# paid for each unit of gas per transaction.
#
#
# Required
gas_price = { price = 0.001, denom = 'stake' }

Expand All @@ -201,8 +201,8 @@ gas_price = { price = 0.001, denom = 'stake' }
#
# The purpose of multiplying by `gas_multiplier` is to provide a bit of a buffer
# to catch some of the cases when the gas estimation calculation is on the low
# end.
#
# end.
#
# Example: With this setting set to 1.1, then if the estimated gas
# is 80_000, then gas used to compute the fee will be adjusted to
# 80_000 * 1.1 = 88_000.
Expand All @@ -212,15 +212,15 @@ gas_price = { price = 0.001, denom = 'stake' }
gas_multiplier = 1.3

# Query the current gas price from the chain instead of using the static `gas_price` from the config.
# Useful for chains which have [EIP-1559][eip]-like dynamic gas price.
# Useful for chains which have [EIP-1559][eip]-like dynamic gas price.
#
# At the moment, only chains which support the `osmosis.txfees.v1beta1.Query/GetEipBaseFee`
# query or have enabled Skip's `x/feemarket` module https://github.com/skip-mev/feemarket
# can be used with dynamic gas price enabled.
#
# See this page in the Hermes guide for more information:
# https://hermes.informal.systems/documentation/configuration/dynamic-gas-fees.html
#
#
# Default: { enabled = false, multiplier = 1.1, max = 0.6 }
dynamic_gas_price = { enabled = true, multiplier = 1.3, max = 5.0 }

Expand Down Expand Up @@ -318,7 +318,7 @@ id = 'ibc-1'
type = "CosmosSdk"
rpc_addr = 'http://127.0.0.1:26557'
grpc_addr = 'http://127.0.0.1:9091'
event_source = { mode = 'push', url = 'ws://127.0.0.1:26557/websocket', batch_delay = '500ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }
rpc_timeout = '10s'
account_prefix = 'cosmos'
key_name = 'testkey'
Expand Down
38 changes: 19 additions & 19 deletions ci/misbehaviour/config_fork.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ rpc_addr = 'http://127.0.0.1:26657'
grpc_addr = 'http://127.0.0.1:9090'

# The type of event source to use for getting events from the chain.
event_source = { mode = 'push', url = 'ws://127.0.0.1:26557/websocket', batch_delay = '500ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }

# Specify the maximum amount of time (duration) that the RPC requests should
# take before timing out. Default: 10s (10 seconds)
Expand Down Expand Up @@ -157,22 +157,22 @@ address_type = { derivation = 'cosmos' }
store_prefix = 'ibc'

# Gas Parameters
#
#
# The term 'gas' is used to denote the amount of computation needed to execute
# and validate a transaction on-chain. It can be thought of as fuel that gets
# and validate a transaction on-chain. It can be thought of as fuel that gets
# spent in order to power the on-chain execution of a transaction.
#
# Hermes attempts to simulate how much gas a transaction will expend on its
# Hermes attempts to simulate how much gas a transaction will expend on its
# target chain. From that, it calculates the cost of that gas by multiplying the
# amount of estimated gas by the `gas_multiplier` and the `gas_price`
# (estimated gas * `gas_multiplier` * `gas_price`) in order to compute the
# (estimated gas * `gas_multiplier` * `gas_price`) in order to compute the
# total fee to be deducted from the relayer's wallet.
#
#
# The `simulate_tx` operation does not always correctly estimate the appropriate
# amount of gas that a transaction requires. In those cases when the operation
# fails, Hermes will attempt to submit the transaction using the specified
# `default_gas` and `max_gas` parameters. In the case that a transaction would
# require more than `max_gas`, it doesn't get submitted and a
# amount of gas that a transaction requires. In those cases when the operation
# fails, Hermes will attempt to submit the transaction using the specified
# `default_gas` and `max_gas` parameters. In the case that a transaction would
# require more than `max_gas`, it doesn't get submitted and a
# `TxSimulateGasEstimateExceeded` error is returned.

# Specify the default amount of gas to be used in case the tx simulation fails,
Expand All @@ -186,12 +186,12 @@ default_gas = 100000
max_gas = 400000

# Specify the price per gas used of the fee to submit a transaction and
# the denomination of the fee.
#
# the denomination of the fee.
#
# The specified gas price should always be greater or equal to the `min-gas-price`
# configured on the chain. This is to ensure that at least some minimal price is
# configured on the chain. This is to ensure that at least some minimal price is
# paid for each unit of gas per transaction.
#
#
# Required
gas_price = { price = 0.001, denom = 'stake' }

Expand All @@ -200,8 +200,8 @@ gas_price = { price = 0.001, denom = 'stake' }
#
# The purpose of multiplying by `gas_multiplier` is to provide a bit of a buffer
# to catch some of the cases when the gas estimation calculation is on the low
# end.
#
# end.
#
# Example: With this setting set to 1.1, then if the estimated gas
# is 80_000, then gas used to compute the fee will be adjusted to
# 80_000 * 1.1 = 88_000.
Expand All @@ -211,15 +211,15 @@ gas_price = { price = 0.001, denom = 'stake' }
gas_multiplier = 1.3

# Query the current gas price from the chain instead of using the static `gas_price` from the config.
# Useful for chains which have [EIP-1559][eip]-like dynamic gas price.
# Useful for chains which have [EIP-1559][eip]-like dynamic gas price.
#
# At the moment, only chains which support the `osmosis.txfees.v1beta1.Query/GetEipBaseFee`
# query or have enabled Skip's `x/feemarket` module https://github.com/skip-mev/feemarket
# can be used with dynamic gas price enabled.
#
# See this page in the Hermes guide for more information:
# https://hermes.informal.systems/documentation/configuration/dynamic-gas-fees.html
#
#
# Default: { enabled = false, multiplier = 1.1, max = 0.6 }
dynamic_gas_price = { enabled = true, multiplier = 1.3, max = 5.0 }

Expand Down Expand Up @@ -317,7 +317,7 @@ id = 'ibc-1'
type = 'CosmosSdk'
rpc_addr = 'http://127.0.0.1:26457'
grpc_addr = 'http://127.0.0.1:9092'
event_source = { mode = 'push', url = 'ws://127.0.0.1:26457/websocket', batch_delay = '500ms' }
event_source = { mode = 'pull', interval = '500ms', max_retries = 3 }
rpc_timeout = '10s'
account_prefix = 'cosmos'
key_name = 'testkey'
Expand Down
Loading
Loading