-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Change GetSigners
to return a single address as string
#12628
Comments
Why making that limitation? What's the benefit? Maybe other, custom messages require multiple signers? BTW: I agree that it's API breaking. |
If you want to remove bech32 dependency then we can change return type from |
ACK @AmauryM -- let's just rip the bandaid off and modify the existing API to be |
Wait, I agree with @robert-zaremba. Why are we removing the flexibility to allow for multiple signers? There may be Msgs in other chains that make use of this The situation I brought up here was very specifically due to the non 1:1 nature of senders and recipients in that msg. I think many sender, single recipient msg type would also be useful, and that needs the ability to be multi signer. |
Any updates on this? Theoretically, this change would harm the flexibility, but I couldn't come up with any practical usage. It seems that the last candidate against this now has been removed (on #14567). Also, you should consider the limitation in x/authz, which prohibits MsgExec on messages of multiple signer. So if we decide to keep the feature, we may also have to add some improvement into the design of x/authz. I'm not talking about the API. The semantics matters. |
There could be |
I think we probably shouldn't do this and close this issue, given the breakage and effort required |
And, the key format of the grants is granter/grantee/msg_type for now, so we should also revisit the format. Or we may need to introduce a new key prefix for the multiple signer grants.
Then, what's the cosmos-sdk's position on multiple signer messages?
|
I think the proto approach should be GetSigner and we have a way to override it to GetSigners, but the sdk will revert to GetSigner for all things. The multimsg approach solves most usecases or at least i havent heard of one that needs this feature |
Pasting my Slack comment here too: Since we're moving to proto annotations signers, we can do:
Also, the |
Just for the record, I am opposed to this proposal. If I were designing the SDK from scratch I would probably only allow one signer but I don't see the pain points here being sufficient justification for removing the flexibility and causing a protocol level breaking change. One valid use case is group MsgSubmitProposal which allows multiple group members to propose, approve and execute an operation without introducing any transient group proposal state. This simulates the way the current multisig pubkey works and I don't see a way to achieve this same behavior without multi signers. |
discussed this to great lengths in a few chats, The final outcome was we wont remove this functionality, thanks to everyone who participated in these chats |
Summary
In the
sdk.Msg
interface, changeGetSigners
to always return one signer, as a bech32-encoded string.Problem Definition
There has been discussion (see here and Discord) to keep 1 Msg == 1 signer. The only Msg that doesn't do that is MsgMultiSend, but the same behavior can be achieved with a multi-Msg tx, see #12601.
In #9239, we also considered changing
GetSigners
to[]string
to remove the bech32 config dependency.Proposal
Combine the 2 issues above, and make
GetSigners
always return 1 signer as a bech32-encoded string.Altnernative: Only add the new method, and deprecate the old one
We can consider only adding a new
GetSigner() string
method to that interface, and mark as deprecated the existingGetSigners() []AccAddress
, which might make the transition smoother. But I'd argue it's anyways an API-breaking change, so let's do it only once and for good.For Admin Use
The text was updated successfully, but these errors were encountered: