diff --git a/ci/misbehaviour-ics/double_sign_test.sh b/ci/misbehaviour-ics/double_sign_test.sh index 3685868433..73bb4a1a96 100644 --- a/ci/misbehaviour-ics/double_sign_test.sh +++ b/ci/misbehaviour-ics/double_sign_test.sh @@ -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" @@ -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/ @@ -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" @@ -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" @@ -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 diff --git a/ci/misbehaviour-ics/light_client_attack_freeze_test.sh b/ci/misbehaviour-ics/light_client_attack_freeze_test.sh index 24661ace22..71a29c3308 100644 --- a/ci/misbehaviour-ics/light_client_attack_freeze_test.sh +++ b/ci/misbehaviour-ics/light_client_attack_freeze_test.sh @@ -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" @@ -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" @@ -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" @@ -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 \ @@ -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" @@ -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" diff --git a/ci/misbehaviour-ics/light_client_attack_test.sh b/ci/misbehaviour-ics/light_client_attack_test.sh index f42982c353..422031f943 100644 --- a/ci/misbehaviour-ics/light_client_attack_test.sh +++ b/ci/misbehaviour-ics/light_client_attack_test.sh @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" diff --git a/ci/misbehaviour/config.toml b/ci/misbehaviour/config.toml index 41b18706fd..f4d7ec0caa 100644 --- a/ci/misbehaviour/config.toml +++ b/ci/misbehaviour/config.toml @@ -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 } # Specify the maximum amount of time (duration) that the RPC requests should # take before timing out. Default: 10s (10 seconds) @@ -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, @@ -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' } @@ -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. @@ -212,7 +212,7 @@ 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 @@ -220,7 +220,7 @@ gas_multiplier = 1.3 # # 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 } @@ -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' diff --git a/ci/misbehaviour/config_fork.toml b/ci/misbehaviour/config_fork.toml index d637f8db48..1da486daca 100644 --- a/ci/misbehaviour/config_fork.toml +++ b/ci/misbehaviour/config_fork.toml @@ -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) @@ -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, @@ -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' } @@ -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. @@ -211,7 +211,7 @@ 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 @@ -219,7 +219,7 @@ gas_multiplier = 1.3 # # 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 } @@ -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' diff --git a/config.toml b/config.toml index aeb2eff924..ca0ce88593 100644 --- a/config.toml +++ b/config.toml @@ -1,7 +1,7 @@ # This is an example configuration for Hermes. It is meant to be -# used as a reference, _NOT_ for configuring a production relayer. -# If you're looking to configure a production relayer for some chains, -# try using the `hermes config auto` command to generate a config +# used as a reference, _NOT_ for configuring a production relayer. +# If you're looking to configure a production relayer for some chains, +# try using the `hermes config auto` command to generate a config # file that serves as the starting point for configuring Hermes. # The global section has parameters that apply globally to the relayer operation. @@ -175,37 +175,37 @@ grpc_addr = 'http://127.0.0.1:9090' # The type of event source to use for getting events from the chain. # # This setting can take two types of values, as an inline table: -# -# a) Push: for receiving IBC events over WebSocket. +# +# a) Pull: for polling for IBC events via the `/block_results` RPC endpoint. +# +# `{ mode = 'pull', interval = '500ms', max_retries = 3 }` +# +# where +# +# - `interval` is the interval at which to poll for blocks. Default: 500ms +# Lower values will result in faster event processing, improving the latency of Hermes, +# but may increase the load on the full node. +# - `max_retries` is the maximum number of retries to collect events for each block. Default: 3 +# Higher values will increase the likelihood of collecting all events for a block, but may +# increase the load on the full node. The default value provides a good balance between +# reliability and load on the full node. +# +# This mode is recommended by default as it is more reliable than the WebSocket-based push mode. +# +# b) Push: for receiving IBC events over WebSocket. # # `{ mode = 'push', url = 'ws://127.0.0.1:26657/websocket', batch_delay = '500ms' }` # # where # # - `url` is the WebSocket URL to connect to. Required -# - `batch_delay` is the delay until event batch is -# emitted in the absence of NewBlock event. Default: 500ms +# - `batch_delay` is the delay until event batch is emitted in the absence of NewBlock event. Default: 500ms # Lower values will result in faster event processing, improving the latency of Hermes, # but may split the events into more batches than necessary, requiring more client updates # to be submitted, yielding higher costs. Higher values will result in slower event # processing, increasing the latency of Hermes, but are more likely to batch events together. # The default value provides good latency while minimizing the number of client updates needed. - -# b) Pull: for polling for IBC events via the `/block_results` RPC endpoint. -# -# `{ mode = 'pull', interval = '1s', max_retries = 4 }` -# -# where -# -# - `interval` is the interval at which to poll for blocks. Default: 1s -# - `max_retries` is the maximum number of retries to collect events for each block. Default: 4 -# -# This mode should only be used in situations where Hermes misses events that it should be -# receiving, such as when relaying for CosmWasm-enabled chains which emit IBC events without -# the `message` attribute. Without this attribute, the WebSocket is not able to catch these -# events, so the `/block_results` RPC must be used instead. -# -event_source = { mode = 'push', url = 'ws://127.0.0.1:26657/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) @@ -255,22 +255,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, @@ -284,12 +284,12 @@ default_gas = 100000 max_gas = 4000000 # 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.025, denom = 'stake' } @@ -298,8 +298,8 @@ gas_price = { price = 0.025, 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. @@ -309,7 +309,7 @@ gas_price = { price = 0.025, denom = 'stake' } gas_multiplier = 1.1 # 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 @@ -317,7 +317,7 @@ gas_multiplier = 1.1 # # 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 = false, multiplier = 1.1, max = 0.6 } @@ -469,7 +469,7 @@ memo_prefix = '' id = 'ibc-1' 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' trusted_node = false account_prefix = 'cosmos' diff --git a/crates/relayer-cli/tests/fixtures/two_chains.toml b/crates/relayer-cli/tests/fixtures/two_chains.toml index db9358261d..2dbf233627 100644 --- a/crates/relayer-cli/tests/fixtures/two_chains.toml +++ b/crates/relayer-cli/tests/fixtures/two_chains.toml @@ -24,7 +24,7 @@ tx_confirmation = true id = 'ibc-0' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://127.0.0.1:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -41,7 +41,7 @@ denominator = '3' id = 'ibc-1' rpc_addr = 'http://127.0.0.1:26457' grpc_addr = 'http://127.0.0.1:9091' -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' diff --git a/crates/relayer-rest/tests/mock.rs b/crates/relayer-rest/tests/mock.rs index c5c3df0dbc..21a389db91 100644 --- a/crates/relayer-rest/tests/mock.rs +++ b/crates/relayer-rest/tests/mock.rs @@ -99,7 +99,7 @@ id = 'mock-0' 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' diff --git a/crates/relayer/src/config.rs b/crates/relayer/src/config.rs index fa4725a6d2..6c0e7d18aa 100644 --- a/crates/relayer/src/config.rs +++ b/crates/relayer/src/config.rs @@ -179,7 +179,7 @@ pub mod default { } pub fn max_retries() -> u32 { - 4 + 3 } pub fn batch_delay() -> Duration { diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example.toml index 6033872b07..96a2fd999d 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example.toml @@ -27,7 +27,7 @@ type = "CosmosSdk" id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -56,7 +56,7 @@ type = "CosmosSdk" id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26557/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -66,4 +66,4 @@ clock_drift = '5s' trusting_period = '14days' trust_threshold = { numerator = '1', denominator = '3' } address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } -excluded_sequences = { 'channel-0' = [1, 3, 4, 5, 7, 9, 10, 11, 12, 14, 17, 18, 19], 'channel-1' = [3, 4, 5, 6] } \ No newline at end of file +excluded_sequences = { 'channel-0' = [1, 3, 4, 5, 7, 9, 10, 11, 12, 14, 17, 18, 19], 'channel-1' = [3, 4, 5, 6] } diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example_decoding_size.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example_decoding_size.toml index 254b603ad1..d019f9a633 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example_decoding_size.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example_decoding_size.toml @@ -25,7 +25,7 @@ type = "CosmosSdk" id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -45,7 +45,7 @@ type = "CosmosSdk" id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26557/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -55,4 +55,4 @@ max_grpc_decoding_size = '5.91 MB' clock_drift = '5s' trusting_period = '14days' trust_threshold = { numerator = '1', denominator = '3' } -address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } \ No newline at end of file +address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example_default_chain_type.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example_default_chain_type.toml index 6df007f2f7..278b9d8d91 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example_default_chain_type.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example_default_chain_type.toml @@ -24,7 +24,7 @@ tx_confirmation = true id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -43,7 +43,7 @@ address_type = { derivation = 'cosmos' } id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26557/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -53,4 +53,4 @@ max_grpc_decoding_size = '5.91 MB' clock_drift = '5s' trusting_period = '14days' trust_threshold = { numerator = '1', denominator = '3' } -address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } \ No newline at end of file +address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example_fee_filter.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example_fee_filter.toml index f85cca1ca7..46e2f206a4 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example_fee_filter.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example_fee_filter.toml @@ -25,7 +25,7 @@ type = "CosmosSdk" id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://127.0.0.1:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -57,7 +57,7 @@ type = "CosmosSdk" id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -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' diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_excluded_sequences.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_excluded_sequences.toml index 1e72497055..fc0a7dcf5d 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_excluded_sequences.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_excluded_sequences.toml @@ -27,7 +27,7 @@ type = "CosmosSdk" id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -56,7 +56,7 @@ type = "CosmosSdk" id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26557/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -65,4 +65,4 @@ gas_price = { price = 0.001, denom = 'stake' } clock_drift = '5s' trusting_period = '14days' trust_threshold = { numerator = '1', denominator = '3' } -address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } \ No newline at end of file +address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_telemetry.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_telemetry.toml index 29acbcf517..e6f23719fb 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_telemetry.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example_invalid_telemetry.toml @@ -34,7 +34,7 @@ type = "CosmosSdk" id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26657/websocket' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -60,7 +60,7 @@ type = "CosmosSdk" id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26557/websocket' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' diff --git a/crates/relayer/tests/config/fixtures/relayer_conf_example_valid_telemetry.toml b/crates/relayer/tests/config/fixtures/relayer_conf_example_valid_telemetry.toml index 5e6111e61d..b89793b737 100644 --- a/crates/relayer/tests/config/fixtures/relayer_conf_example_valid_telemetry.toml +++ b/crates/relayer/tests/config/fixtures/relayer_conf_example_valid_telemetry.toml @@ -34,7 +34,7 @@ type = "CosmosSdk" id = 'chain_A' rpc_addr = 'http://127.0.0.1:26657' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26657/websocket' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' @@ -60,7 +60,7 @@ type = "CosmosSdk" id = 'chain_B' rpc_addr = 'http://127.0.0.1:26557' grpc_addr = 'http://127.0.0.1:9090' -event_source = { mode = 'push', url = 'ws://localhost:26557/websocket' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'testkey' diff --git a/guide/src/documentation/configuration/configure-hermes.md b/guide/src/documentation/configuration/configure-hermes.md index c63fab7200..721f87bb13 100644 --- a/guide/src/documentation/configuration/configure-hermes.md +++ b/guide/src/documentation/configuration/configure-hermes.md @@ -22,11 +22,11 @@ hermes [--config CONFIG_FILE] COMMAND ## Configuration -### Automatically Generating A Config File +### Automatically Generating A Config File The simplest way to configure Hermes for a given chain is by running the command -```shell +```shell {{#template ../../templates/commands/hermes/config/auto_1.md PATH=~//config.toml CHAIN1_NAME:OPTIONAL_KEY_NAME= }} ``` @@ -63,15 +63,13 @@ please refer to the [Keys](../commands/keys/index.md) sections in order to learn ## Connecting via TLS -Hermes supports connection via TLS for use-cases such as connecting from behind -a proxy or a load balancer. In order to enable this, you'll want to set the -`rpc_addr`, `grpc_addr`, or `event_source` parameters to specify a TLS -connection via HTTPS using the following scheme (note that the port number 443 -is just used for example): +Hermes supports connection via TLS for use-cases such as connecting from behind a proxy or a load balancer. +In order to enable this, you'll want to set the `rpc_addr`, `grpc_addr`, or `event_source` parameters to specify a TLS +connection via HTTPS using the following scheme (note that the port number 443 is just used for example): ``` rpc_addr = 'https://domain.com:443' grpc_addr = 'https://domain.com:443' -event_source = { mode = 'push', url = 'wss://domain.com:443/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } ``` ## Configuring Support for Interchain Accounts @@ -115,22 +113,22 @@ list = [ ] ``` -## Configuring Support for Consumer Chains that Utilize Cross-Chain Validation +## Configuring Support for Consumer Chains that Utilize Cross-Chain Validation As of version 1.4.1, Hermes supports relaying for consumer chains that utilize [cross-chain validation][ccv] (CCV). > **Note:** A consumer chain is essentially a regular Cosmos-SDK based chain that uses the interchain security -module to achieve economic security by stake deposited on a provider chain instead of on the consumer chain -itself. Consumer chains are bound to their provider chains by the provider's validator set. By being bound +module to achieve economic security by stake deposited on a provider chain instead of on the consumer chain +itself. Consumer chains are bound to their provider chains by the provider's validator set. By being bound together in this way, consumer chains inherit the economic security guarantees of the provider chain. > > You can read more about consumer chains, and Interchain Security more generally, at [https://cosmos.github.io/interchain-security][cosmos-github-io]. -If you are configuring Hermes in order to relay for a consumer chain, set `ccv_consumer_chain = true` under its `[[chains]]` section in the `config.toml` file. +If you are configuring Hermes in order to relay for a consumer chain, set `ccv_consumer_chain = true` under its `[[chains]]` section in the `config.toml` file. By default, this option is set to `false`. It should *ONLY* be toggled on for CCV consumer chains, *NOT* for sovereign chains. This parameter is required because consumer chains do not utilize the same staking module as sovereign chains. -Consumer chains must query a different gRPC endpoint in order to fetch the relevant `ccvconsumer` parameters that Hermes +Consumer chains must query a different gRPC endpoint in order to fetch the relevant `ccvconsumer` parameters that Hermes needs in order to relay on behalf of consumer chains. ## Connecting to a full node protected by HTTP Basic Authentication @@ -139,7 +137,7 @@ To connect to a full node protected by [HTTP Basic Authentication][http-basic-au specify the username and password in the `rpc_addr`, `grpc_addr` and `event_source` settings under the chain configuration in `config.toml`. -Here is an example with username `hello` and password `world`, assuming the RPC, WebSocket and gRPC servers +Here is an example with username `hello` and password `world`, assuming the RPC and gRPC servers listen on domain `mydomain.com` with TLS enabled (HTTPS/WSS). ```toml @@ -150,7 +148,7 @@ id = 'my-chain-0' rpc_addr = 'https://hello:world@mydomain.com:26657' grpc_addr = 'https://hello:world@mydomain.com:9090' -event_source = { mode = 'push', url = 'wss://hello:world@mydomain.com:26657/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } # ... ``` @@ -158,36 +156,10 @@ event_source = { mode = 'push', url = 'wss://hello:world@mydomain.com:26657/webs > **Caution:** The "Basic" authentication scheme sends the credentials encoded but not encrypted. > This would be completely insecure unless the exchange was over a secure connection (HTTPS/TLS). -## Configuring Support for Wasm Relaying - -Hermes supports the relaying of wasm messages natively. This is facilitated by configuring -Hermes to use pull-based relaying by polling for IBC events via the `/block_results` RPC endpoint. Set -the `event_source` parameter to pull mode in `config.toml` like so: - -```toml -# When specified like this, Hermes defaults to a poll interval of 1 second -event_source = { mode = 'pull' } -``` - -The default interval at which Hermes polls the RPC endpoint is 1 second. If you need to change the interval, -you can specify it like so: - -```toml -event_source = { mode = 'pull', interval = '2s' } -``` - -The pull model of relaying is in contrast with Hermes' default push model, where IBC events are received -over WebSocket. - -> **Note:** This mode should only be used in situations where Hermes misses events that it should -be receiving, such as when relaying for CosmWasm-enabled blockchains which emit IBC events without the -`message` attribute. Without this attribute, the WebSocket is not able to catch these events to stream -to Hermes, so the `/block_results` RPC endpoint must be used instead. - [ccv]: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/README.md [cosmos-github-io]: https://cosmos.github.io/interchain-security [http-basic-auth]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication [ica]: https://github.com/cosmos/ibc/blob/master/spec/app/ics-027-interchain-accounts/README.md [chain-registry]: https://github.com/cosmos/chain-registry [config-auto-reference]: ../commands/config.md#automatically-generate-configuration-files-for-specified-chains -[hermes-config]: https://github.com/informalsystems/hermes/blob/master/config.toml \ No newline at end of file +[hermes-config]: https://github.com/informalsystems/hermes/blob/master/config.toml diff --git a/guide/src/templates/files/hermes/local-chains/config.toml b/guide/src/templates/files/hermes/local-chains/config.toml index c0730f2a36..a2331d3d3d 100644 --- a/guide/src/templates/files/hermes/local-chains/config.toml +++ b/guide/src/templates/files/hermes/local-chains/config.toml @@ -30,7 +30,7 @@ id = 'ibc-0' type = "CosmosSdk" rpc_addr = 'http://localhost:27030' grpc_addr = 'http://localhost:27032' -event_source = { mode = 'push', url = 'ws://localhost:27030/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -59,7 +59,7 @@ id = 'ibc-1' type = "CosmosSdk" rpc_addr = 'http://localhost:27040' grpc_addr = 'http://localhost:27042' -event_source = { mode = 'push', url = 'ws://localhost:27040/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' diff --git a/guide/src/templates/files/hermes/more-chains/config_with_filters.toml b/guide/src/templates/files/hermes/more-chains/config_with_filters.toml index c74bab9a21..ffc71876be 100644 --- a/guide/src/templates/files/hermes/more-chains/config_with_filters.toml +++ b/guide/src/templates/files/hermes/more-chains/config_with_filters.toml @@ -30,7 +30,7 @@ id = 'ibc-0' type = 'CosmosSdk' rpc_addr = 'http://localhost:27050' grpc_addr = 'http://localhost:27052' -event_source = { mode = 'push', url = 'ws://localhost:27050/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -59,7 +59,7 @@ id = 'ibc-1' type = 'CosmosSdk' rpc_addr = 'http://localhost:27060' grpc_addr = 'http://localhost:27062' -event_source = { mode = 'push', url = 'ws://localhost:27060/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -89,7 +89,7 @@ id = 'ibc-2' type = 'CosmosSdk' rpc_addr = 'http://localhost:27070' grpc_addr = 'http://localhost:27072' -event_source = { mode = 'push', url = 'ws://localhost:27070/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -118,7 +118,7 @@ id = 'ibc-3' type = 'CosmosSdk' rpc_addr = 'http://localhost:27080' grpc_addr = 'http://localhost:27082' -event_source = { mode = 'push', url = 'ws://localhost:27080/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' diff --git a/guide/src/templates/files/hermes/more-chains/config_without_filters.toml b/guide/src/templates/files/hermes/more-chains/config_without_filters.toml index 93b1959d9e..0005f98385 100644 --- a/guide/src/templates/files/hermes/more-chains/config_without_filters.toml +++ b/guide/src/templates/files/hermes/more-chains/config_without_filters.toml @@ -30,7 +30,7 @@ id = 'ibc-0' type = 'CosmosSdk' rpc_addr = 'http://localhost:27050' grpc_addr = 'http://localhost:27052' -event_source = { mode = 'push', url = 'ws://localhost:27050/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -52,7 +52,7 @@ id = 'ibc-1' type = 'CosmosSdk' rpc_addr = 'http://localhost:27060' grpc_addr = 'http://localhost:27062' -event_source = { mode = 'push', url = 'ws://localhost:27060/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -74,7 +74,7 @@ id = 'ibc-2' type = 'CosmosSdk' rpc_addr = 'http://localhost:27070' grpc_addr = 'http://localhost:27072' -event_source = { mode = 'push', url = 'ws://localhost:27070/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -96,7 +96,7 @@ id = 'ibc-3' type = 'CosmosSdk' rpc_addr = 'http://localhost:27080' grpc_addr = 'http://localhost:27082' -event_source = { mode = 'push', url = 'ws://localhost:27080/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' diff --git a/guide/src/templates/files/hermes/more-chains/hermes_second_instance.toml b/guide/src/templates/files/hermes/more-chains/hermes_second_instance.toml index 5acc3944a7..f06761e36d 100644 --- a/guide/src/templates/files/hermes/more-chains/hermes_second_instance.toml +++ b/guide/src/templates/files/hermes/more-chains/hermes_second_instance.toml @@ -30,7 +30,7 @@ id = 'ibc-0' type = 'CosmosSdk' rpc_addr = 'http://localhost:27050' grpc_addr = 'http://localhost:27052' -event_source = { mode = 'push', url = 'ws://localhost:27050/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -58,7 +58,7 @@ id = 'ibc-1' type = 'CosmosSdk' rpc_addr = 'http://localhost:27060' grpc_addr = 'http://localhost:27062' -event_source = { mode = 'push', url = 'ws://localhost:27060/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -86,7 +86,7 @@ id = 'ibc-2' type = 'CosmosSdk' rpc_addr = 'http://localhost:27070' grpc_addr = 'http://localhost:27072' -event_source = { mode = 'push', url = 'ws://localhost:27070/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' @@ -114,7 +114,7 @@ id = 'ibc-3' type = 'CosmosSdk' rpc_addr = 'http://localhost:27080' grpc_addr = 'http://localhost:27082' -event_source = { mode = 'push', url = 'ws://localhost:27080/websocket', batch_delay = '200ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } rpc_timeout = '15s' trusted_node = true account_prefix = 'cosmos' diff --git a/guide/src/templates/files/hermes/production/config.toml b/guide/src/templates/files/hermes/production/config.toml index ad6c2d5808..ce763a6a09 100644 --- a/guide/src/templates/files/hermes/production/config.toml +++ b/guide/src/templates/files/hermes/production/config.toml @@ -31,7 +31,7 @@ port = 3001 id = 'cosmoshub-4' type = 'CosmosSdk' rpc_addr = 'https://rpc.cosmoshub.strange.love/' -event_source = { mode = 'push', url = 'wss://rpc.cosmoshub.strange.love/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } grpc_addr = 'https://grpc-cosmoshub-ia.notional.ventures/' rpc_timeout = '10s' account_prefix = 'cosmos' @@ -70,7 +70,7 @@ derivation = 'cosmos' id = 'osmosis-1' type = 'CosmosSdk' rpc_addr = 'https://rpc.osmosis.interbloc.org/' -event_source = { mode = 'push', url = 'wss://rpc.osmosis.interbloc.org/websocket', batch_delay = '500ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 3 } grpc_addr = 'https://grpc-osmosis-ia.notional.ventures/' rpc_timeout = '10s' account_prefix = 'osmo'