informalsystems / hermes

IBC Relayer in Rust
https://hermes.informal.systems
Apache License 2.0
450 stars 329 forks source link

Submit misbehaviour messages using the CCV consumer id (Permissionless ICS) #4182

Closed romac closed 1 week ago

romac commented 2 months ago

Closes: #4153

Depends on: https://github.com/informalsystems/tendermint-rs/pull/1467

Description


PR author checklist:

Reviewer checklist:

ancazamfir commented 3 weeks ago

If I run double_sign_test.sh with ics v6.3.0 I get the following error (changed the script to print the raw_log) :

30
consumer creation failed with code: "failed to execute message; message index: 0: cannot set consumer initialization parameters: invalid initial height for consumer id (0): chain ID (consumer) doesn't match revision number (1): invalid consumer initialization parameters"

Same happens with light_client_attack_freeze_test.sh and light_client_attack_test.sh.

Scripts work with v6.2.0

ancazamfir commented 3 weeks ago

Also, do we have any tests where we test a 3rd-party chain connecting to a consumer chain, in addition to the provider. And the test should check both 3rd party and the provider chains freeze their clients, and the provider gets the extra ICS message. (this is for light client attack)

ljoss17 commented 2 weeks ago

If I run double_sign_test.sh with ics v6.3.0 I get the following error (changed the script to print the raw_log) :

30
consumer creation failed with code: "failed to execute message; message index: 0: cannot set consumer initialization parameters: invalid initial height for consumer id (0): chain ID (consumer) doesn't match revision number (1): invalid consumer initialization parameters"

Same happens with light_client_attack_freeze_test.sh and light_client_attack_test.sh.

Scripts work with v6.2.0

I will look into this

ljoss17 commented 2 weeks ago

Also, do we have any tests where we test a 3rd-party chain connecting to a consumer chain, in addition to the provider. And the test should check both 3rd party and the provider chains freeze their clients, and the provider gets the extra ICS message. (this is for light client attack)

I think it would be best to migrate from the .sh scripts to the integration-tests in order to easily do this

ljoss17 commented 2 weeks ago

If I run double_sign_test.sh with ics v6.3.0 I get the following error (changed the script to print the raw_log) :

30
consumer creation failed with code: "failed to execute message; message index: 0: cannot set consumer initialization parameters: invalid initial height for consumer id (0): chain ID (consumer) doesn't match revision number (1): invalid consumer initialization parameters"

Same happens with light_client_attack_freeze_test.sh and light_client_attack_test.sh.

Scripts work with v6.2.0

It should now be fixed with 40bc893ffb1092c942b7869ef1d7a46420b8697f

ancazamfir commented 2 weeks ago

I think it would be best to migrate from the .sh scripts to the integration-tests in order to easily do this

Ok, sounds good. Let's do it in a separate PR.

ljoss17 commented 1 week ago

I think it would be best to migrate from the .sh scripts to the integration-tests in order to easily do this

Ok, sounds good. Let's do it in a separate PR.

Opened the issue https://github.com/informalsystems/hermes/issues/4238