-
Notifications
You must be signed in to change notification settings - Fork 648
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
Issue867 Add CLI command to add signatures to a partially signed transaction #1032
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.
IMO this API is much too complicated. Specifically, it introduces a new type of state into the wallet API, which can lead to surprising behaviour.
I think the desired functionality can be implemented with a simple idempotent call - tx with no/few sigs in, tx with more/all sigs out.
@pmconrad thanks very much~ I have added some explanation on this topic. The new introduced type was intend to easily use.. |
@cifer-lee Based on your comments above, it seems you are now refactoring Issue #867. Therefore, I will Label this PR as This whole flow/organization is still a work in progress, so appreciate your comments for improvement. |
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 have not tested this code (will do so soon), but did find a few areas where you may want to fix the log messages...
Thanks Peter and John~ @pmconrad I have made a lot of simplification according to your suggestion, may you check it again~ So far, self test ok:
|
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 wrote "rename to sign_transaction2
to add some confusion" because IMHO sign_transaction2
would confuse people. Hoped that someone else would come up with a better idea, but still waiting.. @ryanRfox @pmconrad @jmjatlanta @oxarbitrage please advise. Thanks.
Anyway, the comments/docs should clearly describe the differences between the 2 commands.
BTW @cifer-lee please resolve conflicts.
As for the method name, Pro: kind of indicates that others can add their signature as well. |
I think |
I do not think |
@cifer-lee please review the Reviewer comments above and update the PR accordingly. I added this to the 201904 Feature Release. |
@ryanRfox Okay, sorry for the delay of work, I will pick it up this afternoon |
I think we need a name to convey the meaning of "sign this transaction to add new signatures while keeping the existing signatures unchanged". So I think a name like IMHO,
We just need clearly describe the difference in document. @jmjatlanta @abitmore @cogutvalera please reconsider it? Update: I just come up with a few new names: |
IMO |
Sorry, #1626 introduced a conflict, please fix it. Thanks. |
Oh, have resolved the conflicts |
Fix for #867
Note by @abitmore: the final implementation of this PR is online-signing but not offline-signing.
--- below is original message by @cifer-lee ---
Roughly implemented multi-sig approach.
Some explanation:
The new added
multisig_trx_data
struct was in consideration of user experience, thus when import the transaction we will know what keys are needed to sign it. But I'm not sure if this was a appropriate practice, if it was, I feel like to show which keys were already signed and which were not --- so make it more user friendly.Would like to hear from more devs.