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

Add evidence command for monitoring and reporting misbehavior evidence to counterparty clients #3456

Merged
merged 105 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 93 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
ab01656
evidence worker PoC for testing
ancazamfir Apr 25, 2023
0d6df8d
Cleanup
romac Jun 19, 2023
1709d1a
Use ibc-proto branch with new provider message
romac Jun 19, 2023
fc3aea4
Add `MsgSubmitIcsConsumerMisbehaviour` domain type from `anca/ics-mis…
romac Jun 21, 2023
81ef9dd
Report misbehavior evidence to all counterparty clients of the misbeh…
romac Jun 21, 2023
db9187e
Cleanup
romac Jun 28, 2023
2fa3287
Submit CCV misbehaviour if needed
romac Jun 28, 2023
700521f
Cleanup
romac Jun 28, 2023
ffc6d67
Check if counterparty is CCV provider
romac Jun 28, 2023
1e85c83
Cleanup
romac Jun 28, 2023
9f965aa
Add comment
romac Jun 30, 2023
b6605d9
Set proposer address in header2
ancazamfir Jul 10, 2023
9de7224
Prepend client updates - work in progress
ancazamfir Jul 10, 2023
93c81b4
Increase the timeout on CI (#3436)
romac Jun 22, 2023
d4e73ce
Improve some messages in `config auto` (#3438)
romac Jun 22, 2023
a4b7767
Update Data-Requirements.md
romac Jun 29, 2023
49f8ac1
Update Data-Requirements.md
romac Jun 29, 2023
84b59e0
Add CCV chain bootstrap to CI with Neutron and Gaia (#3451)
ljoss17 Jun 30, 2023
75ec1b3
Bump serde from 1.0.164 to 1.0.166 (#3458)
dependabot[bot] Jul 4, 2023
7854b2c
Bump async-trait from 0.1.68 to 0.1.69 (#3459)
dependabot[bot] Jul 4, 2023
cfd005b
Bump erased-serde from 0.3.25 to 0.3.26 (#3460)
dependabot[bot] Jul 4, 2023
2e6b2d4
Document clock drift parameters in guide (#3420)
seanchen1991 Jul 7, 2023
fa4b990
Bump uuid from 1.3.3 to 1.4.0 (#3461)
dependabot[bot] Jul 10, 2023
b10d758
Fix wrong sequence number in `MsgTimeoutOnClose` (#3440)
puneet2019 Jul 10, 2023
a929e05
Include client updates for supporting messages when assembling messag…
romac Jul 11, 2023
71d5f30
Use `max_expected_time_per_block` value for the `max_block_time` (#3467)
ljoss17 Jul 11, 2023
c0ed9a3
`config auto` now generates a config file even when it encounters an …
seanchen1991 Jul 12, 2023
5846cb9
Merge branch 'master' into anca/evidene_worker_poc
romac Jul 14, 2023
a5f768e
Build client update for header at common height
romac Jul 14, 2023
c620e9b
Add forking script
romac Jul 14, 2023
67bc213
Check for misbehavior in the last 100 blocks
romac Jul 14, 2023
2cbae73
Add ICS misbehaviour test
romac Jul 17, 2023
589f75a
Add interchain-security to flake.nix
romac Jul 17, 2023
ed587c9
Use cosmos.nix branch with proper version of interchain-security
romac Jul 17, 2023
0ef0607
Remove test script
romac Jul 17, 2023
d025043
Update guide templates
romac Jul 17, 2023
9d9ec0c
Merge branch 'master' into anca/evidene_worker_poc
romac Jul 18, 2023
b748ef1
Merge branch 'master' into anca/evidene_worker_poc
romac Aug 10, 2023
043cb03
Post-merge fixes
romac Aug 10, 2023
44fbe36
Update deps
romac Aug 10, 2023
7d0b146
Use latest ICS protos
romac Aug 10, 2023
5ff82a9
Adapt to change of `MsgSubmitIcsConsumerMisbehaviour::misbehaviour` t…
romac Aug 10, 2023
ecfb092
Submit both ICS and standard misbehaviour messages to provider chains
romac Aug 10, 2023
6cfe8e3
Fix bug where update client message was dropped
romac Aug 29, 2023
a5684b8
Revert changes of misbehaviour field to Any
romac Aug 29, 2023
b62286f
Submit consumer double voting evidence to the provider
romac Aug 29, 2023
bdd908b
Formatting
romac Aug 31, 2023
8043763
Fix clippy warnings
romac Aug 31, 2023
be8940b
Update guide templates
romac Aug 31, 2023
b6d03a1
fix: send evidences with non-empty infraction block header (#3578)
sainoe Sep 13, 2023
61b7f81
Merge branch 'master' into anca/evidene_worker_poc
romac Sep 13, 2023
ff10df1
Fix post-merge conflict
romac Sep 13, 2023
f33f868
Better light client attack misbehaviour test
romac Sep 13, 2023
7a1b293
Improve logs in fishy error cases
romac Sep 13, 2023
47193cb
Better error messages when client state is of unexpected type
romac Sep 13, 2023
352332f
Gracefully handle unsupported client types
romac Sep 13, 2023
c0581d3
WIP: Add double sign test
romac Sep 13, 2023
f5d3729
Add test for consumer chain double signing
romac Sep 13, 2023
344f3a8
Gracefully handle unsupported client types in `query connnections`
romac Sep 13, 2023
5c7e87a
Update flake lockfile
romac Sep 14, 2023
8b6141d
Better logs in evidence command
romac Sep 14, 2023
b1a2db5
Rename jobs and script
romac Sep 14, 2023
fd26a58
Fix evidence submission (#3612)
romac Sep 26, 2023
5ff700e
Properly compute the trusted validator set
romac Sep 27, 2023
4762131
Cleanup
romac Sep 27, 2023
cfcc312
Remove sleeps in double sign test
romac Sep 27, 2023
7aa77c7
Merge branch 'master' into anca/evidene_worker_poc
romac Sep 27, 2023
0a7f5eb
Update ibc-proto
romac Sep 27, 2023
f025aa6
Update ibc-proto to v0.36.0
romac Sep 28, 2023
39adcc6
Do not panic when unable to find the chain
romac Sep 28, 2023
ac48352
Throttle the requests made to the chain while checking past blocks
romac Sep 28, 2023
7985ae9
Merge branch 'master' into anca/evidene_worker_poc
romac Sep 29, 2023
c17cc98
Add changelog entries
romac Sep 29, 2023
b746151
Show logs on failure
romac Oct 2, 2023
8fb5e93
Update ibc-proto to v0.36.1
romac Oct 4, 2023
cd7333e
Merge branch 'master' into anca/evidene_worker_poc
romac Oct 5, 2023
bf3b98e
Update `ibc-proto` to v0.38.0-pre.1 which includes the required CCV p…
romac Oct 5, 2023
c7ec073
Improve logs
romac Oct 5, 2023
f392f1e
Check for successful submission in the integration test
romac Oct 5, 2023
9b9e898
Fix CI script for the case where the client is already frozen
romac Oct 5, 2023
d9c267e
Merge branch 'master' into anca/evidene_worker_poc
romac Oct 5, 2023
2ef9317
Submit the ICS misbehaviour for LCA and double signing even if client is
ancazamfir Oct 6, 2023
9ae80dd
Fix clippy warning
ancazamfir Oct 7, 2023
51cb1f9
Avoid sending client updates without the misbehavior
ancazamfir Oct 7, 2023
cb96ffc
Include proposer in validator set
romac Oct 10, 2023
afdc3cd
Merge branch 'master' into anca/evidene_worker_poc
romac Oct 13, 2023
9cb4d3e
Only submit ICS evidence when provider has a consensus state at the c…
romac Oct 13, 2023
e4a4054
Update flake
romac Oct 13, 2023
6da442a
WIP: Use Rust light client to report evidence
romac Oct 13, 2023
f1b83fe
WIP: Use Go light client to detect misbehaviour
romac Oct 13, 2023
136e25b
Issue error when evidence is emitted at forked height
romac Oct 13, 2023
8bfb121
Detect and report misbehaviour using the CometBFT light client to avo…
romac Oct 13, 2023
2300d6c
Add test for when the client is frozen already by the relayer
romac Oct 16, 2023
ea73fc0
Only send the ICS misbehaviour message when the provider client is al…
romac Oct 16, 2023
d39546d
Better cache frozen status of client
romac Oct 16, 2023
78e2ed7
Never send IBC message if client is already frozen
romac Oct 16, 2023
3e8b37f
No need to submit client update if provider chain already has common …
romac Oct 16, 2023
530a979
Abort early if there are no messages to send
romac Oct 16, 2023
992afc3
Update comment
romac Oct 16, 2023
4c3a8ad
Update double sign test
romac Oct 17, 2023
c27b9e4
Skip UpdateClient message if counterparty has consensus state at comm…
romac Oct 17, 2023
116f141
Improve logs a little bit
romac Oct 17, 2023
c72a270
Small refactor
romac Oct 17, 2023
78c1792
Check that counterparty client id matches the CCV client id on the pr…
romac Oct 17, 2023
c58c119
Create a dummy connection to exercise the provider detection code
romac Oct 17, 2023
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
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))
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@v3
- 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@v1
- 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@v3
- 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@v1
- 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@v3
- 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@v1
- 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

Loading
Loading