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

chore: remove unnecessary legacy handler from qgb module #2635

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Oct 9, 2023

Overview

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@rach-id rach-id added the x/qgb label Oct 9, 2023
@rach-id rach-id requested a review from cmwaters October 9, 2023 10:24
@rach-id rach-id self-assigned this Oct 9, 2023
@rach-id rach-id requested a review from evan-forbes as a code owner October 9, 2023 10:24
@celestia-bot celestia-bot requested a review from a team October 9, 2023 10:24
@rach-id rach-id added the backport:v1.x PR will be backported automatically to the v1.x branch upon merging label Oct 9, 2023
@@ -114,7 +114,7 @@ func (am AppModule) Name() string {

// Route returns the capability module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper))
return sdk.Route{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

[noob question] why is this Route method considered legacy? I've found it confusing when Cosmos SDK deprecates things b/c there isn't a consistent practice: some things are labeled "legacy" but not actually deprecated or removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

100% confusing. Well, the rationale is if the msg service is defined, then it will route the transaction correctly. Only if it is unable to that it will call the Legacy handler. In our case, we have the msg service, so we can delete this one instead of having to maintain almost the same logic in two places

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Fwiw they do mention it is deprecated under the interface itself here:

https://github.com/celestiaorg/cosmos-sdk/blob/c525ad72ab1449d31115815f5832a68bc79d4ffd/types/module/module.go#L156

It's just that renaming the method would be breaking so they can only add a comment

Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

👍

@rach-id rach-id enabled auto-merge (squash) October 10, 2023 10:08
@rach-id rach-id merged commit 3914153 into main Oct 10, 2023
@rach-id rach-id deleted the remove-legacy-handler-from-qgb-module branch October 10, 2023 12:24
mergify bot pushed a commit that referenced this pull request Oct 10, 2023
<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

<!--
Please provide an explanation of the PR, including the appropriate
context,
background, goal, and rationale. If there is an issue with this
information,
please provide a tl;dr and link the issue.
-->

## Checklist

<!--
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [ ] New and updated code has appropriate documentation
- [ ] New and updated code has new and/or updated testing
- [ ] Required CI checks are passing
- [ ] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords

(cherry picked from commit 3914153)
rach-id added a commit that referenced this pull request Oct 11, 2023
) (#2647)

This is an automatic backport of pull request #2635 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: CHAMI Rachid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:v1.x PR will be backported automatically to the v1.x branch upon merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants