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

Remove relayer-specific code from modules #2447

Merged
merged 5 commits into from
Jul 29, 2022

Conversation

hu55a1n1
Copy link
Member

@hu55a1n1 hu55a1n1 commented Jul 21, 2022

Partially addresses: #2335

Description

This PR moves relayer-specific code from the modules crate into the relayer crate

Note: The target branch is a long-lived branch hu55a1n1/light-client-extraction. The plan is to merge PRs (addressing #2335) such as this into hu55a1n1/light-client-extraction and ultimately merge that into master.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).

Reviewer checklist:

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

@hu55a1n1 hu55a1n1 changed the base branch from hu55a1n1/adr011-light-client-extraction to hu55a1n1/light-client-extraction July 21, 2022 08:59
@hu55a1n1 hu55a1n1 changed the title ADR011 impl: remove relayer-specific code from modules Remove relayer-specific code from modules Jul 26, 2022
@hu55a1n1 hu55a1n1 force-pushed the hu55a1n1/remove-relayer-code-from-modules branch from e14c382 to ec7256c Compare July 28, 2022 16:35
@hu55a1n1 hu55a1n1 marked this pull request as ready for review July 28, 2022 17:03
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.

LGTM

Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

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

Thanks Shoaib!

This changes no logic from what I can tell. Looks good!

const HEIGHT_ATTRIBUTE_KEY: &str = "height";
const CONNECTION_ID_ATTRIBUTE_KEY: &str = "connection_id";
const CHANNEL_ID_ATTRIBUTE_KEY: &str = "channel_id";
const PORT_ID_ATTRIBUTE_KEY: &str = "port_id";
const COUNTERPARTY_CHANNEL_ID_ATTRIBUTE_KEY: &str = "counterparty_channel_id";
const COUNTERPARTY_PORT_ID_ATTRIBUTE_KEY: &str = "counterparty_port_id";
pub const HEIGHT_ATTRIBUTE_KEY: &str = "height";
pub const CONNECTION_ID_ATTRIBUTE_KEY: &str = "connection_id";
pub const CHANNEL_ID_ATTRIBUTE_KEY: &str = "channel_id";
pub const PORT_ID_ATTRIBUTE_KEY: &str = "port_id";
pub const COUNTERPARTY_CHANNEL_ID_ATTRIBUTE_KEY: &str = "counterparty_channel_id";
pub const COUNTERPARTY_PORT_ID_ATTRIBUTE_KEY: &str = "counterparty_port_id";
Copy link
Member

Choose a reason for hiding this comment

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

These are Tendermint-specific, so we might move them out of ibc crate later on.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I was also thinking about these and I didn't remove them for now because basecoin needs (and arguably other chains using the modules would need) conversions from IbcEvent to tendermint_abci::Event (which use these consts). We need to figure out a good place for these conversions.

@hu55a1n1
Copy link
Member Author

I wonder if it makes sense to merge this directly into master? The changes are not specific to light client extraction and the diff wouldn't change as hu55a1n1/light-client-extraction is in sync with master, so we wouldn't need to re-review - we could merge directly now that the changes have been approved.

@romac
Copy link
Member

romac commented Jul 29, 2022

Yes, good point! Let's merge directly to master then!

@romac
Copy link
Member

romac commented Jul 29, 2022

Before that, can we drop the _events suffix from the events::channel_events module, and the others?

@hu55a1n1 hu55a1n1 changed the base branch from hu55a1n1/light-client-extraction to master July 29, 2022 12:42
@romac romac merged commit 76d7551 into master Jul 29, 2022
@romac romac deleted the hu55a1n1/remove-relayer-code-from-modules branch July 29, 2022 14:30
hu55a1n1 added a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Move relayer specific module events code into relayer crate

* Fix relayer imports

* Remove `_events` suffix from `events::` submodules

* Fix changelog entry for informalsystems#2431

* Add changelog entry
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.

4 participants