Skip to content

Commit

Permalink
bump ibc-proto to v0.34.1 and borsh to v0.10 (#844)
Browse files Browse the repository at this point in the history
* bump ibc-proto and borsh

* changelog
  • Loading branch information
plafer authored Aug 29, 2023
1 parent 4514a5c commit d955e56
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/844-bump-borsh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Bump ibc-proto to v0.34.1 and borsh to v0.10
([#844](https://github.com/cosmos/ibc-rs/issues/844))
4 changes: 2 additions & 2 deletions crates/ibc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mocks = ["tendermint-testgen", "tendermint/clock", "parking_lot"]

[dependencies]
# Proto definitions for all IBC-related interfaces, e.g., connections or channels.
ibc-proto = { version = "0.34.0", default-features = false, features = ["serde"] }
ibc-proto = { version = "0.34.1", default-features = false, features = ["serde"] }
ics23 = { version = "0.10.1", default-features = false, features = ["host-functions"] }
time = { version = ">=0.3.0, <0.3.26", default-features = false }
serde_derive = { version = "1.0.104", default-features = false, optional = true }
Expand All @@ -72,7 +72,7 @@ primitive-types = { version = "0.12.0", default-features = false, features = ["s
parity-scale-codec = { version = "3.0.0", default-features = false, features = ["full"], optional = true }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"], optional = true }
## for borsh encode or decode
borsh = {version = "0.9.0", default-features = false, optional = true }
borsh = {version = "0.10", default-features = false, optional = true }
parking_lot = { version = "0.12.1", default-features = false, optional = true }

ibc-derive = { version ="0.3.0", path = "../ibc-derive" }
Expand Down
6 changes: 4 additions & 2 deletions crates/ibc/src/core/ics03_connection/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ mod sealed {

#[cfg(feature = "borsh")]
impl borsh::BorshDeserialize for ConnectionEnd {
fn deserialize(reader: &mut &[u8]) -> borsh::maybestd::io::Result<Self> {
let inner_conn_end = InnerConnectionEnd::deserialize(reader)?;
fn deserialize_reader<R: borsh::maybestd::io::Read>(
reader: &mut R,
) -> borsh::maybestd::io::Result<Self> {
let inner_conn_end = InnerConnectionEnd::deserialize_reader(reader)?;
Ok(ConnectionEnd::from(inner_conn_end))
}
}
Expand Down
6 changes: 4 additions & 2 deletions crates/ibc/src/core/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ impl borsh::BorshSerialize for Timestamp {

#[cfg(feature = "borsh")]
impl borsh::BorshDeserialize for Timestamp {
fn deserialize(reader: &mut &[u8]) -> borsh::maybestd::io::Result<Self> {
let timestamp = u64::deserialize(reader)?;
fn deserialize_reader<R: borsh::maybestd::io::Read>(
reader: &mut R,
) -> borsh::maybestd::io::Result<Self> {
let timestamp = u64::deserialize_reader(reader)?;
Ok(Timestamp::from_nanoseconds(timestamp)
.map_err(|_| borsh::maybestd::io::ErrorKind::Other)?)
}
Expand Down

0 comments on commit d955e56

Please sign in to comment.