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

fix(x/intertx): fix ICA integration #1606

Merged
merged 5 commits into from
Nov 17, 2022
Merged

fix(x/intertx): fix ICA integration #1606

merged 5 commits into from
Nov 17, 2022

Conversation

aleem1314
Copy link
Contributor

@aleem1314 aleem1314 commented Nov 15, 2022

Description

Found few issues, while testing ICA.


Author Checklist

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.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@@ -20,10 +20,6 @@ func (m MsgRegisterAccount) ValidateBasic() error {
return sdkerrors.ErrInvalidAddress.Wrapf("owner: %s", err.Error())
}

if m.Version == "" {
Copy link
Contributor Author

@aleem1314 aleem1314 Nov 15, 2022

Choose a reason for hiding this comment

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

Looks like this field is optional ref.

}

// UnpackInterfaces implements codectypes.UnpackInterfacesMessage
func (msg MsgSubmitTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this method, submit-tx returning error cannot unpack Any into type .....

@aleem1314 aleem1314 marked this pull request as ready for review November 15, 2022 16:14
@aleem1314 aleem1314 requested a review from a team November 15, 2022 16:14
Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

LGTM, 2 small nits

x/intertx/types/v1/msg_register_account_test.go Outdated Show resolved Hide resolved
x/intertx/types/v1/msg_submit_tx.go Outdated Show resolved Hide resolved
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Merging #1606 (b60f64e) into main (ecbb6d0) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1606      +/-   ##
==========================================
- Coverage   77.53%   77.48%   -0.05%     
==========================================
  Files         264      264              
  Lines       19288    19298      +10     
==========================================
  Hits        14954    14954              
- Misses       3469     3479      +10     
  Partials      865      865              
Impacted Files Coverage Δ
x/intertx/client/tx.go 0.00% <0.00%> (ø)
x/intertx/types/v1/msg_register_account.go 0.00% <ø> (ø)
x/intertx/types/v1/msg_submit_tx.go 0.00% <0.00%> (ø)

@aleem1314
Copy link
Contributor Author

@ryanchristo sample repo to test ICA between Regen and Akash network.
https://github.com/aleem1314/ica-testing

Copy link
Member

@ryanchristo ryanchristo left a comment

Choose a reason for hiding this comment

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

tACK using https://github.com/aleem1314/ica-testing 🚀

Just a couple small nits. Great work and thanks for digging into this!

x/intertx/client/tx.go Outdated Show resolved Hide resolved
Comment on lines +1 to +8
package v1

import sdk "github.com/cosmos/cosmos-sdk/types"

func init() {
cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount("regen", "regenpub")
}
Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove this file. We have a config.go file in the root of x/intertx that should apply.

Copy link
Contributor Author

@aleem1314 aleem1314 Nov 17, 2022

Choose a reason for hiding this comment

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

Removing this file causing V1 package tests fails with error expected cosmos got regen.

aleem1314 and others added 2 commits November 17, 2022 14:52
Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
@ryanchristo ryanchristo changed the title fix: fix ICA integration fix(x/intertx): fix ICA integration Nov 17, 2022
@ryanchristo ryanchristo merged commit 78d6c81 into main Nov 17, 2022
@ryanchristo ryanchristo deleted the aleem/ica-fixes branch November 17, 2022 17:32
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.

3 participants