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

feat: Add tx encode and decode endpoints for amino txs #13882

Merged
merged 28 commits into from
Nov 24, 2022

Conversation

likhita-809
Copy link
Contributor

Description

Closes: #10856
ref: #13085


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 Nov 16, 2022

Codecov Report

Merging #13882 (64fc64c) into main (2739f83) will increase coverage by 0.06%.
The diff coverage is 0.00%.

❗ Current head 64fc64c differs from pull request most recent head 885ad11. Consider uploading reports for the commit 885ad11 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #13882      +/-   ##
==========================================
+ Coverage   56.25%   56.32%   +0.06%     
==========================================
  Files         667      673       +6     
  Lines       56576    56913     +337     
==========================================
+ Hits        31829    32055     +226     
- Misses      22165    22254      +89     
- Partials     2582     2604      +22     
Impacted Files Coverage Δ
x/auth/tx/service.go 0.00% <0.00%> (ø)
x/distribution/simulation/operations.go 80.64% <0.00%> (-9.68%) ⬇️
x/group/module/module.go 48.05% <0.00%> (-0.10%) ⬇️
server/mock/tx.go 53.33% <0.00%> (ø)
x/auth/types/codec.go 100.00% <0.00%> (ø)
x/group/keeper/migrations.go
x/auth/types/credentials.go
x/group/migrations/v2/migrate.go
tx/textual/valuerenderer/message.go 64.22% <0.00%> (ø)
tx/textual/valuerenderer/timestamp.go 89.28% <0.00%> (ø)
... and 12 more

@likhita-809 likhita-809 marked this pull request as ready for review November 17, 2022 08:42
@likhita-809 likhita-809 requested a review from a team as a code owner November 17, 2022 08:42
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.

We should unmarshal amino_json first, then marshal it back.

tests/e2e/tx/service_test.go Show resolved Hide resolved
proto/cosmos/tx/v1beta1/service.proto Show resolved Hide resolved
x/auth/tx/service.go Outdated Show resolved Hide resolved
tests/e2e/tx/service_test.go 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.

thank you, could we get a changelog and then we should add it to a client section in docs if we have a section .

@likhita-809
Copy link
Contributor Author

likhita-809 commented Nov 17, 2022

thank you, could we get a changelog and then we should add it to a client section in docs if we have a section .

added changelog, the client docs should go here

proto/cosmos/tx/v1beta1/service.proto Outdated Show resolved Hide resolved
proto/cosmos/tx/v1beta1/service.proto Outdated Show resolved Hide resolved
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!

@julienrbrt julienrbrt added the backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release label Nov 19, 2022
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.

There's still some confusion between amino binary and amino JSON in this PR. @likhita-809 I'll let you address the comments, but ping me on Slack if you have questions

x/auth/tx/service.go Outdated Show resolved Hide resolved
x/auth/tx/service.go Outdated Show resolved Hide resolved
x/auth/tx/service.go Show resolved Hide resolved
tests/e2e/tx/service_test.go Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Nov 24, 2022

[Cosmos SDK] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

95.2% 95.2% Coverage
0.0% 0.0% Duplication

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.

LGTM, thanks!

@amaury1093 amaury1093 enabled auto-merge (squash) November 24, 2022 11:50
@amaury1093 amaury1093 merged commit e260fc1 into main Nov 24, 2022
@amaury1093 amaury1093 deleted the likhita/add-amino-endpoints branch November 24, 2022 13:41
mergify bot pushed a commit that referenced this pull request Nov 24, 2022
* add proto changes

* make proto-gen

* wip: adds tests

* wip: tests

* remove consoles

* wip: fix something

* fix: encode amino tests

* add decode amino tests

* wip: address requested changes

* update proto inline docs

* address review comments

Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
(cherry picked from commit e260fc1)
tac0turtle pushed a commit that referenced this pull request Nov 27, 2022
…) (#14009)

* feat: Add tx encode and decode endpoints for amino txs (#13882)

* add proto changes

* make proto-gen

* wip: adds tests

* wip: tests

* remove consoles

* wip: fix something

* fix: encode amino tests

* add decode amino tests

* wip: address requested changes

* update proto inline docs

* address review comments

Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
(cherry picked from commit e260fc1)

* fix changelog

Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release C:x/auth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add back tx/encode endpoint
6 participants