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

generate-only still requires node access #4305

Closed
4 tasks
alexanderbez opened this issue May 8, 2019 · 4 comments · Fixed by #4306
Closed
4 tasks

generate-only still requires node access #4305

alexanderbez opened this issue May 8, 2019 · 4 comments · Fixed by #4306

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented May 8, 2019

Summary of Bug

A bulk, if not all, commands that support --generate-only call GenerateOrBroadcastMsgs. This internally is always passed offline: false, which is then passed to PrintUnsignedStdTx. Because offline: false, we then call buildUnsignedStdTx, which then calls PrepareTxBuilder. Finally, PrepareTxBuilder performs some node queries. Namely, it ensures the account exists.

I believe PrepareTxBuilder should remain as-is, but that PrintUnsignedStdTx never calls buildUnsignedStdTx.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alessio
Copy link
Contributor

alessio commented May 8, 2019

generate-only is increasingly becoming a proper offline mode. Why don't we me merge the two offline and generate-only modes together then?

@alexanderbez
Copy link
Contributor Author

offline isn't really a thing @alessio. There's only the notion of generate-only. offline is only used during tx sign, in which case generate-only isn't applicable.

@alessio
Copy link
Contributor

alessio commented May 8, 2019

It kinda was, look at x/auth/client/cli/multisign.go and x/auth/client/cli/sign.go. The plan was to grow that feature into something more generic. See also: #3720

As discussed in chat, I think it should be OK to just update --generate-only docs and make clear that connectivity to the node is cut when the flag is up.

@alexanderbez
Copy link
Contributor Author

Updated the CLI flag description @alessio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants