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

Add parity-scale-codec and borsh for IbcEvent #321

Merged
merged 12 commits into from
Jan 11, 2023

Conversation

DaviRain-Su
Copy link
Contributor

Closes: #320

Description

You need to merge this PR( cosmos/ibc-proto-rs#48) first before merging the PR.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Base: 63.80% // Head: 62.44% // Decreases project coverage by -1.36% ⚠️

Coverage data is based on head (3a738f6) compared to base (59dd3d9).
Patch coverage: 7.09% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #321      +/-   ##
==========================================
- Coverage   63.80%   62.44%   -1.37%     
==========================================
  Files         124      124              
  Lines       13771    14072     +301     
==========================================
  Hits         8787     8787              
- Misses       4984     5285     +301     
Impacted Files Coverage Δ
crates/ibc/src/core/ics03_connection/events.rs 26.98% <0.00%> (-6.14%) ⬇️
crates/ibc/src/core/ics04_channel/events.rs 26.55% <0.00%> (-3.08%) ⬇️
...ibc/src/core/ics04_channel/msgs/acknowledgement.rs 66.66% <0.00%> (-1.03%) ⬇️
crates/ibc/src/events.rs 13.96% <0.00%> (-0.92%) ⬇️
crates/ibc/src/core/ics02_client/events.rs 35.09% <7.46%> (-15.25%) ⬇️
...rc/core/ics04_channel/events/channel_attributes.rs 7.79% <14.28%> (-9.36%) ⬇️
...src/core/ics04_channel/events/packet_attributes.rs 10.89% <14.47%> (-10.36%) ⬇️
crates/ibc/src/core/ics26_routing/context.rs 78.31% <50.00%> (-0.96%) ⬇️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Cargo.toml Outdated
@@ -9,3 +9,6 @@ members = [
exclude = [
"ci/no-std-check",
]

[patch.crates-io]
ibc-proto = { git = "https://github.com/octopus-network/ibc-proto-rs.git", branch = "add-codec-borsh-for-any" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we leave this PR in draft until this patch is removed?

@plafer
Copy link
Contributor

plafer commented Jan 10, 2023

blocked on cosmos/ibc-proto-rs#51

@plafer plafer added A: blocked Admin: blocked by another (internal/external) issue or PR and removed A: blocked Admin: blocked by another (internal/external) issue or PR labels Jan 10, 2023
Copy link
Contributor

@plafer plafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only minor changes needed

@@ -6,7 +6,7 @@ resolver = "2"

[dependencies]
ibc = { path = "../../crates/ibc", default-features = false }
ibc-proto = { version = "0.24.0", default-features = false }
ibc-proto = { version = "0.24.0", default-features = false, features = ["parity-scale-codec", "borsh"]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.24.1 is now released with the required change; can you update it here and remove the [patch.crates-io] section?

@@ -10,6 +10,7 @@ use crate::{
timestamp::Timestamp,
};
use derive_more::From;
use serde_derive::{Deserialize, Serialize};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove all new serde_derive imports? This will cause conflicts with #331

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment at all the other ones so that we don't forget any

@@ -3,6 +3,7 @@ use crate::prelude::*;
use derive_more::{From, Into};
use ibc_proto::ibc::core::channel::v1::MsgAcknowledgement as RawMsgAcknowledgement;
use ibc_proto::protobuf::Protobuf;
use serde_derive::{Deserialize, Serialize};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's one

@@ -10,6 +10,7 @@ use crate::core::ics02_client::height::Height;
use crate::core::ics24_host::identifier::ClientId;
use crate::events::IbcEventType;
use crate::prelude::*;
use serde_derive::{Deserialize, Serialize};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's one

@@ -3,6 +3,7 @@
mod channel_attributes;
mod packet_attributes;

use serde_derive::{Deserialize, Serialize};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

@@ -1,6 +1,7 @@
///! This module holds all the abci event attributes for IBC events emitted
///! during the channel handshake.
use derive_more::From;
use serde_derive::{Deserialize, Serialize};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

Copy link
Contributor

@plafer plafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@plafer plafer merged commit 4b29332 into cosmos:main Jan 11, 2023
@DaviRain-Su DaviRain-Su deleted the add-codec-borsh-for-ibcevent branch January 13, 2023 01:43
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* add parity-scale-codec and borsh for IbcEvent

* Create 320-add-borsh-and-scale-codec-for-ibcevent.md

* Update no-std-check ibc-proto dep

* Add patch ibc-proto for no-std-check

* Update ibc-proto patch

* Update Cargo.toml

* Update ibc-proto version and Add serde feature

Signed-off-by: Davirain <davirain.yin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parity-scale-codec and borsh for ibc::events::IbcEvent
2 participants