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

Make channel events compatible with ibc-go #198

Merged
merged 62 commits into from
Nov 3, 2022

Conversation

plafer
Copy link
Contributor

@plafer plafer commented Oct 25, 2022

Closes: #146

Description

Left to do:

  • ChannelClosed event

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).

plafer and others added 30 commits October 24, 2022 16:19
* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
@plafer plafer requested a review from hu55a1n1 October 28, 2022 19:16
@plafer plafer marked this pull request as ready for review October 28, 2022 19:16
Copy link
Contributor

@hu55a1n1 hu55a1n1 left a comment

Choose a reason for hiding this comment

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

Great work! 🙏 Just completed a preliminary review (mostly related to packet events).

crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
plafer and others added 7 commits November 2, 2022 09:04
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/events.rs Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
crates/ibc/src/core/ics04_channel/events.rs Outdated Show resolved Hide resolved
plafer and others added 5 commits November 3, 2022 09:21
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
@hu55a1n1 hu55a1n1 mentioned this pull request Nov 3, 2022
5 tasks
Copy link
Contributor

@hu55a1n1 hu55a1n1 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 f3846b5 into main Nov 3, 2022
@plafer plafer deleted the plafer/146-compatible-channel-events branch November 3, 2022 16:37
shuoer86 pushed a commit to shuoer86/ibc-rs that referenced this pull request Nov 4, 2023
…#198)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.25.4 to 2.28.1.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.25.4...v2.28.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Farhad-Shabani pushed a commit that referenced this pull request Sep 9, 2024
* few channel attributes

* Refactor Channel's `OpenInit`

* Create channel_events() and remove event emission from all channel handlers

* channel OpenTry event cleaned up

* OpenAck cleaned up

* OpenConfirm cleaned up

* cleanup chan_close_init

* cleanup CloseConfirm event and remove Attributes

* Remove unused trait

* fix compilation + clippy

* fix tests

* finish implementing channel_events()

* channel_dispatch now discards events

* clean up generated logs

* chan_open_init_event test

* chan_open_try_event test

* chan_open_ack_event test

* test_chan_open_confirm_event test

* chan_close_init event test

* chan_close_confirm_event test

* clippy

* DataAttribute struct

* DataHexAttribute

* TimeoutHeightAttribute

* TimeoutTimestampAttribute

* SequenceAttribute

* ChannelOrderingAttribute

* Merge v0.21.1 (#203)

* Make `ClientType` allow any string value (#189)

* ClientType now wraps a str

* Make ClientType accept any string

* doctest

* changelog

* use client_type() fn instead of constant

* use client_type() for mock

* release v0.21.0 (#192)

* release v0.21.0

* version bumped to 0.21.0

* contributing edit

* Update .changelog/v0.21.0/summary.md

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update CHANGELOG.md

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Packet data must not be assumed to be valid UTF-8 (#200)

* Add failing test

* fix the bug

* changelog

* fmt

* Reword a couple messages

Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Release v0.21.1 (#202)

* release v0.21.1

* bump to version 0.21.1

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>

* merge DataAttribute and DataHexAttribute

* chan_open_init event compatible

* recv_packet compatible

* fix previous events

* WriteAcknowledgement compatible

* Acknowledgement event compatible

* packet Timeout event compatible

* timeout_on_close handler event emission compatible

* Remove stale code

* create ChannelClosed event

* from -> into

* rename PacketMsg timeout variants

* update comment

* ChannelClosed event in timeout handler

* timeout on close

* changelog

* move channel attributes to a submodule

* move packet attributes to submodule

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* asref counterparty channel id

* timeoutPacket event fix

* write_acknowledgement fix

* acknowledge packet fix

* write ack actual fix

* fix counterparty attributes

* add clarifying comment

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* Update crates/ibc/src/core/ics04_channel/events.rs

Co-authored-by: Shoaib Ahmed <sufialhussaini@gmail.com>
Signed-off-by: Philippe Laferrière <plafer@protonmail.com>

* clippy

Signed-off-by: Philippe Laferrière <plafer@protonmail.com>
Signed-off-by: Romain Ruetschi <romain.ruetschi@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: Shoaib Ahmed <sufialhussaini@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.

Make channel events compatible with ibc-go v5.0.0
2 participants