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

Move sdk.Msg and other TX stuff to types/tx #10650

Closed
4 tasks
amaury1093 opened this issue Dec 1, 2021 · 2 comments
Closed
4 tasks

Move sdk.Msg and other TX stuff to types/tx #10650

amaury1093 opened this issue Dec 1, 2021 · 2 comments
Labels
T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).

Comments

@amaury1093
Copy link
Contributor

amaury1093 commented Dec 1, 2021

Summary

Move tx-related interfaces, structs and functions from sdk to types/tx.

ref: #10527 (comment)

Problem Definition

We use sdk.Msg everywhere, but it's probably a better idea to put it in the types/tx package, to unclutter sdk.

Proposal

If possible, create a type alias to provide backwards compatibility.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@amaury1093 amaury1093 added the T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). label Dec 1, 2021
@aaronc
Copy link
Member

aaronc commented Dec 1, 2021

Well I have a separate proposal to get rid of sdk.Msg: #10368.

For the other stuff, my preference would be a new tx/ go module rather than types/tx where all the tx stuff including what's in x/auth/tx. But maybe this is a larger disussion.

What I propose for sdk.Msg is to make ValidateBasic a generic thing and then have a proto field option cosmos.msg.v1.signer(Msg's are actually sort of independent of tx encoding which is in cosmos.tx). For now, we can leave the existing sdk.Msg as is for legacy users and the new proto field option would avoid the bech32 global issue.

@amaury1093
Copy link
Contributor Author

amaury1093 commented Dec 1, 2021

Ah right. This issue was created initially as a follow-up in a PR review. Maybe let's close this for now, and create new issues once the larger proposal has been defined and accepted. Are you okay with that @fdymylja ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

No branches or pull requests

2 participants