Skip to content

Commit

Permalink
Merge branch 'master' into romac/handshake-bounded-retries
Browse files Browse the repository at this point in the history
  • Loading branch information
romac authored Mar 6, 2024
2 parents 240d82f + 2f9fdb5 commit 96f948e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Recover from gas simulation failures on legacy chains.
([\#3792](https://github.com/informalsystems/hermes/issues/3792))
25 changes: 12 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subtle-encoding = "0.5"
humantime-serde = "1.1.1"
serde = "1.0"
serde_derive = "1.0"
thiserror = "1.0.56"
thiserror = "1.0.57"
toml = "0.8"
tracing = "0.1.36"
tokio = { version = "1.0", features = ["rt-multi-thread", "time", "sync"] }
Expand Down Expand Up @@ -66,7 +66,7 @@ ed25519 = "2.2.2"
ed25519-dalek = { version = "2.0.0", features = ["serde"] }
ed25519-dalek-bip32 = "0.3.0"
generic-array = "0.14.7"
secp256k1 = { version = "0.28.1", features = ["rand-std"] }
secp256k1 = { version = "0.28.2", features = ["rand-std"] }
strum = { version = "0.25", features = ["derive"] }
tokio-stream = "0.1.14"
once_cell = "1.19.0"
Expand Down
1 change: 1 addition & 0 deletions crates/relayer/src/chain/cosmos/estimate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ fn can_recover_from_simulation_failure(e: &Error) -> bool {
detail.is_client_state_height_too_low()
|| detail.is_account_sequence_mismatch_that_can_be_ignored()
|| detail.is_out_of_order_packet_sequence_error()
|| detail.is_empty_tx_error()
}
_ => false,
}
Expand Down
8 changes: 8 additions & 0 deletions crates/relayer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,14 @@ impl GrpcStatusSubdetail {
Some((expected, got)) => expected < got,
}
}

/// Check whether this gRPC error message contains the string "invalid empty tx".
///
/// ## Note
/// This error may happen for older chains that does not properly support simulation.
pub fn is_empty_tx_error(&self) -> bool {
self.status.message().contains("invalid empty tx")
}
}

/// Assumes that the cosmos-sdk account sequence mismatch error message, that may be seen
Expand Down
2 changes: 1 addition & 1 deletion tools/integration-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ name = "test_setup_with_binary_channel"
doc = true

[dev-dependencies]
tempfile = "3.6.0"
tempfile = "3.10.1"

[dependencies.tendermint]
version = "0.34.0"
Expand Down

0 comments on commit 96f948e

Please sign in to comment.