Skip to content

Commit

Permalink
Merge branch 'master' into sean/channel-upgradability
Browse files Browse the repository at this point in the history
  • Loading branch information
ljoss17 committed Dec 20, 2023
2 parents 63f2da2 + 61260cf commit de88932
Show file tree
Hide file tree
Showing 12 changed files with 280 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Fix a bug in the `evidence` command which would sometimes
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))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Avoid retrieving a worker which is being removed by the idle worker clean-up
process.
process ([\#3703](https://github.com/informalsystems/hermes/issues/3703))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Update the values of `backlog` metrics when clearing packets.
Change the `backlog_oldest_timestamp` to `backlog_latest_update_timestamp`
which shows the last time the `backlog` metrics have been updated.
([\#3723](https://github.com/informalsystems/hermes/issues/3723))
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: digests
path: /tmp/digests/*
Expand All @@ -75,7 +75,7 @@ jobs:
- docker-build
steps:
- name: Download digests
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: digests
path: /tmp/digests
Expand Down
14 changes: 14 additions & 0 deletions crates/relayer/src/chain/counterparty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use crate::channel::ChannelError;
use crate::client_state::IdentifiedAnyClientState;
use crate::path::PathIdentifiers;
use crate::supervisor::Error;
use crate::telemetry;

pub fn counterparty_chain_from_connection(
src_chain: &impl ChainHandle,
Expand Down Expand Up @@ -506,6 +507,19 @@ pub fn unreceived_packets(
&path.counterparty_channel_id,
)?;

telemetry!(
update_backlog,
commit_sequences
.iter()
.map(|s| u64::from(*s))
.collect::<Vec<u64>>()
.clone(),
&counterparty_chain.id(),
&path.counterparty_channel_id,
&path.counterparty_port_id,
&chain.id()
);

let packet_seq_nrs =
unreceived_packets_sequences(chain, &path.port_id, &path.channel_id, commit_sequences)?;

Expand Down
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
12 changes: 11 additions & 1 deletion crates/relayer/src/worker/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,17 @@ impl WorkerMap {
config: &Config,
) -> &WorkerHandle {
if self.workers.contains_key(&object) {
&self.workers[&object]
if self.workers[&object].shutdown_stopped_tasks() {
self.remove_stopped(
self.workers[&object].id(),
self.workers[&object].object().clone(),
);

let worker = self.spawn_worker(src, dst, &object, config);
self.workers.entry(object).or_insert(worker)
} else {
&self.workers[&object]
}
} else {
let worker = self.spawn_worker(src, dst, &object, config);
self.workers.entry(object).or_insert(worker)
Expand Down
Loading

0 comments on commit de88932

Please sign in to comment.