-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add per chain
clear_interval
configuration (#3693)
* Add per chain clear_interval configuration * Add changelog entry * Add guide entry for packet clearing * Reword config comment Signed-off-by: Romain Ruetschi <[email protected]> --------- Signed-off-by: Romain Ruetschi <[email protected]> Co-authored-by: Romain Ruetschi <[email protected]>
- Loading branch information
Showing
11 changed files
with
211 additions
and
11 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/features/ibc-relayer/3691-per-chain-clear-interval.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Add a configuration which allows to override the `clear_interval` for specific | ||
chains ([\#3691](https://github.com/informalsystems/hermes/issues/3691)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Packet clearing | ||
|
||
Hermes can be configured in order to clear packets which haven't been relayed. This can happen if there wasn't a relayer instance running when the packet event was submitted or if there was an issue relaying the packet. | ||
|
||
There are three different configurations to determine when Hermes will clear packets. | ||
|
||
## Global configurations | ||
|
||
Two of these configurations are global to all chains and are in the `[mode.packet]` section. | ||
|
||
### 1. `clear_on_start` | ||
|
||
```toml | ||
[mode.packet] | ||
... | ||
clear_on_start = true | ||
``` | ||
|
||
This configuration is used to specify if Hermes should query and relay pending packets when starting the instance. If set this will only trigger once per running instance. | ||
|
||
>__NOTE__: If this configuration is enabled Hermes will need to scan for channels as the pending packets will require the channel worker, refer to the [Slow start section](./performance.md#3-slow-start) for more information. | ||
### 2. `clear_interval` | ||
|
||
```toml | ||
[mode.packet] | ||
... | ||
clear_interval = 100 | ||
``` | ||
|
||
This configuration defines how often Hermes will verify if there are pending packets and relay them. The value is the number of blocks observed, so the time between each clearing might very from chain to chain. | ||
|
||
## Chain specific configuration | ||
|
||
The third configuration is specific for each chain. | ||
|
||
### 3. `clear_interval` | ||
|
||
```toml | ||
[[chains]] | ||
... | ||
clear_interval = 50 | ||
``` | ||
|
||
An additional `clear_interval` can be specified for each chain, this value is also in number of blocks. This configuration will override the clear interval value for the specific chain and can be used if chains need to have different clear values. This configuration is optional, if it is not set the global value will be used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters