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

Fetch the light block at trusted_height + 1 when detecting misbehavior #3727

Merged
merged 6 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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 @@
- Fix a bug in the `evidence` command which would sometime
prevent the detected misbehaviour evidence from being submitted,
instead erroring out with a validator set hash mismatch.
([\#3697](https://github.com/informalsystems/hermes/pull/3697))
3 changes: 2 additions & 1 deletion crates/relayer/src/light_client/tendermint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ impl super::LightClient<CosmosSdkChain> for LightClient {
provider: self.peer_id,
};

let trusted_block = self.fetch(update_header.trusted_height)?;
// Get the light block at trusted_height + 1 from chain.
let trusted_block = self.fetch(update_header.trusted_height.increment())?;
if trusted_block.validators.hash() != update_header.trusted_validator_set.hash() {
return Err(Error::misbehaviour(format!(
"mismatch between the trusted validator set of the update \
Expand Down
Loading