Skip to content

Commit

Permalink
Merge pull request #8 from penumbra-zone/config-enum
Browse files Browse the repository at this point in the history
relayer: scope config per endpoint
  • Loading branch information
erwanor authored Oct 26, 2023
2 parents 7688db7 + d7f8674 commit d76cdc9
Show file tree
Hide file tree
Showing 294 changed files with 5,332 additions and 2,545 deletions.
2 changes: 0 additions & 2 deletions .changelog/unreleased/breaking-changes/3548-cometbft-0.38.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- The `type` key in the `[[chains]]` section is now required. ([\#3636](https://github.com/informalsystems/hermes/issues/3636))
If you previously did not specify that key, you must now set it to `type = "CosmosSdk"`, eg.

```rust
[[chains]]
id = "osmosis-1"
type = "CosmosSdk"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Change config format to scope configs by type. This enables adding support for
more types of chain, even when those have different config options than each
other. ([\#3636](https://github.com/informalsystems/hermes/issues/3636))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Add a new `evidence` command for monitoring the blocks emitted
by a chain for the presence of a misbehaviour evidence, and
report that evidence to all counteparty clients of that chain.
([\#3456](https://github.com/informalsystems/hermes/pull/3456))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- When Hermes detects a misbehaviour on a chain that is CCV
consumer, it will now send the misbehaviour evidence to the
provider chain using the new `IcsConsumerMisbehaviour` message.
([\#3219](https://github.com/informalsystems/hermes/issues/3219))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- When Hermes detects a misbehaviour from a on-chain client, eg. a light
client attack or a double-sign, it will now submit the misbehaviour
evidence to all counterparty clients of the misbehaving chain
instead of to the counterparty client of the misbehaving client only.
([\#3223](https://github.com/informalsystems/hermes/issues/3223))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Change fallback compatibility version for CometBFT from v0.37 to v0.34
([\#3666](https://github.com/informalsystems/hermes/issues/3666))
25 changes: 25 additions & 0 deletions .changelog/v1.7.0/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
*October 20th, 2023*

This v1.7 release introduces new features and improvements to Hermes.

One of the key highlights is the addition of new misbehavior detection features.

Hermes now includes a new command called `evidence`, which monitors the blocks emitted by a chain for any presence of misbehavior evidence.

If misbehavior is detected, the CLI will report that evidence to all counterparty clients of that chain.
On top of that, misbehavior evidence detected on a chain that is a CCV (Cross-Chain Validation) consumer
is now sent to its provider chain, alerting it directly of the misbehaving consumer chain.

Furthermore, when misbehavior is detected from an on-chain client, such as a light client attack or a double-sign,
the evidence is now submitted to all counterparty clients of the misbehaving chain, rather than just the
counterparty client of the misbehaving client.

In addition, the REST server of Hermes now has a `/clear_packets` endpoint which allows triggering
packet clearing for a specific chain or all chains if no specific chain is provided.

Another notable improvement is the ability to change `tracing` directives at runtime.
This feature lets users adjust tracing settings dynamically as needed, providing a more
customizable and efficient debugging experience.

Overall, the new misbehavior detection features in Hermes contribute to a more robust and secure environment,
enabling timely identification and response to potential misbehaving actors.
165 changes: 164 additions & 1 deletion .github/workflows/misbehaviour.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ concurrency:
cancel-in-progress: true

jobs:
misbehaviour:
light-client-attack:
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
Expand Down Expand Up @@ -91,3 +91,166 @@ jobs:
run: |
nix shell .#${{ matrix.chain.package }} -c bash misbehaviour_test.sh
ics-light-client-attack:
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
chain:
- package: interchain-security
account_prefix: cosmos
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Use cachix cache
uses: cachix/cachix-action@v12
with:
name: cosmos
- name: Install sconfig
uses: jaxxstorm/[email protected]
with:
repo: freshautomations/sconfig
platform: linux
arch: amd64
extension-matching: disable
rename-to: sconfig
chmod: 0755
- name: Install stoml
uses: jaxxstorm/[email protected]
with:
repo: freshautomations/stoml
platform: linux
arch: amd64
extension-matching: disable
rename-to: stoml
chmod: 0755
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Use Rust cache
uses: Swatinem/rust-cache@v2
- name: Build Hermes
uses: actions-rs/cargo@v1
with:
command: build
- name: Run test
working-directory: ci/misbehaviour-ics
run: |
nix shell .#cometbft .#${{ matrix.chain.package }} -c bash light_client_attack_test.sh
ics-light-client-attack-freeze:
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
chain:
- package: interchain-security
account_prefix: cosmos
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Use cachix cache
uses: cachix/cachix-action@v12
with:
name: cosmos
- name: Install sconfig
uses: jaxxstorm/[email protected]
with:
repo: freshautomations/sconfig
platform: linux
arch: amd64
extension-matching: disable
rename-to: sconfig
chmod: 0755
- name: Install stoml
uses: jaxxstorm/[email protected]
with:
repo: freshautomations/stoml
platform: linux
arch: amd64
extension-matching: disable
rename-to: stoml
chmod: 0755
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Use Rust cache
uses: Swatinem/rust-cache@v2
- name: Build Hermes
uses: actions-rs/cargo@v1
with:
command: build
- name: Run test
working-directory: ci/misbehaviour-ics
run: |
nix shell .#${{ matrix.chain.package }} -c bash light_client_attack_freeze_test.sh
ics-double-sign:
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
chain:
- package: interchain-security
account_prefix: cosmos
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Use cachix cache
uses: cachix/cachix-action@v12
with:
name: cosmos
- name: Install sconfig
uses: jaxxstorm/[email protected]
with:
repo: freshautomations/sconfig
platform: linux
arch: amd64
extension-matching: disable
rename-to: sconfig
chmod: 0755
- name: Install stoml
uses: jaxxstorm/[email protected]
with:
repo: freshautomations/stoml
platform: linux
arch: amd64
extension-matching: disable
rename-to: stoml
chmod: 0755
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Use Rust cache
uses: Swatinem/rust-cache@v2
- name: Build Hermes
uses: actions-rs/cargo@v1
with:
command: build
- name: Run test
working-directory: ci/misbehaviour-ics
run: |
nix shell .#${{ matrix.chain.package }} -c bash double_sign_test.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ mc.log

# Ignore OSX .DS_Store file
.DS_Store

# Ignore tooling Cargo.lock
tools/check-guide/Cargo.lock
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,81 @@
# CHANGELOG

## v1.7.0

*October 20th, 2023*

This v1.7 release introduces new features and improvements to Hermes.

One of the key highlights is the addition of new misbehavior detection features.

- Hermes now includes a new command called `evidence`, which monitors the blocks emitted by a chain for any presence of misbehavior evidence.
- If misbehavior is detected, the CLI will report that evidence to all counterparty clients of that chain.
On top of that, misbehavior evidence detected on a chain that is a CCV (Cross-Chain Validation) consumer
is now sent to its provider chain, alerting it directly of the misbehaving consumer chain.
- Furthermore, when misbehavior is detected from an on-chain client, such as a light client attack or a double-sign,
the evidence is now submitted to all counterparty clients of the misbehaving chain, rather than just the
counterparty client of the misbehaving client.

In addition, the REST server of Hermes now has a `/clear_packets` endpoint which allows triggering
packet clearing for a specific chain or all chains if no specific chain is provided.

Another notable improvement is the ability to change `tracing` directives at runtime.
This feature lets users adjust tracing settings dynamically as needed, providing a more
customizable and efficient debugging experience.

Overall, the new misbehavior detection features in Hermes contribute to a more robust and secure environment,
enabling timely identification and response to potential misbehaving actors.

### FEATURES

- [Relayer CLI](relayer-cli)
- Add a new `evidence` command for monitoring the blocks emitted
by a chain for the presence of a misbehaviour evidence, and
report that evidence to all counteparty clients of that chain.
([\#3456](https://github.com/informalsystems/hermes/pull/3456))
- Add a `/clear_packets?chain=CHAIN_ID` endpoint to the built-in
REST server to trigger packet clear for the chain specified in the
chain query param or for all chains if the query param is omitted.
([\#3398](https://github.com/informalsystems/hermes/issues/3398))
- Add support for changing `tracing` directives at runtime.
Please see the [corresponding page in the Hermes guide][tracing-guide] for more information.
([\#3564](https://github.com/informalsystems/hermes/issues/3564))

[tracing-guide]: https://hermes.informal.systems/advanced/troubleshooting/log-level.html


### IMPROVEMENTS

- [Relayer Library](relayer)
- When Hermes detects a misbehaviour on a chain that is CCV
consumer, it will now send the misbehaviour evidence to the
provider chain using the new `IcsConsumerMisbehaviour` message.
([\#3219](https://github.com/informalsystems/hermes/issues/3219))
- When Hermes detects a misbehaviour from a on-chain client, eg. a light
client attack or a double-sign, it will now submit the misbehaviour
evidence to all counterparty clients of the misbehaving chain
instead of to the counterparty client of the misbehaving client only.
([\#3223](https://github.com/informalsystems/hermes/issues/3223))
- Improve error message when scanning unsupported client
([\#3531](https://github.com/informalsystems/hermes/issues/3531))
- Regard the `finalize_block_events` field of the `block_results` RPC endpoint, added in CometBFT 0.38
([\#3548](https://github.com/informalsystems/hermes/issues/3548))
- Change fallback compatibility version for CometBFT from v0.37 to v0.34
([\#3666](https://github.com/informalsystems/hermes/issues/3666))
- [Relayer CLI](relayer-cli)
- The `listen` command now works with both `push` and `pull` event sources
([\#3501](https://github.com/informalsystems/hermes/issues/3501))

### BUG FIXES

- [Relayer CLI](relayer-cli)
- Revert Docker image to Ubuntu LTS and set the UID and GID explicitly
([\#3580](https://github.com/informalsystems/hermes/issues/3580))
- [IBC Data structures](relayer-types)
- Fix build of `ibc-relayer-types` documentation on docs.rs
([\#3549](https://github.com/informalsystems/hermes/issues/3549))


## v1.6.0

*July 19th, 2023*
Expand Down
Loading

0 comments on commit d76cdc9

Please sign in to comment.