Skip to content

Commit

Permalink
Panic on overflow in release mode (#3390)
Browse files Browse the repository at this point in the history
* Panic on overflow in release mode

* Add changelog entry

* Ignore slow and flaky chain registry tests

* Put profile config in workspace root
  • Loading branch information
romac authored Jun 5, 2023
1 parent ae0a00b commit a9335b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Overflow checks are now enabled when Hermes is build in release mode, in
order to better catch and address potential logic errors leading to overflows
([\#3390](https://github.com/informalsystems/hermes/issues/3390))
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ exclude = [
"tools/query-events",
]

[profile.release]
overflow-checks = true

[patch.crates-io]
# ibc-proto = { git = "https://github.com/cosmos/ibc-proto-rs.git", branch = "main" }
# tendermint = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/new-misbehavior-detector" }
Expand Down
4 changes: 4 additions & 0 deletions crates/relayer-cli/src/chain_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ mod tests {

#[tokio::test]
#[serial]
#[ignore]
async fn fetch_chain_config_with_packet_filters() -> Result<(), RegistryError> {
let test_chains: &[String] = &[
"cosmoshub".to_string(),
Expand Down Expand Up @@ -405,6 +406,7 @@ mod tests {

#[tokio::test]
#[serial]
#[ignore]
async fn fetch_chain_config_without_packet_filters() -> Result<(), RegistryError> {
// The commit from 28.04.23 does not have `evmos-juno.json` nor `juno-evmos.json` file:
// https://github.com/cosmos/chain-registry/tree/master/_IBC
Expand All @@ -414,13 +416,15 @@ mod tests {

#[tokio::test]
#[serial]
#[ignore]
async fn fetch_one_chain() -> Result<(), RegistryError> {
let test_chains: &[String] = &["cosmoshub".to_string()]; // Must be sorted
should_have_no_filter(test_chains).await
}

#[tokio::test]
#[serial]
#[ignore]
async fn fetch_no_chain() -> Result<(), RegistryError> {
let test_chains: &[String] = &[];
let configs = get_configs(test_chains, Some(TEST_COMMIT.to_owned())).await?;
Expand Down

0 comments on commit a9335b3

Please sign in to comment.