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

feat(denommetadata): inject denom metadata to ibc transfers from RA to Hub #455

Merged
merged 11 commits into from
Jun 25, 2024

Conversation

zale144
Copy link
Contributor

@zale144 zale144 commented Jun 18, 2024

PR Standards

Opening a pull request should be able to meet the following requirements


Closes #454

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@zale144 zale144 self-assigned this Jun 18, 2024
@zale144 zale144 marked this pull request as ready for review June 18, 2024 18:44
@zale144 zale144 requested a review from a team as a code owner June 18, 2024 18:44
Copy link
Contributor

@danwt danwt left a comment

Choose a reason for hiding this comment

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

Makes sense I think just a couple things

Not sure about active/inactive as names. Can you think of alternatives? And they need to be documented exactly what each one means.

Also, with errors. Please prefer https://pkg.go.dev/github.com/dymensionxyz/[email protected]/gerrc#pkg-variables now. For example, you can wrap the AlreadyExists one there, instead of defining new ones

Also, please don't call the types. 'middleware' because they don't implement porrtypes middleware. Call them IBCModule or ICS4Wrapper

Final point: please don't implement some kind of canonical channel right now. You should write your code to assume that this is handled by some other component, and we will make an issue to fix that properly

Copy link
Contributor

@danwt danwt left a comment

Choose a reason for hiding this comment

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

I'm not sure I'm on board with this architecturally.

I think the denom meta data module should just assume there is one hub and keep track of the registered denoms for it by itself

No need for hub keeper

@zale144
Copy link
Contributor Author

zale144 commented Jun 25, 2024

I'm not sure I'm on board with this architecturally.

I think the denom meta data module should just assume there is one hub and keep track of the registered denoms for it by itself

No need for hub keeper

keep track of the registered denoms for it by itself
so how do we prevent the rollapp from sending the denom metadata then?

I think I already addressed a similar comment you posted: even though the hub can always be the same, technically it is still possible the hub chain can do a fork, which I believe would make it's chain ID change.

See: #465

@danwt
Copy link
Contributor

danwt commented Jun 25, 2024

so how do we prevent the rollapp from sending the denom metadata then?

WDYM?
I'm just saying to store what you currently store on the hub module in the denom meta module


Re #465 ok maybe. IDK tbh I would have to research. Seems like a delicate thing. Can you just write this PR so that it assumes that problem is solved by another component. Otherwise you're solving too many problems at once and stuff is likely to get reworked/changed anyways

Basically just write your code to have minimal assumptions so that the rest of the codebase can evolve around it independently. Here you're placing quite a lot of assumptions on the management of the hub wrt. forks etc, which is out of scope.


func NewTestHubKeeperFromApp(app *app.App) (*hubkeeper.Keeper, sdk.Context) {
k := &app.HubKeeper
ctx := app.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "rollapp-]1", Time: time.Now().UTC()})

Check warning

Code scanning / CodeQL

Calling the system time Warning test

Calling the system time may be a possible source of non-determinism
Copy link
Contributor

@danwt danwt 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!

@mtsitrin mtsitrin merged commit c98e3e6 into main Jun 25, 2024
7 checks passed
@mtsitrin mtsitrin deleted the zale144/454-send-denom-metadata-to-hub branch June 25, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(denommetadata) send local Denom Metadata to Hub through IBC transfer
3 participants