-
Notifications
You must be signed in to change notification settings - Fork 375
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
[RFC] change(gnokey): use filename as arg in sign
cmd
#877
Conversation
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.
I'm against introducing such a change into the gnokey
codebase, for a few reasons:
- it invalidates practically all tutorials / guides / video workshops we have created, since a critical API is changed
- if we wanted to support multiple files for the input of
gnokey sign
, it's trivial to do it with theff
we're using, no need to have these as command arguments - you sign multiple things with a single key, and not any other way (multiple keys for multiple things) in a single command run. This is why the key is the argument (single, required)
I would 💯 support an effort to have the key be a flag (or frankly, everything be a flag), instead of having arguments which caused headaches in the past, but this is not the topic of the PR
cc @moul
Key is obviously required, so I don't think it makes sense to have it as a flag. I don't think we'll need multiple keys, so maybe something we could do is to extend the command, maybe making the |
I very much like the
So I wanted to discuss the possibility of making it uniform with cosmos or better. I think it's a good time to discuss BREAKING API changes if it improves Cosmos also has a very nice implementation of multisign(multiple keys for single tx). Maybe we want to take a look. Opened this PR to initiate a discussion on this. that's why It's marked as RFC. Thanks. (Maybe I'm just used to cosmos sign API :p) |
Agreed & understood, just wanted to throw in my 2c. I don't know enough about multisign; but don't think we necessarily need to do the same as cosmos sdk without good reason. |
I agree with you 💯 But we can always learn from other implementations out there. And implement something which is better and fits our usecase. |
So, we discussed this during the review meeting (and together with this, also came to a decision on short flags, #1555). We can go through with this change, so we make consistent throughout Please, @harry-hov, update this PR with master and ensure that this is consistently applied to all gnokey commands :) Thanks! |
Description
Currently
gnokey sign
takes keyname/address as arg and filename from flag--txPath
. This PR reverses that order.Now it takes filename as arg and keyname/address from flag
--key
.Because:
it makes more sense to me this way
it would be easier to accommodate multiple filenames in future (if we want to support that).
Something like:
gnokey sign multiple-unsigned.tx unsigned1.tx unsigned2.tx ... --key=foo > combined-signed.tx
(see Support generating
multi msg
transaction with gnokey #845)I would like to have your opinion on this. Please consider this PR as a place to discuss about this.
Contributors Checklist
BREAKING CHANGE: xxx
message was included in the descriptionMaintainers Checklist
CONTRIBUTING.md
BREAKING CHANGE:
in the body)