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

R4R: Implement Tx Decode in REST/CLI Clients #4213

Closed
wants to merge 13 commits into from
Closed

R4R: Implement Tx Decode in REST/CLI Clients #4213

wants to merge 13 commits into from

Conversation

yangyanqing
Copy link
Contributor

@yangyanqing yangyanqing commented Apr 27, 2019

close: #3872
replace: #4026

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added a relevant changelog entry: sdkch add [section] [stanza] [message]
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Apr 27, 2019

Codecov Report

Merging #4213 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #4213      +/-   ##
==========================================
- Coverage   60.16%   60.13%   -0.03%     
==========================================
  Files         212      212              
  Lines       15188    15192       +4     
==========================================
- Hits         9138     9136       -2     
- Misses       5421     5427       +6     
  Partials      629      629

@codecov
Copy link

codecov bot commented Apr 27, 2019

Codecov Report

Merging #4213 into master will increase coverage by 0.62%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #4213      +/-   ##
==========================================
+ Coverage   54.15%   54.78%   +0.62%     
==========================================
  Files         272      269       -3     
  Lines       17349    16911     -438     
==========================================
- Hits         9395     9264     -131     
+ Misses       7271     6965     -306     
+ Partials      683      682       -1

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.

ACK

@yangyanqing
Copy link
Contributor Author

Do you mind review this PR ? @jackzampolin @alessio

Copy link
Contributor

@rigelrozanski rigelrozanski left a comment

Choose a reason for hiding this comment

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

looks good

Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Hold off please - this is blocked by the gaia split migration

@yangyanqing
Copy link
Contributor Author

Hold off please - this is blocked by the gaia split migration

Are you referring to #4347 ? @alessio

@jackzampolin
Copy link
Member

@yangyanqing if you could bring this PR back up to the latest we will merge it!

@yangyanqing yangyanqing changed the title R4R: Implement Tx Decode in REST/CLI Clients WIP: Implement Tx Decode in REST/CLI Clients Jun 25, 2019
@yangyanqing
Copy link
Contributor Author

yangyanqing commented Jun 25, 2019

I have no idea about the cycle import error caused by moving decode.go from client/tx to x/auth/client/rest/.
@jackzampolin

➜  cosmos-sdk git:(frank/3872-gaiacli-tx-decode-master) ✗ make build
import cycle not allowed
package github.com/cosmos/cosmos-sdk/simapp
        imports github.com/cosmos/cosmos-sdk/x/auth
        imports github.com/cosmos/cosmos-sdk/x/auth/client/rest
        imports github.com/cosmos/cosmos-sdk/x/auth
can't load package: import cycle not allowed
package github.com/cosmos/cosmos-sdk/simapp
        imports github.com/cosmos/cosmos-sdk/x/auth
        imports github.com/cosmos/cosmos-sdk/x/auth/client/rest
        imports github.com/cosmos/cosmos-sdk/x/auth
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 1

client/tx/decode.go Outdated Show resolved Hide resolved
client/tx/decode.go Outdated Show resolved Hide resolved
x/auth/client/rest/decode.go Outdated Show resolved Hide resolved
x/auth/client/rest/decode.go Show resolved Hide resolved
@yangyanqing yangyanqing changed the title WIP: Implement Tx Decode in REST/CLI Clients R4R: Implement Tx Decode in REST/CLI Clients Jun 27, 2019
@yangyanqing
Copy link
Contributor Author

Can this PR be merged ? @jackzampolin
client/lcd/statik/statik.go would be conflict if any one update swagger doc.

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.

Looks good @yangyanqing. Left some further feedback. Also statik.go needs to be regenerated.

x/auth/client/utils/tx.go Outdated Show resolved Hide resolved
@yangyanqing
Copy link
Contributor Author

Looks good @yangyanqing. Left some further feedback. Also statik.go needs to be regenerated.

statik.go is too easy to be conflicted. Maybe it can be generate at the first step of compile.

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 2, 2019

@yangyanqing not true, it's very easy:

$ rm -fr client/lcd/statik/statik.go; make update-swagger-docs

Simply take preference over the new statik.go file. It's that simple. No need to resolve any conflicts manually (assuming you're rebased off of the latest master).

@yangyanqing
Copy link
Contributor Author

@yangyanqing not true, it's very easy:

$ rm -fr client/lcd/statik/statik.go; make update-swagger-docs

Simply take preference over the new statik.go file. It's that simple. No need to resolve any conflicts manually (assuming you're rebased off of the latest master).

Yes, I had repeated the steps three times.
Because someone else also modified statik.go and be merged before my PR, then my PR was conflicted.
@alexanderbez

@alexanderbez
Copy link
Contributor

@yangyanqing so long as your PR has the latest master, you should always overwrite. Conflicts can be annoying yes, but it's trivial to run that command.

Frank Yang and others added 10 commits July 11, 2019 20:02
Co-Authored-By: yangyanqing <f.yang@hashgard.com>
Co-Authored-By: yangyanqing <f.yang@hashgard.com>
➜  cosmos-sdk git:(frank/3872-gaiacli-tx-decode-master) ✗ make build
import cycle not allowed
package github.com/cosmos/cosmos-sdk/simapp
        imports github.com/cosmos/cosmos-sdk/x/auth
        imports github.com/cosmos/cosmos-sdk/x/auth/client/rest
        imports github.com/cosmos/cosmos-sdk/x/auth
can't load package: import cycle not allowed
package github.com/cosmos/cosmos-sdk/simapp
        imports github.com/cosmos/cosmos-sdk/x/auth
        imports github.com/cosmos/cosmos-sdk/x/auth/client/rest
        imports github.com/cosmos/cosmos-sdk/x/auth
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 1
Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

1 comment and pending CI fix


// GetDecodeCommand returns the decode command to take Amino-serialized bytes and turn it into
// a JSONified transaction
func GetDecodeCommand(codec *amino.Codec) *cobra.Command {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should live in auth/client/CLI

@fedekunze fedekunze changed the base branch from master to fedekunze/3872-tx-decode August 6, 2019 16:54
@fedekunze
Copy link
Collaborator

closing this PR as it hasn't been updated in a while. I'll reopen a new PR with these changes later today

@fedekunze fedekunze closed this Aug 26, 2019
@tnachen tnachen mentioned this pull request Aug 30, 2019
@tnachen tnachen mentioned this pull request Sep 10, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants