diff --git a/app/ante.go b/app/ante.go index 7961db1a9..d27d7ee37 100644 --- a/app/ante.go +++ b/app/ante.go @@ -2,11 +2,13 @@ package app import ( "cosmossdk.io/core/store" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/ibc-go/v8/modules/core/keeper" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/scrtlabs/SecretNetwork/x/compute" ) @@ -15,6 +17,8 @@ import ( type HandlerOptions struct { ante.HandlerOptions + appCodec codec.Codec + govkeeper govkeeper.Keeper // You'll need the keeper to access stored mrenclave hash IBCKeeper *keeper.Keeper WasmConfig *compute.WasmConfig TXCounterStoreService store.KVStoreService @@ -39,7 +43,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { } anteDecorators := []sdk.AnteDecorator{ - compute.NewCountTXDecorator(options.TXCounterStoreService), + compute.NewCountTXDecorator(options.appCodec, options.govkeeper, options.TXCounterStoreService), ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first ante.NewExtensionOptionsDecorator(nil), ante.NewValidateBasicDecorator(), diff --git a/app/app.go b/app/app.go index ec1016292..9249d5ed1 100644 --- a/app/app.go +++ b/app/app.go @@ -42,6 +42,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/authz" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/cosmos/gogoproto/proto" icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" @@ -174,6 +175,10 @@ func (app *SecretNetworkApp) GetIBCKeeper() *ibckeeper.Keeper { return app.AppKeepers.IbcKeeper } +func (app *SecretNetworkApp) GetGovKeeper() *govkeeper.Keeper { + return app.AppKeepers.GovKeeper +} + func (app *SecretNetworkApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { return app.AppKeepers.ScopedIBCKeeper } @@ -369,6 +374,8 @@ func NewSecretNetworkApp( SignModeHandler: app.txConfig.SignModeHandler(), SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, + appCodec: app.appCodec, + govkeeper: *app.AppKeepers.GovKeeper, IBCKeeper: app.AppKeepers.IbcKeeper, WasmConfig: computeConfig, TXCounterStoreService: app.AppKeepers.ComputeKeeper.GetStoreService(), diff --git a/proto/secret/compute/v1beta1/msg.proto b/proto/secret/compute/v1beta1/msg.proto index 29baf848a..4e09ed225 100644 --- a/proto/secret/compute/v1beta1/msg.proto +++ b/proto/secret/compute/v1beta1/msg.proto @@ -25,6 +25,7 @@ service Msg { rpc UpdateAdmin(MsgUpdateAdmin) returns (MsgUpdateAdminResponse); // ClearAdmin removes any admin stored for a smart contract rpc ClearAdmin(MsgClearAdmin) returns (MsgClearAdminResponse); + rpc UpgradeProposalPassed(MsgUpgradeProposalPassed) returns (MsgUpgradeProposalPassedResponse); } message MsgStoreCode { @@ -187,3 +188,17 @@ message MsgClearAdmin { // MsgClearAdminResponse returns empty data message MsgClearAdminResponse {} + +message MsgUpgradeProposalPassed { + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender_address"; + option (amino.name) = "wasm/MsgUpgradeProposalPassed"; + + // Sender is the actor that signed the message + string sender_address = 1; + + // SHA256 hash of the new MREnclave + bytes mr_enclave_hash = 2; +} + +message MsgUpgradeProposalPassedResponse {} \ No newline at end of file diff --git a/x/compute/client/cli/tx.go b/x/compute/client/cli/tx.go index ccb3a2f21..7603d6bc9 100644 --- a/x/compute/client/cli/tx.go +++ b/x/compute/client/cli/tx.go @@ -50,6 +50,7 @@ func GetTxCmd() *cobra.Command { MigrateContractCmd(), UpdateContractAdminCmd(), ClearContractAdminCmd(), + UpgradeProposalPassedCmd(), ) return txCmd } @@ -568,3 +569,37 @@ func ClearContractAdminCmd() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } + +// UpgradeProposalPassedCmd +func UpgradeProposalPassedCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "upgrade-proposal-passed [mrenclave-hash]", + Short: "Upgrade MREnclave with a new SHA256 hash", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + mrEnclaveHash := args[0] + + // Create the message for upgrading the MREnclave + msg := types.MsgUpgradeProposalPassed{ + SenderAddress: clientCtx.GetFromAddress().String(), + MrEnclaveHash: []byte(mrEnclaveHash), + } + + // Validate the message + if err = msg.ValidateBasic(); err != nil { + return err + } + + // Generate or broadcast the transaction + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/compute/internal/keeper/ante.go b/x/compute/internal/keeper/ante.go index 4b1bc6487..e756d1967 100644 --- a/x/compute/internal/keeper/ante.go +++ b/x/compute/internal/keeper/ante.go @@ -2,20 +2,56 @@ package keeper import ( "encoding/binary" + "errors" + "fmt" + "regexp" "cosmossdk.io/core/store" + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/codec" + types1 "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/scrtlabs/SecretNetwork/x/compute/internal/types" ) // CountTXDecorator ante handler to count the tx position in a block. type CountTXDecorator struct { + appcodec codec.Codec + govkeeper govkeeper.Keeper // we need the govkeeper to access stored proposals storeService store.KVStoreService } +const msgSoftwareUpgradeTypeURL = "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade" + // NewCountTXDecorator constructor -func NewCountTXDecorator(storeService store.KVStoreService) *CountTXDecorator { - return &CountTXDecorator{storeService: storeService} +func NewCountTXDecorator(appcodec codec.Codec, govkeeper govkeeper.Keeper, storeService store.KVStoreService) *CountTXDecorator { + return &CountTXDecorator{ + appcodec: appcodec, + govkeeper: govkeeper, + storeService: storeService, + } +} + +// Function to find and return the MREnclaveHash string from input +func findMREnclaveHash(input string) (string, error) { + // Define the regular expression pattern with a capture group for the SHA256 hash + pattern := `^MREnclaveHash:([a-fA-F0-9]{64})$` + + re := regexp.MustCompile(pattern) + + matches := re.FindStringSubmatch(input) + + // If no match is found, return an error + if len(matches) < 2 { + return "", errors.New("MREnclaveHash not found or invalid in the input string") + } + + // The SHA256 hash is captured in the first capturing group, which is matches[1] + return matches[1], nil } // AnteHandle handler stores a tx counter with current height encoded in the store to let the app handle @@ -44,9 +80,76 @@ func (a CountTXDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ctx.Logger().Error("compute ante store set", "store", err.Error()) } + for _, msg := range tx.GetMsgs() { + // Check if this is a MsgUpgradeProposalPassed + msgUpgrade, ok := msg.(*types.MsgUpgradeProposalPassed) + if ok { + err = a.verifyUpgradeProposal(ctx, msgUpgrade) + if err != nil { + return ctx, err + } + } + } + return next(types.WithTXCounter(ctx, txCounter), tx, simulate) } +// extractInfoFromProposalMessages extracts the "info" field from the proposal message. +// This "info" contains the MREnclaveHash. +func extractInfoFromProposalMessages(message *types1.Any, cdc codec.Codec) (string, error) { + var softwareUpgradeMsg *upgradetypes.MsgSoftwareUpgrade + err := cdc.UnpackAny(message, &softwareUpgradeMsg) + if err != nil { + return "", fmt.Errorf("failed to unpack message: %w", err) + } + + return softwareUpgradeMsg.Plan.Info, nil +} + +// verifyUpgradeProposal verifies the latest passed upgrade proposal to ensure the MREnclave hash matches. +func (a *CountTXDecorator) verifyUpgradeProposal(ctx sdk.Context, msgUpgrade *types.MsgUpgradeProposalPassed) error { + var proposals govtypes.Proposals + err := a.govkeeper.Proposals.Walk(ctx, nil, func(_ uint64, value govtypes.Proposal) (stop bool, err error) { + proposals = append(proposals, &value) + return false, nil + }) + if err != nil { + ctx.Logger().Error("gov keeper", "proposal", err.Error()) + return err + } + + var latestProposal *v1.Proposal = nil + var latestMREnclaveHash string + + // Iterate through the proposals + for _, proposal := range proposals { + // Check if the proposal has passed and is of type MsgSoftwareUpgrade + if proposal.Status == v1.ProposalStatus_PROPOSAL_STATUS_PASSED { + if len(proposal.GetMessages()) > 0 && proposal.Messages[0].GetTypeUrl() == msgSoftwareUpgradeTypeURL { + // Update latestProposal if this proposal is newer (has a higher ID) + if latestProposal == nil || proposal.Id > latestProposal.Id { + latestProposal = proposal + } + } + } + } + + // If we found the MsgSoftwareUpgrade latest passed proposal, extract the MREnclaveHash from it + if latestProposal != nil { + info, err := extractInfoFromProposalMessages(latestProposal.Messages[0], a.appcodec) + if err != nil { + return fmt.Errorf("Failed to extract info with MREnclave hash from Proposal, error: %w", err) + } + latestMREnclaveHash, _ = findMREnclaveHash(info) + } + + // Check if the MREnclave hash matches the one in the MsgUpgradeProposalPassed message + if latestMREnclaveHash != string(msgUpgrade.MrEnclaveHash) { + return sdkerrors.ErrUnauthorized.Wrap("software upgrade proposal: mrenclave hash mismatch") + } + return nil +} + func encodeHeightCounter(height int64, counter uint32) []byte { b := make([]byte, 4) binary.BigEndian.PutUint32(b, counter) diff --git a/x/compute/internal/keeper/msg_server.go b/x/compute/internal/keeper/msg_server.go index 8fe9b8c81..22c2f6d20 100644 --- a/x/compute/internal/keeper/msg_server.go +++ b/x/compute/internal/keeper/msg_server.go @@ -192,3 +192,19 @@ func (m msgServer) ClearAdmin(goCtx context.Context, msg *types.MsgClearAdmin) ( return &types.MsgClearAdminResponse{}, nil } + +func (m msgServer) UpgradeProposalPassed(goCtx context.Context, msg *types.MsgUpgradeProposalPassed) (*types.MsgUpgradeProposalPassedResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeExecute, + sdk.NewAttribute(sdk.AttributeKeySender, msg.SenderAddress), + sdk.NewAttribute("mrenclave", string(msg.MrEnclaveHash)), + )) + + return &types.MsgUpgradeProposalPassedResponse{}, nil +} diff --git a/x/compute/internal/types/events.go b/x/compute/internal/types/events.go index 2315ac4c4..58469d68f 100644 --- a/x/compute/internal/types/events.go +++ b/x/compute/internal/types/events.go @@ -6,15 +6,16 @@ const ( // CustomContractEventPrefix contracts can create custom events. To not mix them with other system events they got the `wasm-` prefix. CustomContractEventPrefix = "wasm-" - EventTypeStoreCode = "store_code" - EventTypeInstantiate = "instantiate" - EventTypeExecute = "execute" - EventTypeMigrate = "migrate" - EventTypePinCode = "pin_code" - EventTypeUnpinCode = "unpin_code" - EventTypeSudo = "sudo" - EventTypeReply = "reply" - EventTypeUpdateContractAdmin = "update_contract_admin" + EventTypeStoreCode = "store_code" + EventTypeInstantiate = "instantiate" + EventTypeExecute = "execute" + EventTypeMigrate = "migrate" + EventTypePinCode = "pin_code" + EventTypeUnpinCode = "unpin_code" + EventTypeSudo = "sudo" + EventTypeReply = "reply" + EventTypeUpdateContractAdmin = "update_contract_admin" + EventTypeUpgradeProposalPassed = "upgrade_proposal_passed" ) // event attributes returned from contract execution diff --git a/x/compute/internal/types/msg.go b/x/compute/internal/types/msg.go index 7fea4487b..c24ceee40 100644 --- a/x/compute/internal/types/msg.go +++ b/x/compute/internal/types/msg.go @@ -215,3 +215,33 @@ func (msg MsgClearAdmin) GetSigners() []sdk.AccAddress { } return []sdk.AccAddress{senderAddr} } + +func (msg MsgUpgradeProposalPassed) Route() string { + return RouterKey +} + +func (msg MsgUpgradeProposalPassed) Type() string { + return "upgrade-proposal-passed" +} + +func (msg MsgUpgradeProposalPassed) ValidateBasic() error { + if err := sdk.VerifyAddressFormat([]byte(msg.SenderAddress)); err != nil { + return err + } + if len(msg.MrEnclaveHash) != 64 { + return sdkerrors.ErrInvalidRequest.Wrap("MREnclave hash length is not equal 64!") + } + return nil +} + +func (msg MsgUpgradeProposalPassed) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgUpgradeProposalPassed) GetSigners() []sdk.AccAddress { + senderAddr, err := sdk.AccAddressFromBech32(msg.SenderAddress) + if err != nil { // should never happen as valid basic rejects invalid addresses + panic(err.Error()) + } + return []sdk.AccAddress{senderAddr} +} diff --git a/x/compute/internal/types/msg.pb.go b/x/compute/internal/types/msg.pb.go index 51b7769ed..afbf147b1 100644 --- a/x/compute/internal/types/msg.pb.go +++ b/x/compute/internal/types/msg.pb.go @@ -747,6 +747,82 @@ func (m *MsgClearAdminResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgClearAdminResponse proto.InternalMessageInfo +type MsgUpgradeProposalPassed struct { + // Sender is the actor that signed the message + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // SHA256 hash of the new MREnclave + MrEnclaveHash []byte `protobuf:"bytes,2,opt,name=mr_enclave_hash,json=mrEnclaveHash,proto3" json:"mr_enclave_hash,omitempty"` +} + +func (m *MsgUpgradeProposalPassed) Reset() { *m = MsgUpgradeProposalPassed{} } +func (m *MsgUpgradeProposalPassed) String() string { return proto.CompactTextString(m) } +func (*MsgUpgradeProposalPassed) ProtoMessage() {} +func (*MsgUpgradeProposalPassed) Descriptor() ([]byte, []int) { + return fileDescriptor_6815433faf72a133, []int{12} +} +func (m *MsgUpgradeProposalPassed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpgradeProposalPassed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpgradeProposalPassed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpgradeProposalPassed) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpgradeProposalPassed.Merge(m, src) +} +func (m *MsgUpgradeProposalPassed) XXX_Size() int { + return m.Size() +} +func (m *MsgUpgradeProposalPassed) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpgradeProposalPassed.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpgradeProposalPassed proto.InternalMessageInfo + +type MsgUpgradeProposalPassedResponse struct { +} + +func (m *MsgUpgradeProposalPassedResponse) Reset() { *m = MsgUpgradeProposalPassedResponse{} } +func (m *MsgUpgradeProposalPassedResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpgradeProposalPassedResponse) ProtoMessage() {} +func (*MsgUpgradeProposalPassedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6815433faf72a133, []int{13} +} +func (m *MsgUpgradeProposalPassedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpgradeProposalPassedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpgradeProposalPassedResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpgradeProposalPassedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpgradeProposalPassedResponse.Merge(m, src) +} +func (m *MsgUpgradeProposalPassedResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpgradeProposalPassedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpgradeProposalPassedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpgradeProposalPassedResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgStoreCode)(nil), "secret.compute.v1beta1.MsgStoreCode") proto.RegisterType((*MsgStoreCodeResponse)(nil), "secret.compute.v1beta1.MsgStoreCodeResponse") @@ -760,78 +836,85 @@ func init() { proto.RegisterType((*MsgUpdateAdminResponse)(nil), "secret.compute.v1beta1.MsgUpdateAdminResponse") proto.RegisterType((*MsgClearAdmin)(nil), "secret.compute.v1beta1.MsgClearAdmin") proto.RegisterType((*MsgClearAdminResponse)(nil), "secret.compute.v1beta1.MsgClearAdminResponse") + proto.RegisterType((*MsgUpgradeProposalPassed)(nil), "secret.compute.v1beta1.MsgUpgradeProposalPassed") + proto.RegisterType((*MsgUpgradeProposalPassedResponse)(nil), "secret.compute.v1beta1.MsgUpgradeProposalPassedResponse") } func init() { proto.RegisterFile("secret/compute/v1beta1/msg.proto", fileDescriptor_6815433faf72a133) } var fileDescriptor_6815433faf72a133 = []byte{ - // 1049 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x3f, 0x6f, 0xdb, 0xc6, - 0x1b, 0x16, 0xa3, 0x7f, 0xd6, 0x59, 0x71, 0x9c, 0x8b, 0x7f, 0x36, 0xcd, 0x00, 0x92, 0xc1, 0xfc, - 0xdc, 0x1a, 0x42, 0x4c, 0xc6, 0x0e, 0x90, 0x41, 0x1d, 0x0a, 0xcb, 0x6d, 0x50, 0x0f, 0xca, 0x40, - 0xb5, 0x28, 0xd0, 0x85, 0x38, 0x92, 0x57, 0x9a, 0xb0, 0x44, 0xaa, 0xbc, 0x53, 0x1c, 0x0f, 0x05, - 0xd2, 0x4e, 0x45, 0xa6, 0xce, 0x2d, 0x0a, 0x74, 0x2c, 0x32, 0x79, 0xe8, 0xd4, 0x4f, 0x90, 0x31, - 0xed, 0xd4, 0x49, 0x2d, 0xe4, 0xc1, 0xdf, 0xa1, 0x53, 0x71, 0xc7, 0x23, 0x45, 0x33, 0x94, 0xaa, - 0x1a, 0x6d, 0x17, 0x9b, 0xef, 0xbd, 0x0f, 0xdf, 0x3f, 0xcf, 0x3d, 0xf7, 0x1e, 0x05, 0xb6, 0x08, - 0xb6, 0x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f, 0xba, 0xab, 0xac, 0x0a, 0xff, 0x1a, 0x7f, 0xf8, 0x67, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x8b, 0x32, 0xac, 0x4b, 0x46, 0x0c, 0x00, 0x00, + // 1134 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0x8e, 0xbb, 0x9b, 0xdd, 0xec, 0x64, 0xf3, 0xa3, 0x6e, 0x9a, 0x38, 0xae, 0xd8, 0x8d, 0x5c, + 0x52, 0xa2, 0xa8, 0xb1, 0x93, 0x54, 0xaa, 0x20, 0x1c, 0x50, 0x36, 0xb4, 0x22, 0x87, 0xad, 0x2a, + 0x07, 0x84, 0xc4, 0xc5, 0x1a, 0xdb, 0x83, 0x63, 0xc5, 0x6b, 0x2f, 0x9e, 0xd9, 0xa4, 0x39, 0x20, + 0x15, 0xb8, 0xa0, 0x9e, 0x38, 0xc3, 0x05, 0x09, 0x0e, 0xa8, 0xa7, 0x1c, 0x38, 0xf1, 0x17, 0xf4, + 0x58, 0x38, 0x71, 0x5a, 0xd0, 0xe6, 0x90, 0xff, 0x81, 0x13, 0x9a, 0xf1, 0xd8, 0xeb, 0xb8, 0x5e, + 0xb3, 0x8d, 0x80, 0x4b, 0xe2, 0x37, 0xef, 0xf3, 0xfb, 0xf1, 0xcd, 0x37, 0x6f, 0xbc, 0x60, 0x05, + 0x23, 0x2b, 0x44, 0x44, 0xb3, 0x82, 0x4e, 0xb7, 0x47, 0x90, 0x76, 0xbc, 0x65, 0x22, 0x02, 0xb7, + 0xb4, 0x0e, 0x76, 0xd4, 0x6e, 0x18, 0x90, 0x40, 0x5c, 0x8c, 0x10, 0x2a, 0x47, 0xa8, 0x1c, 0x21, + 0x2f, 0x38, 0x81, 0x13, 0x30, 0x88, 0x46, 0x9f, 0x22, 0xb4, 0xbc, 0x6c, 0x05, 0xb8, 0x13, 0x60, + 0x23, 0x72, 0x44, 0x06, 0x77, 0x2d, 0x45, 0x16, 0x0d, 0xad, 0x1d, 0xa7, 0x32, 0xc8, 0x0d, 0xee, + 0x30, 0x21, 0x1e, 0x16, 0x60, 0x05, 0xae, 0xcf, 0xfd, 0xd7, 0x61, 0xc7, 0xf5, 0x03, 0x8d, 0xfd, + 0x8d, 0x96, 0x94, 0x5f, 0x05, 0x50, 0x6f, 0x63, 0xe7, 0x80, 0x04, 0x21, 0xda, 0x0b, 0x6c, 0x24, + 0x6e, 0x82, 0x0a, 0x46, 0xbe, 0x8d, 0x42, 0x49, 0x58, 0x11, 0xd6, 0x6a, 0x2d, 0xe9, 0xb7, 0x9f, + 0x37, 0x16, 0x78, 0xfa, 0x5d, 0xdb, 0x0e, 0x11, 0xc6, 0x07, 0x24, 0x74, 0x7d, 0x47, 0xe7, 0x38, + 0xf1, 0x3e, 0x98, 0x3d, 0x81, 0xb8, 0x63, 0x98, 0xa7, 0x04, 0x19, 0x56, 0x60, 0x23, 0xe9, 0xda, + 0x8a, 0xb0, 0x56, 0x6f, 0xcd, 0x0f, 0xfa, 0xcd, 0xfa, 0xc7, 0xbb, 0x07, 0xed, 0xd6, 0x29, 0x61, + 0xb1, 0xf5, 0x3a, 0xc5, 0xc5, 0x96, 0xb8, 0x08, 0x2a, 0x38, 0xe8, 0x85, 0x16, 0x92, 0x4a, 0x34, + 0x93, 0xce, 0x2d, 0x51, 0x02, 0x55, 0xb3, 0xe7, 0x7a, 0xb4, 0x84, 0x32, 0x73, 0xc4, 0xe6, 0xce, + 0xea, 0xd7, 0xdf, 0x37, 0x27, 0xbe, 0xbc, 0x38, 0x5b, 0xe7, 0xa9, 0x9f, 0x5d, 0x9c, 0xad, 0x5f, + 0xa7, 0x31, 0xb5, 0x74, 0x0b, 0xca, 0xbb, 0x60, 0x21, 0x6d, 0xeb, 0x08, 0x77, 0x03, 0x1f, 0x23, + 0xf1, 0x36, 0xa8, 0xd2, 0xf2, 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0xe7, + 0x8d, 0x89, 0x97, 0xe7, 0x8d, 0x89, 0xdf, 0xcf, 0x1b, 0x13, 0x9f, 0xec, 0xa4, 0x2e, 0x79, 0x6c, + 0x85, 0xc4, 0x83, 0x26, 0xd6, 0x0e, 0x58, 0xb6, 0x47, 0x88, 0x9c, 0x04, 0xe1, 0x91, 0xf6, 0x24, + 0xf9, 0xbd, 0xe5, 0xfa, 0x04, 0x85, 0x3e, 0xf4, 0xa2, 0xcb, 0xdf, 0xac, 0xb0, 0x9f, 0x37, 0xf7, + 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x23, 0x18, 0x88, 0x97, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -858,6 +941,7 @@ type MsgClient interface { UpdateAdmin(ctx context.Context, in *MsgUpdateAdmin, opts ...grpc.CallOption) (*MsgUpdateAdminResponse, error) // ClearAdmin removes any admin stored for a smart contract ClearAdmin(ctx context.Context, in *MsgClearAdmin, opts ...grpc.CallOption) (*MsgClearAdminResponse, error) + UpgradeProposalPassed(ctx context.Context, in *MsgUpgradeProposalPassed, opts ...grpc.CallOption) (*MsgUpgradeProposalPassedResponse, error) } type msgClient struct { @@ -922,6 +1006,15 @@ func (c *msgClient) ClearAdmin(ctx context.Context, in *MsgClearAdmin, opts ...g return out, nil } +func (c *msgClient) UpgradeProposalPassed(ctx context.Context, in *MsgUpgradeProposalPassed, opts ...grpc.CallOption) (*MsgUpgradeProposalPassedResponse, error) { + out := new(MsgUpgradeProposalPassedResponse) + err := c.cc.Invoke(ctx, "/secret.compute.v1beta1.Msg/UpgradeProposalPassed", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // StoreCode to submit Wasm code to the system @@ -936,6 +1029,7 @@ type MsgServer interface { UpdateAdmin(context.Context, *MsgUpdateAdmin) (*MsgUpdateAdminResponse, error) // ClearAdmin removes any admin stored for a smart contract ClearAdmin(context.Context, *MsgClearAdmin) (*MsgClearAdminResponse, error) + UpgradeProposalPassed(context.Context, *MsgUpgradeProposalPassed) (*MsgUpgradeProposalPassedResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -960,6 +1054,9 @@ func (*UnimplementedMsgServer) UpdateAdmin(ctx context.Context, req *MsgUpdateAd func (*UnimplementedMsgServer) ClearAdmin(ctx context.Context, req *MsgClearAdmin) (*MsgClearAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearAdmin not implemented") } +func (*UnimplementedMsgServer) UpgradeProposalPassed(ctx context.Context, req *MsgUpgradeProposalPassed) (*MsgUpgradeProposalPassedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpgradeProposalPassed not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1073,6 +1170,24 @@ func _Msg_ClearAdmin_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Msg_UpgradeProposalPassed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpgradeProposalPassed) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpgradeProposalPassed(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/secret.compute.v1beta1.Msg/UpgradeProposalPassed", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpgradeProposalPassed(ctx, req.(*MsgUpgradeProposalPassed)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "secret.compute.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -1101,6 +1216,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ClearAdmin", Handler: _Msg_ClearAdmin_Handler, }, + { + MethodName: "UpgradeProposalPassed", + Handler: _Msg_UpgradeProposalPassed_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "secret/compute/v1beta1/msg.proto", @@ -1656,6 +1775,66 @@ func (m *MsgClearAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgUpgradeProposalPassed) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpgradeProposalPassed) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpgradeProposalPassed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MrEnclaveHash) > 0 { + i -= len(m.MrEnclaveHash) + copy(dAtA[i:], m.MrEnclaveHash) + i = encodeVarintMsg(dAtA, i, uint64(len(m.MrEnclaveHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintMsg(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpgradeProposalPassedResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpgradeProposalPassedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpgradeProposalPassedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { offset -= sovMsg(v) base := offset @@ -1928,6 +2107,32 @@ func (m *MsgClearAdminResponse) Size() (n int) { return n } +func (m *MsgUpgradeProposalPassed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.MrEnclaveHash) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgUpgradeProposalPassedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovMsg(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3745,6 +3950,172 @@ func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpgradeProposalPassed) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpgradeProposalPassed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpgradeProposalPassed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + 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 ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MrEnclaveHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MrEnclaveHash = append(m.MrEnclaveHash[:0], dAtA[iNdEx:postIndex]...) + if m.MrEnclaveHash == nil { + m.MrEnclaveHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpgradeProposalPassedResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpgradeProposalPassedResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpgradeProposalPassedResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipMsg(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0