From 0a96e26fbad8ff67cd130ad151c7f8e968c12d09 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 24 Jan 2022 20:00:01 +0100 Subject: [PATCH] Remove RunAs from Migrate proposal --- docs/proto/proto-docs.md | 9 +- proto/cosmwasm/wasm/v1/proposal.proto | 9 +- x/wasm/client/cli/gov_tx.go | 9 -- x/wasm/client/rest/gov.go | 3 - x/wasm/keeper/proposal_handler.go | 4 +- x/wasm/types/proposal.go | 8 +- x/wasm/types/proposal.pb.go | 148 +++++++++----------------- x/wasm/types/test_fixtures.go | 1 - 8 files changed, 62 insertions(+), 129 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 41756a7a..77202e52 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -673,7 +673,7 @@ contract. | `description` | [string](#string) | | Description is a human readable text | | `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | | `contract` | [string](#string) | | Contract is the address of the smart contract | -| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as sudo | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as execute | @@ -712,10 +712,11 @@ MigrateContractProposal gov proposal content type to migrate a contract. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `title` | [string](#string) | | Title is a short summary | -| `description` | [string](#string) | | Description is a human readable text | -| `run_as` | [string](#string) | | FIXME: I think this is unused? Migrate has no sender RunAs is the address that is passed to the contract's environment as sender | +| `description` | [string](#string) | | Description is a human readable text + +Note: skipping 3 as this was previously used for unneeded run_as | | `contract` | [string](#string) | | Contract is the address of the smart contract | -| `code_id` | [uint64](#uint64) | | CodeID references the new WASM code | +| `code_id` | [uint64](#uint64) | | CodeID references the new WASM codesudo | | `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract on migration | diff --git a/proto/cosmwasm/wasm/v1/proposal.proto b/proto/cosmwasm/wasm/v1/proposal.proto index 56131199..58887f38 100644 --- a/proto/cosmwasm/wasm/v1/proposal.proto +++ b/proto/cosmwasm/wasm/v1/proposal.proto @@ -56,12 +56,11 @@ message MigrateContractProposal { string title = 1; // Description is a human readable text string description = 2; - // FIXME: I think this is unused? Migrate has no sender - // RunAs is the address that is passed to the contract's environment as sender - string run_as = 3; + // Note: skipping 3 as this was previously used for unneeded run_as + // Contract is the address of the smart contract string contract = 4; - // CodeID references the new WASM code + // CodeID references the new WASM codesudo uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; // Msg json encoded message to be passed to the contract on migration bytes msg = 6 [ (gogoproto.casttype) = "RawContractMessage" ]; @@ -90,7 +89,7 @@ message ExecuteContractProposal { string run_as = 3; // Contract is the address of the smart contract string contract = 4; - // Msg json encoded message to be passed to the contract as sudo + // Msg json encoded message to be passed to the contract as execute bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; } diff --git a/x/wasm/client/cli/gov_tx.go b/x/wasm/client/cli/gov_tx.go index 158f0632..406d7ae9 100644 --- a/x/wasm/client/cli/gov_tx.go +++ b/x/wasm/client/cli/gov_tx.go @@ -181,13 +181,6 @@ func ProposalMigrateContractCmd() *cobra.Command { return err } - runAs, err := cmd.Flags().GetString(flagRunAs) - if err != nil { - return fmt.Errorf("run-as: %s", err) - } - if len(runAs) == 0 { - return errors.New("run-as address is required") - } proposalTitle, err := cmd.Flags().GetString(cli.FlagTitle) if err != nil { return fmt.Errorf("proposal title: %s", err) @@ -211,7 +204,6 @@ func ProposalMigrateContractCmd() *cobra.Command { Contract: src.Contract, CodeID: src.CodeID, Msg: src.Msg, - RunAs: runAs, } msg, err := govtypes.NewMsgSubmitProposal(&content, deposit, clientCtx.GetFromAddress()) @@ -225,7 +217,6 @@ func ProposalMigrateContractCmd() *cobra.Command { return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } - cmd.Flags().String(flagRunAs, "", "The address that is passed as sender to the contract on proposal execution") // proposal flags cmd.Flags().String(cli.FlagTitle, "", "Title of proposal") diff --git a/x/wasm/client/rest/gov.go b/x/wasm/client/rest/gov.go index ea17ddaf..73419cf7 100644 --- a/x/wasm/client/rest/gov.go +++ b/x/wasm/client/rest/gov.go @@ -126,8 +126,6 @@ type MigrateProposalJSONReq struct { Contract string `json:"contract" yaml:"contract"` Code uint64 `json:"code_id" yaml:"code_id"` Msg json.RawMessage `json:"msg" yaml:"msg"` - // RunAs is the role that is passed to the contract's environment - RunAs string `json:"run_as" yaml:"run_as"` } func (s MigrateProposalJSONReq) Content() govtypes.Content { @@ -137,7 +135,6 @@ func (s MigrateProposalJSONReq) Content() govtypes.Content { Contract: s.Contract, CodeID: s.Code, Msg: types.RawContractMessage(s.Msg), - RunAs: s.RunAs, } } func (s MigrateProposalJSONReq) GetProposer() string { diff --git a/x/wasm/keeper/proposal_handler.go b/x/wasm/keeper/proposal_handler.go index 9f44e3b8..b1f47214 100644 --- a/x/wasm/keeper/proposal_handler.go +++ b/x/wasm/keeper/proposal_handler.go @@ -103,11 +103,11 @@ func handleMigrateProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.M if err != nil { return sdkerrors.Wrap(err, "contract") } - runAsAddr, err := sdk.AccAddressFromBech32(p.RunAs) if err != nil { return sdkerrors.Wrap(err, "run as address") } - data, err := k.Migrate(ctx, contractAddr, runAsAddr, p.CodeID, p.Msg) + // runAs is not used if this is permissioned, so just put any valid address there (second contractAddr) + data, err := k.Migrate(ctx, contractAddr, contractAddr, p.CodeID, p.Msg) if err != nil { return err } diff --git a/x/wasm/types/proposal.go b/x/wasm/types/proposal.go index 97df3b4a..21de9cc4 100644 --- a/x/wasm/types/proposal.go +++ b/x/wasm/types/proposal.go @@ -245,9 +245,6 @@ func (p MigrateContractProposal) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(p.Contract); err != nil { return sdkerrors.Wrap(err, "contract") } - if _, err := sdk.AccAddressFromBech32(p.RunAs); err != nil { - return sdkerrors.Wrap(err, "run as") - } if err := p.Msg.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "payload msg") } @@ -261,9 +258,8 @@ func (p MigrateContractProposal) String() string { Description: %s Contract: %s Code id: %d - Run as: %s Msg %q -`, p.Title, p.Description, p.Contract, p.CodeID, p.RunAs, p.Msg) +`, p.Title, p.Description, p.Contract, p.CodeID, p.Msg) } // MarshalYAML pretty prints the migrate message @@ -274,14 +270,12 @@ func (p MigrateContractProposal) MarshalYAML() (interface{}, error) { Contract string `yaml:"contract"` CodeID uint64 `yaml:"code_id"` Msg string `yaml:"msg"` - RunAs string `yaml:"run_as"` }{ Title: p.Title, Description: p.Description, Contract: p.Contract, CodeID: p.CodeID, Msg: string(p.Msg), - RunAs: p.RunAs, }, nil } diff --git a/x/wasm/types/proposal.pb.go b/x/wasm/types/proposal.pb.go index a80392b3..677ce926 100644 --- a/x/wasm/types/proposal.pb.go +++ b/x/wasm/types/proposal.pb.go @@ -131,12 +131,9 @@ type MigrateContractProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` // Description is a human readable text Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // FIXME: I think this is unused? Migrate has no sender - // RunAs is the address that is passed to the contract's environment as sender - RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` // Contract is the address of the smart contract Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` - // CodeID references the new WASM code + // CodeID references the new WASM codesudo CodeID uint64 `protobuf:"varint,5,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` // Msg json encoded message to be passed to the contract on migration Msg RawContractMessage `protobuf:"bytes,6,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` @@ -229,7 +226,7 @@ type ExecuteContractProposal struct { RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` // Contract is the address of the smart contract Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` - // Msg json encoded message to be passed to the contract as sudo + // Msg json encoded message to be passed to the contract as execute Msg RawContractMessage `protobuf:"bytes,5,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` } @@ -453,53 +450,54 @@ func init() { func init() { proto.RegisterFile("cosmwasm/wasm/v1/proposal.proto", fileDescriptor_be6422d717c730cb) } var fileDescriptor_be6422d717c730cb = []byte{ - // 732 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xcd, 0x36, 0x89, 0x93, 0x6e, 0x23, 0x08, 0x26, 0x6d, 0x43, 0x41, 0x76, 0x64, 0xa4, 0xca, - 0x17, 0x6c, 0x52, 0x24, 0x04, 0xdc, 0xe2, 0xc0, 0xa1, 0x15, 0x95, 0x2a, 0x57, 0x55, 0x25, 0x2e, - 0xd1, 0xc6, 0xde, 0xa6, 0x16, 0xb1, 0xd7, 0xf2, 0x6e, 0x9a, 0xe6, 0x2f, 0x38, 0x70, 0xe4, 0x03, - 0x10, 0x07, 0x10, 0x7f, 0x51, 0x71, 0xaa, 0xc4, 0xa5, 0x27, 0x43, 0xd3, 0x3f, 0xc8, 0x11, 0x09, - 0x09, 0xad, 0xd7, 0x09, 0x69, 0x41, 0x2d, 0x12, 0x05, 0xc4, 0xc5, 0xc9, 0x78, 0xde, 0xf8, 0xbd, - 0x79, 0x9e, 0xf1, 0x42, 0xd5, 0x21, 0xd4, 0xef, 0x23, 0xea, 0x9b, 0xc9, 0x65, 0xaf, 0x6e, 0x86, - 0x11, 0x09, 0x09, 0x45, 0x5d, 0x23, 0x8c, 0x08, 0x23, 0x72, 0x79, 0x0c, 0x30, 0x92, 0xcb, 0x5e, - 0x7d, 0xa9, 0xd2, 0x21, 0x1d, 0x92, 0x24, 0x4d, 0xfe, 0x4f, 0xe0, 0x96, 0x14, 0x8e, 0x23, 0xd4, - 0x6c, 0x23, 0x8a, 0xcd, 0xbd, 0x7a, 0x1b, 0x33, 0x54, 0x37, 0x1d, 0xe2, 0x05, 0x69, 0xfe, 0xd6, - 0x0f, 0x44, 0x6c, 0x10, 0x62, 0x2a, 0xb2, 0xda, 0x57, 0x00, 0xaf, 0x6d, 0x32, 0x12, 0xe1, 0x26, - 0x71, 0xf1, 0x46, 0xaa, 0x40, 0xae, 0xc0, 0x3c, 0xf3, 0x58, 0x17, 0x57, 0x41, 0x0d, 0xe8, 0xb3, - 0xb6, 0x08, 0xe4, 0x1a, 0x9c, 0x73, 0x31, 0x75, 0x22, 0x2f, 0x64, 0x1e, 0x09, 0xaa, 0x33, 0x49, - 0x6e, 0xfa, 0x96, 0x3c, 0x0f, 0xa5, 0xa8, 0x17, 0xb4, 0x10, 0xad, 0x66, 0x45, 0x61, 0xd4, 0x0b, - 0x1a, 0x54, 0xbe, 0x0f, 0xaf, 0x70, 0xee, 0x56, 0x7b, 0xc0, 0x70, 0xcb, 0x21, 0x2e, 0xae, 0xe6, - 0x6a, 0x40, 0x2f, 0x59, 0xe5, 0x61, 0xac, 0x96, 0xb6, 0x1b, 0x9b, 0xeb, 0xd6, 0x80, 0x25, 0x02, - 0xec, 0x12, 0xc7, 0x8d, 0x23, 0x79, 0x0b, 0x2e, 0x78, 0x01, 0x65, 0x28, 0x60, 0x1e, 0x62, 0xb8, - 0x15, 0xe2, 0xc8, 0xf7, 0x28, 0xe5, 0xdc, 0x85, 0x1a, 0xd0, 0xe7, 0x56, 0x14, 0xe3, 0xac, 0x47, - 0x46, 0xc3, 0x71, 0x30, 0xa5, 0x4d, 0x12, 0xec, 0x78, 0x1d, 0x7b, 0x7e, 0xaa, 0x7a, 0x63, 0x52, - 0xbc, 0x96, 0x2b, 0xe6, 0xcb, 0xd2, 0x5a, 0xae, 0x28, 0x95, 0x0b, 0xda, 0x87, 0x19, 0x78, 0x73, - 0xf5, 0x3b, 0xaa, 0x49, 0x02, 0x16, 0x21, 0x87, 0xfd, 0x29, 0x27, 0x2a, 0x30, 0x8f, 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 0xbe, 0x71, 0x4d, 0x42, 0xfd, 0xed, 0xf1, - 0x41, 0xe9, 0x9a, 0xfb, 0xe2, 0xc0, 0x4c, 0xbe, 0x73, 0x6d, 0x29, 0x39, 0x2e, 0xef, 0x7d, 0x0b, - 0x00, 0x00, 0xff, 0xff, 0x7a, 0x1d, 0x54, 0x9b, 0xb7, 0x07, 0x00, 0x00, + // 738 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x41, 0x4f, 0xdb, 0x48, + 0x14, 0xce, 0x90, 0xc4, 0x09, 0x43, 0xb4, 0x9b, 0xf5, 0x06, 0xc8, 0xb2, 0x2b, 0x3b, 0xf2, 0x4a, + 0xc8, 0x97, 0xb5, 0x37, 0xac, 0xb4, 0xda, 0xed, 0x2d, 0x4e, 0x7b, 0x00, 0x15, 0x09, 0x19, 0x21, + 0xa4, 0x5e, 0xa2, 0x89, 0x3d, 0x04, 0xab, 0xf1, 0x8c, 0xe5, 0x99, 0x10, 0xf2, 0x2f, 0x7a, 0xe8, + 0xb1, 0x3f, 0xa0, 0xea, 0xa1, 0x55, 0xef, 0xfd, 0x01, 0xa8, 0x27, 0x8e, 0x9c, 0xdc, 0x12, 0xfe, + 0x41, 0x8e, 0x95, 0x2a, 0x55, 0xe3, 0x71, 0xd2, 0x40, 0x2b, 0xa8, 0x54, 0x38, 0xf4, 0xe2, 0xe4, + 0xf9, 0xbd, 0x37, 0xdf, 0x37, 0x9f, 0xbf, 0x37, 0x03, 0x75, 0x8f, 0xb2, 0x70, 0x88, 0x58, 0x68, + 0xa7, 0x8f, 0xa3, 0xa6, 0x1d, 0xc5, 0x34, 0xa2, 0x0c, 0xf5, 0xad, 0x28, 0xa6, 0x9c, 0xaa, 0xd5, + 0x69, 0x81, 0x95, 0x3e, 0x8e, 0x9a, 0x6b, 0xb5, 0x1e, 0xed, 0xd1, 0x34, 0x69, 0x8b, 0x7f, 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xe4, 0x42, 0xcb, 0x9d, 0x5e, 0x68, 0xb9, 0xb3, 0x0b, 0x2d, 0xf7, 0x68, 0x7d, 0xee, 0x30, + 0x6b, 0x53, 0x16, 0xee, 0x4f, 0x6f, 0x44, 0xdf, 0x3e, 0x96, 0x37, 0x63, 0x7a, 0xa0, 0x75, 0x95, + 0xf4, 0x5e, 0xfc, 0xe7, 0x53, 0x00, 0x00, 0x00, 0xff, 0xff, 0x34, 0xa1, 0x57, 0x17, 0xa0, 0x07, + 0x00, 0x00, } func (this *StoreCodeProposal) Equal(that interface{}) bool { @@ -613,9 +611,6 @@ func (this *MigrateContractProposal) Equal(that interface{}) bool { if this.Description != that1.Description { return false } - if this.RunAs != that1.RunAs { - return false - } if this.Contract != that1.Contract { return false } @@ -1015,13 +1010,6 @@ func (m *MigrateContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x22 } - if len(m.RunAs) > 0 { - i -= len(m.RunAs) - copy(dAtA[i:], m.RunAs) - i = encodeVarintProposal(dAtA, i, uint64(len(m.RunAs))) - i-- - dAtA[i] = 0x1a - } if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) @@ -1449,10 +1437,6 @@ func (m *MigrateContractProposal) Size() (n int) { if l > 0 { n += 1 + l + sovProposal(uint64(l)) } - l = len(m.RunAs) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } l = len(m.Contract) if l > 0 { n += 1 + l + sovProposal(uint64(l)) @@ -2227,38 +2211,6 @@ func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { } m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RunAs = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) diff --git a/x/wasm/types/test_fixtures.go b/x/wasm/types/test_fixtures.go index 1c74771f..568c4f7c 100644 --- a/x/wasm/types/test_fixtures.go +++ b/x/wasm/types/test_fixtures.go @@ -249,7 +249,6 @@ func MigrateContractProposalFixture(mutators ...func(p *MigrateContractProposal) Contract: contractAddr, CodeID: 1, Msg: migMsgBz, - RunAs: anyAddress, } for _, m := range mutators {