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

Msg authorization --send-as CLI flag implementation #27

Closed
2 tasks
aaronc opened this issue Nov 6, 2019 · 1 comment
Closed
2 tasks

Msg authorization --send-as CLI flag implementation #27

aaronc opened this issue Nov 6, 2019 · 1 comment

Comments

@aaronc
Copy link
Collaborator

aaronc commented Nov 6, 2019

Acceptance Criteria

@ethanfrey
Copy link

Integration tests are realistic, but maybe not automated. There should at least be a simple walk-through as we did in the gaia upgrade run, that is checked manually during execution phase.

The --send-as flag must be registered as a global flag on gaiacli tx, and processed in the generic tx logic, for it to work as you mentioned. This then makes a hard link between cosmos-sdk/client and x/msg_authorization/ which may be circular (as x/msg_authorization/client/cli imports cosmos-sdk/client) and in any case likely unpalatable to the sdk team.

I am not sure of any alternative approach however, given the current tx monolith architecture. But maybe a deeper dive into it may provide some hook to allow this, at least on the app level. (Just to explain an alternative that may give inspiration, look at a sample bnscli script from weave. There are atomic commands piped together. In this case update-electorate creates a msg, with-elector can be called multiple times to add more electors (which could also be done with a list on the first argument), but most importantly bnscli as-proposal will take the existing message (formed from any commands) and use it as the payload of another message (gov vote).

This same approach could be applied here, just pipe the output into a script that embeds the message. However, this does imply that there is a clear separation between constructing a message, signing it, and submitting it.

I would propose a spike to investigate viable alternatives here

@aaronc aaronc closed this as completed Feb 25, 2020
@aaronc aaronc removed the backlog label Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants