{"action":"created","issue":{"url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/4418","repository_url":"https://api.github.com/repos/cosmos/cosmos-sdk","labels_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/4418/labels{/name}","comments_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/4418/comments","events_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/4418/events","html_url":"https://github.com/cosmos/cosmos-sdk/issues/4418","id":448680233,"node_id":"MDU6SXNzdWU0NDg2ODAyMzM=","number":4418,"title":"Custom Msg Type for sdk users","user":{"login":"YunSuk-Yeo","id":20067525,"node_id":"MDQ6VXNlcjIwMDY3NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/20067525?v=4","gravatar_id":"","url":"https://api.github.com/users/YunSuk-Yeo","html_url":"https://github.com/YunSuk-Yeo","followers_url":"https://api.github.com/users/YunSuk-Yeo/followers","following_url":"https://api.github.com/users/YunSuk-Yeo/following{/other_user}","gists_url":"https://api.github.com/users/YunSuk-Yeo/gists{/gist_id}","starred_url":"https://api.github.com/users/YunSuk-Yeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YunSuk-Yeo/subscriptions","organizations_url":"https://api.github.com/users/YunSuk-Yeo/orgs","repos_url":"https://api.github.com/users/YunSuk-Yeo/repos","events_url":"https://api.github.com/users/YunSuk-Yeo/events{/privacy}","received_events_url":"https://api.github.com/users/YunSuk-Yeo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-05-27T06:04:28Z","updated_at":"2019-05-28T12:53:00Z","closed_at":"2019-05-28T12:53:00Z","author_association":"NONE","body":"<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ \r\nv                            ✰  Thanks for opening an issue! ✰    \r\nv    Before smashing the submit button please review the template.\r\nv    Word of caution: poorly thought-out proposals may be rejected \r\nv                     without deliberation \r\n☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->\r\n\r\n## Summary\r\n\r\n<!-- Short, concise description of the proposed feature -->\r\ncosmos-sdk modules's msg type cannot be customized. Msg types are fixed in this format like \"cosmos-sdk/MsgSend\".\r\n## Problem Definition\r\n\r\n<!-- Why do we need this feature? \r\nWhat problems may be addressed by introducing this feature?\r\nWhat benefits does the SDK stand to gain by including this feature?\r\nAre there any disadvantages of including this feature? -->\r\n\r\nCurrently there is no way to customize msg types in cosmos-sdk modules due to moduleCodec in each `/x/*/codec.go` or `/x/*/types/codec.go`. By making setter for moduleCodec, sdk users can customize msg types.\r\n\r\nFor the branding purpose, sdk users may want to change cosmos-sdk prefix to their one. If cosmos-sdk gives some feature to let them customize cosmos-sdk prefix, it will be helpful to enhance project branding.\r\n\r\n## Proposal\r\n\r\n<!-- Detailed description of requirements of implementation -->\r\nAdd setters for moduleCodec in `/x/*/codec.go` or `/x/*/types/codec.go`.\r\n\r\n`\r\n// SetModuleCodec allows sdk users use custom codex at GetSignBytes\r\nfunc SetModuleCodec(cdc *codec.Codec) {\r\n\tMoudleCdc = cdc\r\n}\r\n`\r\n____\r\n\r\n#### For Admin Use\r\n\r\n- [ ] Not duplicate issue\r\n- [ ] Appropriate labels applied\r\n- [ ] Appropriate contributors tagged\r\n- [ ] Contributor assigned/self-assigned\r\n"},"comment":{"url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/comments/496503703","html_url":"https://github.com/cosmos/cosmos-sdk/issues/4418#issuecomment-496503703","issue_url":"https://api.github.com/repos/cosmos/cosmos-sdk/issues/4418","id":496503703,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5NjUwMzcwMw==","user":{"login":"alexanderbez","id":5265989,"node_id":"MDQ6VXNlcjUyNjU5ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/5265989?v=4","gravatar_id":"","url":"https://api.github.com/users/alexanderbez","html_url":"https://github.com/alexanderbez","followers_url":"https://api.github.com/users/alexanderbez/followers","following_url":"https://api.github.com/users/alexanderbez/following{/other_user}","gists_url":"https://api.github.com/users/alexanderbez/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderbez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderbez/subscriptions","organizations_url":"https://api.github.com/users/alexanderbez/orgs","repos_url":"https://api.github.com/users/alexanderbez/repos","events_url":"https://api.github.com/users/alexanderbez/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderbez/received_events","type":"User","site_admin":false},"created_at":"2019-05-28T12:53:00Z","updated_at":"2019-05-28T12:53:00Z","author_association":"CONTRIBUTOR","body":"Thanks for creating this issue @YunSuk-Yeo but I strongly do not recommend we do this. Here are some initial thoughts on why I'm opposed to this:\r\n\r\n1. We're soon to be ditching amino in which these prefix bytes are subject to change\r\n2. Regardless, the types should match the concrete definitions (ie. `type/MsgSend` should refer to `type MsgSend struct { // ...}`\r\n3. This is highly error prone if the codec you provide does not register all the necessary types -- this could easily cause the node to crash/panic. It's best to leave the module's codec privately defined."}}
{"actor":{"display_login":"alexanderbez"}}