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

revert: Remove SIGN_MODE_AMINO_AUX #10322

Merged
merged 21 commits into from
Oct 18, 2021
Merged

revert: Remove SIGN_MODE_AMINO_AUX #10322

merged 21 commits into from
Oct 18, 2021

Conversation

amaury1093
Copy link
Contributor

@amaury1093 amaury1093 commented Oct 7, 2021

Description

Revert #10268

As part of the TX working group, we decided not to introduce a new sign mode for tipper signing. The tipper will use amino-json to sign via ledger (see #10346).

Also, add signing.SignerData#Address (will be used in subsequent PR #10346)


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)

@amaury1093 amaury1093 changed the base branch from am/9912-tips-middleware to master October 12, 2021 09:22
@amaury1093 amaury1093 changed the title DNM Proof-of-Concept: Tips without SIGN_MODE_AMINO_AUX revert: Remove SIGN_MODE_AMINO_AUX Oct 12, 2021
@cosmos cosmos deleted a comment from lgtm-com bot Oct 12, 2021
@cosmos cosmos deleted a comment from lgtm-com bot Oct 12, 2021
x/auth/address/bech32.go Outdated Show resolved Hide resolved
@amaury1093 amaury1093 marked this pull request as ready for review October 13, 2021 10:20
simapp/params/proto.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #10322 (5bdbbf3) into master (26bcb1e) will decrease coverage by 0.04%.
The diff coverage is 37.93%.

❗ Current head 5bdbbf3 differs from pull request most recent head defddc5. Consider uploading reports for the commit defddc5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10322      +/-   ##
==========================================
- Coverage   64.27%   64.23%   -0.05%     
==========================================
  Files         572      570       -2     
  Lines       54230    54130     -100     
==========================================
- Hits        34859    34771      -88     
+ Misses      17389    17378      -11     
+ Partials     1982     1981       -1     
Impacted Files Coverage Δ
server/rosetta/client_online.go 0.00% <ø> (ø)
x/auth/client/cli/tx_multisign.go 0.00% <0.00%> (ø)
x/auth/client/cli/validate_sigs.go 0.00% <0.00%> (ø)
x/auth/keeper/keeper.go 70.00% <ø> (ø)
x/auth/tx/config.go 88.88% <ø> (ø)
x/auth/tx/mode_handler.go 78.94% <ø> (-2.01%) ⬇️
x/auth/tx/direct_aux.go 80.00% <14.28%> (-20.00%) ⬇️
client/tx/tx.go 41.23% <100.00%> (+0.30%) ⬆️
server/rosetta/converter.go 56.55% <100.00%> (+0.17%) ⬆️
x/auth/keeper/bech32_codec.go 55.00% <100.00%> (ø)
... and 7 more

@amaury1093 amaury1093 mentioned this pull request Oct 14, 2021
23 tasks
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

utACK. We made a concept review on a call with @AmauryM .
Left one question.

@@ -57,9 +57,11 @@ func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, ch
// 2nd round: once all signer infos are set, every signer can sign.
for i, p := range priv {
signerData := authsign.SignerData{
Address: sdk.AccAddress(p.PubKey().Address()).String(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this was removed before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The signerData.Address field was actually never present before, and newly added in this PR

Copy link
Contributor

@atheeshp atheeshp left a comment

Choose a reason for hiding this comment

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

lgtm

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Oct 18, 2021
@mergify mergify bot merged commit 99e2e0f into master Oct 18, 2021
@mergify mergify bot deleted the am/0fee0gas branch October 18, 2021 10:32
mergify bot pushed a commit that referenced this pull request Nov 16, 2021
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

R4R

Closes: #9912 

This PR introduces 1 new middleware:
- `TipsMiddleware`: transfer tip from tipper to feePayer when relevant.

It also makes sure in the DIRECT_AUX sign mode handler that the fee payer cannot use that sign mode.

Depends on:
- [x]  #10028 
- [x] #10268 
- [x] #10322 
- [x] #10346 

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### 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/master/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/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
blewater pushed a commit to e-money/cosmos-sdk that referenced this pull request Dec 8, 2021
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

R4R

Closes: cosmos#9912 

This PR introduces 1 new middleware:
- `TipsMiddleware`: transfer tip from tipper to feePayer when relevant.

It also makes sure in the DIRECT_AUX sign mode handler that the fee payer cannot use that sign mode.

Depends on:
- [x]  cosmos#10028 
- [x] cosmos#10268 
- [x] cosmos#10322 
- [x] cosmos#10346 

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### 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/master/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/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Revert cosmos#10268 

As part of the TX working group, we decided not to introduce a new sign mode for tipper signing. The tipper will use amino-json to sign via ledger (see cosmos#10346).

Also, add `signing.SignerData#Address` (will be used in subsequent PR cosmos#10346)

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### 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/master/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/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:CLI C:x/auth C:x/authz
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants