-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 CLI for new gov proposal #11013
Conversation
Where proposal.json contains: | ||
|
||
{ | ||
// array of proto-JSON-encoded sdk.Msgs | ||
"messages": [ | ||
{ | ||
"@type": "/cosmos.bank.v1beta1.MsgSend", | ||
"from_address": "cosmos1...", | ||
"to_address": "cosmos1...", | ||
"amount":[{"denom": "stake","amount": "10"}] | ||
} | ||
], | ||
"metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata | ||
"deposit": "10stake" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMK what you think about this JSON format for submitting a proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that's preferable
… into am/10952-gov-cli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to support backwards compatibility via the CLI? We're changing the command name anyway so it already breaks users scripts. I also think most people submit proposals via JSON anyway so I don't think we need to keep around all the legacy flags
Where proposal.json contains: | ||
|
||
{ | ||
// array of proto-JSON-encoded sdk.Msgs | ||
"messages": [ | ||
{ | ||
"@type": "/cosmos.bank.v1beta1.MsgSend", | ||
"from_address": "cosmos1...", | ||
"to_address": "cosmos1...", | ||
"amount":[{"denom": "stake","amount": "10"}] | ||
} | ||
], | ||
"metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata | ||
"deposit": "10stake" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think that's preferable
I have a slight preference for keeping If we only allowed the new Msg-based proposals, there will be some non-trivial changes to make for CLI users (aka converting their proposal JSONs or flags) |
Yeah you're right that they're non-trivial changes but my theory is that dev ops people, like all good programmers are inherently lazy, and I doubt any of them will change their scripts until v0.47 when we finally remove support and it breaks them. |
I agree with that observation. However, I'd argue that telling them the cmd is deprecated and will be removed in the next release, is a better UX than forcing them to do changes ASAP. I also think we need a CLI (or some other tooling) to create proposal JSONs. Currently the only way is to write this JSON #11013 (comment) manually, which is error prone. I wonder if @aaronc of @blushi have opinions here, maybe we should align this with group's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from our decision around how breaking we want this to be, the changes here LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
Closes: #10952
Depends on : #10490 for proposal metadata
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change