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: MsgMultiSend validation allows only a single sender #12610

Merged
merged 6 commits into from
Jul 19, 2022

Conversation

likhita-809
Copy link
Contributor

Description

Closes: #12601


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)

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #12610 (e63581a) into main (2c03973) will increase coverage by 0.04%.
The diff coverage is 77.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12610      +/-   ##
==========================================
+ Coverage   65.22%   65.27%   +0.04%     
==========================================
  Files         693      697       +4     
  Lines       71843    72075     +232     
==========================================
+ Hits        46863    47045     +182     
- Misses      22349    22386      +37     
- Partials     2631     2644      +13     
Impacted Files Coverage Δ
x/bank/keeper/msg_server.go 3.07% <0.00%> (+0.04%) ⬆️
x/bank/keeper/send.go 83.75% <81.25%> (ø)
x/bank/simulation/operations.go 76.65% <81.48%> (-3.67%) ⬇️
x/bank/types/msgs.go 96.73% <84.61%> (-3.27%) ⬇️
errors/handle.go 0.00% <0.00%> (ø)
errors/stacktrace.go 84.14% <0.00%> (ø)
errors/errors.go 83.46% <0.00%> (ø)
... and 3 more

@likhita-809 likhita-809 marked this pull request as ready for review July 18, 2022 11:41
@likhita-809 likhita-809 requested a review from a team as a code owner July 18, 2022 11:41
x/bank/types/msgs.go Outdated Show resolved Hide resolved
x/bank/types/msgs.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

LGTM! We need to:

  1. Have a changelog entry
  2. Address @AmauryM's Proto comment

Then we can merge 👍

x/bank/types/errors.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the C:CLI label Jul 19, 2022
@likhita-809 likhita-809 requested a review from amaury1093 July 19, 2022 10:59
x/bank/module.go Outdated Show resolved Hide resolved
@likhita-809 likhita-809 requested a review from julienrbrt July 19, 2022 11:07
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

lgtm! Just two nits.

x/bank/keeper/send.go Show resolved Hide resolved
x/bank/types/msgs.go Show resolved Hide resolved
@@ -56,6 +56,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### State Machine Breaking

* (x/bank) [#12610](https://github.com/cosmos/cosmos-sdk/pull/12610) `MsgMultiSend` now allows only a single input.
Copy link
Member

Choose a reason for hiding this comment

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

TODO: Add in UPGRADING.md the alternative. (For me to remember for next version)

@julienrbrt julienrbrt merged commit b025917 into main Jul 19, 2022
@julienrbrt julienrbrt deleted the likhita/fix-multisend-vaidatebasic branch July 19, 2022 11:40
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

Requesting a follow-up PR


option (gogoproto.equal) = false;

repeated Input inputs = 1 [(gogoproto.nullable) = false];
Input input = 1 [(gogoproto.nullable) = false];
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR got merged with a proto breaking change, and the proto package did not get bumped.

We should actually revert this change. @likhita-809 could you create a follow-up PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

(thinking about it, my comment #12610 (comment) might have been confusing... I thought there was something to change in the signer proto option, but there's actually nothing to change).

Copy link
Contributor Author

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.

Not 100% sure which commit it should be, but all the proto changes in this PR should be reverted.

likhita-809 added a commit that referenced this pull request Jul 21, 2022
mergify bot pushed a commit that referenced this pull request Jul 21, 2022
## Description

ref:#12610 (comment)



---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) 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)
@julienrbrt julienrbrt mentioned this pull request Aug 22, 2022
4 tasks
SpicyLemon added a commit that referenced this pull request Dec 8, 2022
…the MsgMultiSend can now only contain a single input (#12610 and #12670).
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.

Make MsgMultiSend single sender
4 participants