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

imp(ibc)!: refactor error handling throughout codebase #1350

Merged
merged 20 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0d98ebf
Clean up `ibc-apps` errors (#1318)
seanchen1991 Aug 22, 2024
e1b4db2
Clean up `ibc-core` and `ibc-clients` error types (#1317)
seanchen1991 Aug 23, 2024
466c13d
Clean up `QueryError` and `RelayerError` types (#1321)
seanchen1991 Aug 27, 2024
bfad72f
Consolidate decoding-related errors into new `DecodingError` type (#1…
seanchen1991 Sep 9, 2024
4b247a3
Fix merge conflicts
seanchen1991 Sep 12, 2024
6db56cc
imp(ibc-apps): migrate to `DecodingError` in `TryFrom` conversions (#…
Farhad-Shabani Sep 13, 2024
1cdd295
Define `HostError` type (#1331)
seanchen1991 Sep 16, 2024
6fe0295
Fix merge conflicts
seanchen1991 Sep 17, 2024
a4e409a
Consolidate `PacketError` and `ChannelError` (#1343)
seanchen1991 Sep 17, 2024
4aecaec
Add `HostError` contexts to module-level error types (#1345)
seanchen1991 Sep 18, 2024
5bdd377
Clean up generic String variants in error types (#1347)
seanchen1991 Sep 20, 2024
df73878
nitpicks
Farhad-Shabani Sep 20, 2024
2c94671
fix: remove ibc-core-connection-types dep under ICS-04
Farhad-Shabani Sep 20, 2024
3ca721d
fix: propogate errors in refund_packet_nft_execute
Farhad-Shabani Sep 23, 2024
1ba66b9
fix: revert few errors in ICS-20 module callbacks
Farhad-Shabani Sep 23, 2024
91ac57b
imp: use if let for type_url matches
Farhad-Shabani Sep 23, 2024
0642d4a
nit: minor improvements
Farhad-Shabani Sep 23, 2024
9045377
fix: use RouterError in case of ModuleID not found
Farhad-Shabani Sep 23, 2024
e6022a4
chore: add changelog
Farhad-Shabani Sep 24, 2024
adb5514
chore: add changelog for #1319
Farhad-Shabani Sep 24, 2024
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [cosmwasm] Migrate the `cosmwasm` workspace into its own separate repository
located at [cosmwasm-ibc](https://github.com/informalsystems/cosmwasm-ibc).
([\#1311](https://github.com/cosmos/ibc-rs/issues/1311))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc] Consolidate decoding-related errors into new `DecodingError` type
([\1319](https://github.com/cosmos/ibc-rs/issues/1319))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [ibc-core] Define a new `HostError` type in ICS-24 to draw distinction between
protocol errors and host errors. Additionally, rename `ContextError` to
`HandlerError` to better reflect its use case.
([\1320](https://github.com/cosmos/ibc-rs/issues/1320))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-core-channel] Merge `PacketError` type into `ChannelError`
([#1339](https://github.com/cosmos/ibc-rs/issues/1339))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [ibc] Clean up multi-purpose variants like the `Other` variant and reduce
unnecessary `String` allocations in `*Error` enums.
([\#1346](https://github.com/cosmos/ibc-rs/issues/1346))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [ibc] Standardize error variants across the codebase to make them less
specific and more consistent.
([\#270](https://github.com/cosmos/ibc-rs/issues/270))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-core-handler] Return `DecodingError` for `MsgEnvelope` when trying to
decode from `Any` ([\#950](https://github.com/cosmos/ibc-rs/issues/950))
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- Modify `validate_self_client` error type to return `ContextError` instead of
`ConnectionError`
([#482](https://github.com/cosmos/ibc-rs/issues/482))
- Modify `validate_self_client` error type to return `HostError` instead of
`ConnectionError`
([#482](https://github.com/cosmos/ibc-rs/issues/482))
2 changes: 1 addition & 1 deletion .changelog/v0.33.0/improvement/547-error-strings.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Fix ContextError Display output
- Fix HandlerError Display output
([#547](https://github.com/cosmos/ibc-rs/issues/547))
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- Allow hosts to handle overflow cases in `increase_*_counter` methods by
returning `Result<(),ContextError>` type.
returning `Result<(),HostError>` type.
([#857](https://github.com/cosmos/ibc-rs/issues/857))
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- logger and event emitter methods return `Result<(), ContextError>` type.
- logger and event emitter methods return `Result<(), HostError>` type.
([#859](https://github.com/cosmos/ibc-rs/issues/859))
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ There are no consensus-breaking changes.
- Bump ibc-proto-rs to v0.34.0
([#790](https://github.com/cosmos/ibc-rs/issues/790))
- Allow hosts to handle overflow cases in `increase_*_counter` methods by
returning `Result<(),ContextError>` type.
returning `Result<(),HandlerError>` type.
([#857](https://github.com/cosmos/ibc-rs/issues/857))
- logger and event emitter methods return `Result<(), ContextError>` type.
- logger and event emitter methods return `Result<(), HandlerError>` type.
([#859](https://github.com/cosmos/ibc-rs/issues/859))
- Bump `ibc-proto-rs` to v0.35.0 along with some other minor dependency updates
([#873](https://github.com/cosmos/ibc-rs/issues/873))
Expand Down Expand Up @@ -1042,7 +1042,7 @@ There are no consensus-breaking changes.

### IMPROVEMENT

- Fix `ContextError` Display output
- Fix `HandlerError` Display output
([#547](https://github.com/cosmos/ibc-rs/issues/547))

## v0.32.0
Expand Down Expand Up @@ -1099,7 +1099,7 @@ There are no consensus-breaking changes.
([#479](https://github.com/cosmos/ibc-rs/issues/479))
- Remove Send + Sync supertraits on the Module trait
([#480](https://github.com/cosmos/ibc-rs/issues/480))
- Modify `validate_self_client` error type to return `ContextError` instead of
- Modify `validate_self_client` error type to return `HandlerError` instead of
`ConnectionError`
([#482](https://github.com/cosmos/ibc-rs/issues/482))

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ibc-client-wasm-types = { version = "0.54.0", path = "./ibc-clients/ics08-
ibc-app-transfer-types = { version = "0.54.0", path = "./ibc-apps/ics20-transfer/types", default-features = false }
ibc-app-nft-transfer-types = { version = "0.54.0", path = "./ibc-apps/ics721-nft-transfer/types", default-features = false }

ibc-proto = { version = "0.47.0", default-features = false }
ibc-proto = { version = "0.47.1", default-features = false }

# cosmos dependencies
tendermint = { version = "0.38.0", default-features = false }
Expand Down
6 changes: 4 additions & 2 deletions ci/cw-check/Cargo.lock

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

Loading
Loading