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

Conversation

romac
Copy link
Member

@romac romac commented Jun 28, 2023

Closes: #3223
Closes: #3219

TODO


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@ancazamfir
Copy link
Collaborator

I added some testing instructions at here.
The last step, running the new evidence CLI, currently fails due to missing client updates.

romac and others added 15 commits July 14, 2023 09:30
Signed-off-by: Romain Ruetschi <[email protected]>
Signed-off-by: Romain Ruetschi <[email protected]>
* Add clock-drift.md file to guide

* Add section on mis-configuring clock drift

* Update guide/src/advanced/troubleshooting/clock-drift.md

Co-authored-by: Anca Zamfir <[email protected]>
Signed-off-by: Sean Chen <[email protected]>

* Update guide/src/advanced/troubleshooting/clock-drift.md

Co-authored-by: Anca Zamfir <[email protected]>
Signed-off-by: Sean Chen <[email protected]>

* Remove redundant section

* Update guide/src/advanced/troubleshooting/clock-drift.md

Co-authored-by: Anca Zamfir <[email protected]>
Signed-off-by: Sean Chen <[email protected]>

* Update guide/src/advanced/troubleshooting/clock-drift.md

Co-authored-by: Anca Zamfir <[email protected]>
Signed-off-by: Sean Chen <[email protected]>

* Explain what `C` constant represents

* Add reference to forward lunatic attack

---------

Signed-off-by: Sean Chen <[email protected]>
Co-authored-by: Anca Zamfir <[email protected]>
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.3 to 1.4.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](uuid-rs/uuid@1.3.3...1.4.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The MsgTimeoutOnClose requires sequence of dstchannel.NextRecv in ordered channels, rather than packet.Sequence.
The code above resolve the sequence for ordered and unordered, just while creating msg it is ignored.

Signed-off-by: Puneet <[email protected]>
…es to relay from the operational data (#3468)

* Include client updates for supporting messages when assembling messages to relay from the operational data

* Add changelog entry
* Use max_block_time queried from /genesis

* Clean solution

* Add unclog entry

* Remove serde-with dependency
…error (#3466)

* Stub out code flow

* Stub out code flow

* Change return type of `hermes_cofig` fn

* Define ConfigAutoError type

* Add some printlns

* Change `get_configs` return type

* Change AutoCmd::run

* Get it to compile

* Fix false reporting of missing chain configs

* Change get_data_from_handles

* Get it working

* Remove some debugging code

* Cargo fmt

* Update `get_configs` doc comment

* Update gas price warning in guide

* Cargo fmt
@romac romac marked this pull request as ready for review October 13, 2023 15:59
@romac romac requested a review from ancazamfir October 16, 2023 12:20
@romac
Copy link
Member Author

romac commented Oct 16, 2023

If client is alreadyt frozen we can check if the common height consensus state is already on-chain and in that case just submit the ICS evidence.

9cb4d3e

I wonder if we do actually need to submit the regular misbehavior evidence or if we should only submit the ICS one?

ea73fc0

return Ok(());
}

let mut msgs = match counterparty_client.wait_and_build_update_client(common_height) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update client if provider_has_common_consensus_state?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had missed that, good catch! No need indeed, since the provider already has that consensus state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do the same for sovereign chains? i.e. rename provider_has_common_consensus_state to counterparty_has_common_consensus_state and drop the counterparty_is_provider check from its definition. Then, if true, skip client update for both provider and sovereign chain as well.

@romac romac requested a review from ancazamfir October 16, 2023 19:19
@sainoe sainoe self-requested a review October 17, 2023 11:45
Copy link
Collaborator

@ancazamfir ancazamfir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yayy! Amazing work @romac!

@romac romac merged commit db50666 into master Oct 18, 2023
42 checks passed
@romac romac deleted the anca/evidene_worker_poc branch October 18, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants