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

refactor!: deprecate sdk.Msg.GetSigners #15284

Merged
merged 111 commits into from
May 25, 2023
Merged

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Mar 6, 2023

Description

Closes: #11275


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)

@github-actions github-actions bot removed C:x/genutil genutil module issues C:x/group C:x/gov labels Mar 6, 2023
x/tx/signing/get_signers.go Fixed Show fixed Hide fixed
x/auth/ante/ante.go Fixed Show fixed Hide fixed
types/tx/types.go Fixed Show fixed Hide fixed
types/tx_msg.go Fixed Show fixed Hide fixed
@github-actions github-actions bot removed C:Cosmovisor Issues and PR related to Cosmovisor C:Store labels May 23, 2023
@@ -943,7 +955,7 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode execMode) (*sd
}

// create message events
msgEvents := createEvents(msgResult.GetEvents(), msg)
msgEvents := createEvents(app.cdc, msgResult.GetEvents(), msg, msgsV2[i])
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we compare the two lengths of msgs and msgsV2 for preventing an out of bound?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can, but could we also document that part of the contract of the methods creating msgsV2 is that it has the same length as msgs?


option go_package = "github.com/cosmos/cosmos-sdk/baseapp/testutil";

message MsgCounter {
option (cosmos.msg.v1.signer) = "signer";
Copy link
Member

Choose a reason for hiding this comment

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

We should add docs for that in the UPGRADING.md and somewhere in the docs website.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it okay if we add another issue to #15677 to be completed after #16112 ?

simapp/app.go Show resolved Hide resolved
@@ -133,6 +134,36 @@ var (
_ servertypes.Application = (*SimApp)(nil)
)

// stdAccAddressCodec is a temporary address codec that we will use until we
Copy link
Member

Choose a reason for hiding this comment

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

does this have to be in app.go or can it be somewhere users can import to get the needed information?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can just refactor this to use address.Bech32Codec. Does how I've updated it in the latest commit look okay for now? It's still using the global but we can refactor that later.

x/auth/tx/builder.go Outdated Show resolved Hide resolved
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

left one nit but shouldnt be a blocker

@aaronc
Copy link
Member Author

aaronc commented May 25, 2023

Added #16294 around updating UPGRADING.md. Going to add this to the merge queue. I think it will be easier to address other issues in follow-ups given the massive size of this PR already.

@aaronc aaronc enabled auto-merge May 25, 2023 18:21
@aaronc aaronc added this pull request to the merge queue May 25, 2023
Merged via the queue into main with commit 82659a7 May 25, 2023
@aaronc aaronc deleted the aaronc/11275-deprecate-get-signers-2 branch May 25, 2023 18:37
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.

Support cosmos.msg.v1.signer as alternative to Msg.GetSigners
4 participants