diff --git a/proto/ojo/oracle/v1/oracle.proto b/proto/ojo/oracle/v1/oracle.proto index 36b5b4b3..27e2f261 100644 --- a/proto/ojo/oracle/v1/oracle.proto +++ b/proto/ojo/oracle/v1/oracle.proto @@ -135,7 +135,7 @@ message ValidatorRewardSet { message ParamUpdatePlan { option (gogoproto.equal) = true; option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; diff --git a/proto/ojo/oracle/v1/tx.proto b/proto/ojo/oracle/v1/tx.proto index 8069c88f..81377d0b 100644 --- a/proto/ojo/oracle/v1/tx.proto +++ b/proto/ojo/oracle/v1/tx.proto @@ -94,3 +94,14 @@ message MsgGovUpdateParams { // MsgGovUpdateParamsResponse defines the Msg/GovUpdateParams response type. message MsgGovUpdateParamsResponse {} + +// MsgGovCancelUpdateParams defines the Msg/GovCancelUpdateParams request type. +message MsgGovCancelUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgGovCancelUpdateParamsResponse defines the Msg/GovCancelUpdateParamsResponse response type. +message MsgGovCancelUpdateParamsResponse {} diff --git a/x/oracle/abci.go b/x/oracle/abci.go index 0643f904..b90f0329 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -14,9 +14,10 @@ import ( func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) + // Check for Oracle parameter update plans and execute it if one is + // found and the update plan height is set to the current block. plan, found := k.GetParamUpdatePlan(ctx) - - if found { + if found && plan.ShouldExecute(ctx) { err := k.ExecuteParamUpdatePlan(ctx, plan) if err != nil { ctx.Logger().Error("Error executing Oracle param update plan", "plan title", plan.Title, "err", err) diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index 3eaafe64..eba274cc 100644 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -497,6 +497,10 @@ func (s *IntegrationTestSuite) TestEndblockerHistoracle() { } } +func (s *IntegrationTestSuite) TestUpdateOracleParams( + +) + func TestOracleTestSuite(t *testing.T) { suite.Run(t, new(IntegrationTestSuite)) } diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index bc2efac7..c617b8cd 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -363,7 +363,7 @@ func (k Keeper) ScheduleParamUpdatePlan(ctx sdk.Context, plan types.ParamUpdateP store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&plan) - store.Set(types.KeyParamUpdatePlan(uint64(plan.Height)), bz) + store.Set(types.KeyParamUpdatePlan(), bz) return nil } @@ -371,7 +371,7 @@ func (k Keeper) ScheduleParamUpdatePlan(ctx sdk.Context, plan types.ParamUpdateP // func (k Keeper) GetParamUpdatePlan(ctx sdk.Context) (plan types.ParamUpdatePlan, havePlan bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.KeyParamUpdatePlan(uint64(ctx.BlockHeight()))) + bz := store.Get(types.KeyParamUpdatePlan()) if bz == nil { return plan, false } diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go index 25e85482..a99b8504 100644 --- a/x/oracle/types/keys.go +++ b/x/oracle/types/keys.go @@ -88,9 +88,9 @@ func KeyValidatorRewardSet() (key []byte) { return util.ConcatBytes(0, KeyPrefixValidatorRewardSet) } -// KeyParamUpdatePlan - stored by *plan title* -func KeyParamUpdatePlan(blockNum uint64) (key []byte) { - return util.ConcatBytes(0, KeyPrefixValidatorRewardSet, util.UintWithNullPrefix(blockNum)) +// KeyParamUpdatePlan +func KeyParamUpdatePlan() (key []byte) { + return util.ConcatBytes(0, KeyPrefixParamUpdatePlan) } // ParseDenomAndBlockFromKey returns the denom and block contained in the *key* diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 27923d3c..0fbde788 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -334,9 +334,8 @@ type ParamUpdatePlan struct { Changes Params `protobuf:"bytes,5,opt,name=changes,proto3" json:"changes"` } -func (m *ParamUpdatePlan) Reset() { *m = ParamUpdatePlan{} } -func (m *ParamUpdatePlan) String() string { return proto.CompactTextString(m) } -func (*ParamUpdatePlan) ProtoMessage() {} +func (m *ParamUpdatePlan) Reset() { *m = ParamUpdatePlan{} } +func (*ParamUpdatePlan) ProtoMessage() {} func (*ParamUpdatePlan) Descriptor() ([]byte, []int) { return fileDescriptor_e2b9fb194216b28f, []int{7} } @@ -381,7 +380,7 @@ func init() { func init() { proto.RegisterFile("ojo/oracle/v1/oracle.proto", fileDescriptor_e2b9fb194216b28f) } var fileDescriptor_e2b9fb194216b28f = []byte{ - // 1093 bytes of a gzipped FileDescriptorProto + // 1091 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6f, 0x1b, 0x45, 0x14, 0xf7, 0x12, 0x27, 0x8d, 0xc7, 0x76, 0x42, 0x26, 0x4e, 0xd9, 0xa6, 0x95, 0x37, 0x2c, 0xa2, 0x04, 0x50, 0x6c, 0xd2, 0x82, 0x90, 0x22, 0x71, 0xe8, 0x12, 0xe8, 0x85, 0xa2, 0x68, 0x02, 0x45, @@ -445,12 +444,12 @@ var fileDescriptor_e2b9fb194216b28f = []byte{ 0xc6, 0x44, 0x44, 0x9c, 0xf6, 0xf5, 0x3f, 0x45, 0x13, 0x85, 0x8a, 0x2a, 0x08, 0x41, 0xf9, 0x90, 0x9c, 0x9a, 0x5f, 0x74, 0x05, 0xe9, 0x35, 0xbc, 0x09, 0x16, 0x7a, 0x84, 0x76, 0x7b, 0x52, 0xff, 0x3d, 0xe7, 0x90, 0x95, 0xe0, 0x07, 0xe0, 0x86, 0xc9, 0x5b, 0xb8, 0xf3, 0x9a, 0xa6, 0xb5, 0x99, - 0x89, 0x6b, 0xde, 0x29, 0x41, 0x59, 0x15, 0x17, 0x8d, 0x6c, 0xc7, 0xfc, 0x3b, 0x6a, 0x00, 0x05, - 0x0f, 0xcf, 0xff, 0x6e, 0x96, 0xce, 0x2f, 0x9a, 0xce, 0xd3, 0x8b, 0xa6, 0xf3, 0xd7, 0x45, 0xd3, - 0xf9, 0xe1, 0xb2, 0x59, 0x7a, 0x7a, 0xd9, 0x2c, 0xfd, 0x71, 0xd9, 0x2c, 0x7d, 0xfd, 0x76, 0xa1, - 0x1f, 0xd8, 0x01, 0xdb, 0xca, 0x88, 0x3c, 0x66, 0xfc, 0x50, 0xad, 0xdb, 0x27, 0xa3, 0x77, 0x96, - 0x6e, 0x8b, 0xce, 0x82, 0x7e, 0x1f, 0xdd, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xdb, 0x14, - 0x67, 0x82, 0x09, 0x00, 0x00, + 0x89, 0x6b, 0xde, 0x29, 0x41, 0x59, 0x15, 0x17, 0x8d, 0x6c, 0xa7, 0xf8, 0x77, 0x82, 0x87, 0xe7, + 0x7f, 0x37, 0x4b, 0xe7, 0x17, 0x4d, 0xe7, 0xe9, 0x45, 0xd3, 0xf9, 0xeb, 0xa2, 0xe9, 0xfc, 0x70, + 0xd9, 0x2c, 0x3d, 0xbd, 0x6c, 0x96, 0xfe, 0xb8, 0x6c, 0x96, 0xbe, 0x7e, 0xbb, 0xd0, 0x0f, 0xec, + 0x80, 0x6d, 0x65, 0x44, 0x1e, 0x33, 0x7e, 0xa8, 0xd6, 0xed, 0x93, 0xd1, 0x3b, 0x4b, 0xb7, 0x45, + 0x67, 0x41, 0xbf, 0x8f, 0xee, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x92, 0xe9, 0xa0, 0xfd, 0x82, + 0x09, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/oracle/types/plan.go b/x/oracle/types/plan.go new file mode 100644 index 00000000..a14203f8 --- /dev/null +++ b/x/oracle/types/plan.go @@ -0,0 +1,37 @@ +package types + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (p ParamUpdatePlan) String() string { + due := p.DueAt() + return fmt.Sprintf(`Oracle Param Update Plan + Title: %s + %s + Description: %s.`, p.Title, due, p.Description) +} + +// ValidateBasic does basic validation of a ParamUpdatePlan +func (p ParamUpdatePlan) ValidateBasic() error { + if len(p.Title) == 0 { + return ErrInvalidRequest.Wrap("name cannot be empty") + } + if p.Height <= 0 { + return ErrInvalidRequest.Wrap("height must be greater than 0") + } + + return nil +} + +// ShouldExecute returns true if the Plan is ready to execute given the current context +func (p ParamUpdatePlan) ShouldExecute(ctx sdk.Context) bool { + return p.Height == ctx.BlockHeight() +} + +// DueAt is a string representation of when this plan is due to be executed +func (p ParamUpdatePlan) DueAt() string { + return fmt.Sprintf("height: %d", p.Height) +} diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index bd3e70e2..a0b8d869 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -348,6 +348,82 @@ func (m *MsgGovUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgGovUpdateParamsResponse proto.InternalMessageInfo +// MsgGovCancelUpdateParams defines the Msg/GovCancelUpdateParams request type. +type MsgGovCancelUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (m *MsgGovCancelUpdateParams) Reset() { *m = MsgGovCancelUpdateParams{} } +func (m *MsgGovCancelUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgGovCancelUpdateParams) ProtoMessage() {} +func (*MsgGovCancelUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{8} +} +func (m *MsgGovCancelUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovCancelUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovCancelUpdateParams.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 *MsgGovCancelUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCancelUpdateParams.Merge(m, src) +} +func (m *MsgGovCancelUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgGovCancelUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCancelUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovCancelUpdateParams proto.InternalMessageInfo + +// MsgGovCancelUpdateParamsResponse defines the Msg/GovCancelUpdateParamsResponse response type. +type MsgGovCancelUpdateParamsResponse struct { +} + +func (m *MsgGovCancelUpdateParamsResponse) Reset() { *m = MsgGovCancelUpdateParamsResponse{} } +func (m *MsgGovCancelUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovCancelUpdateParamsResponse) ProtoMessage() {} +func (*MsgGovCancelUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_58d45810177a43e8, []int{9} +} +func (m *MsgGovCancelUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovCancelUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovCancelUpdateParamsResponse.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 *MsgGovCancelUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCancelUpdateParamsResponse.Merge(m, src) +} +func (m *MsgGovCancelUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovCancelUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCancelUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovCancelUpdateParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgAggregateExchangeRatePrevote)(nil), "ojo.oracle.v1.MsgAggregateExchangeRatePrevote") proto.RegisterType((*MsgAggregateExchangeRatePrevoteResponse)(nil), "ojo.oracle.v1.MsgAggregateExchangeRatePrevoteResponse") @@ -357,53 +433,57 @@ func init() { proto.RegisterType((*MsgDelegateFeedConsentResponse)(nil), "ojo.oracle.v1.MsgDelegateFeedConsentResponse") proto.RegisterType((*MsgGovUpdateParams)(nil), "ojo.oracle.v1.MsgGovUpdateParams") proto.RegisterType((*MsgGovUpdateParamsResponse)(nil), "ojo.oracle.v1.MsgGovUpdateParamsResponse") + proto.RegisterType((*MsgGovCancelUpdateParams)(nil), "ojo.oracle.v1.MsgGovCancelUpdateParams") + proto.RegisterType((*MsgGovCancelUpdateParamsResponse)(nil), "ojo.oracle.v1.MsgGovCancelUpdateParamsResponse") } func init() { proto.RegisterFile("ojo/oracle/v1/tx.proto", fileDescriptor_58d45810177a43e8) } var fileDescriptor_58d45810177a43e8 = []byte{ - // 647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4f, 0x4f, 0xd4, 0x40, - 0x18, 0xc6, 0x5b, 0x77, 0x43, 0x60, 0x08, 0xa2, 0x05, 0x71, 0x69, 0x48, 0x8b, 0xe3, 0xdf, 0xd5, - 0xd0, 0x06, 0x48, 0x88, 0xe1, 0x24, 0xf8, 0x87, 0xd3, 0x26, 0xa6, 0x46, 0x0f, 0x5e, 0xc8, 0xb0, - 0x1d, 0x67, 0x17, 0xba, 0x9d, 0xcd, 0xcc, 0xb0, 0xc2, 0xc1, 0x8b, 0x31, 0xc6, 0xa3, 0x47, 0x8f, - 0xc4, 0x2f, 0xa0, 0x07, 0x3f, 0x04, 0x47, 0xe2, 0xc9, 0x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 0x65, 0xbf, 0x64, - 0xb1, 0xdd, 0xc4, 0x7c, 0x6d, 0x40, 0xfe, 0x8f, 0xe7, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x72, - 0xa6, 0x2d, 0xb2, 0x1e, 0x06, 0x00, 0x00, + // 673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xc7, 0x77, 0x7f, 0x6d, 0x08, 0x0c, 0x01, 0x7e, 0x2e, 0x88, 0x65, 0x43, 0x76, 0x71, 0xfc, + 0x5b, 0x0d, 0xbb, 0x01, 0x12, 0x62, 0x7a, 0x12, 0x50, 0x39, 0x35, 0x31, 0x6b, 0xf4, 0xe0, 0x85, + 0x0c, 0xdd, 0x71, 0x5a, 0xd8, 0xee, 0x34, 0x33, 0x43, 0x85, 0x83, 0x17, 0x63, 0x8c, 0x47, 0x8f, + 0x1e, 0x89, 0x6f, 0x40, 0x0f, 0xbe, 0x08, 0x8e, 0xc4, 0x93, 0x89, 0x49, 0xa3, 0x70, 0xd0, 0x93, + 0x87, 0xbe, 0x02, 0xb3, 0x33, 0xb3, 0x4b, 0x69, 0xf9, 0xd7, 0xc4, 0x5b, 0xf7, 0xf9, 0x7e, 0xe6, + 0xf9, 0x7e, 0x9f, 0xa7, 0x3b, 0x59, 0x30, 0x49, 0x37, 0xa8, 0x4f, 0x19, 0xaa, 0x44, 0xd8, 0x6f, + 0xce, 0xf9, 0x62, 0xdb, 0x6b, 0x30, 0x2a, 0xa8, 0x35, 0x42, 0x37, 0xa8, 0xa7, 0xea, 0x5e, 0x73, + 0xce, 0xbe, 0x52, 0xa1, 0xbc, 0x4e, 0xb9, 0x5f, 0xe7, 0x24, 0xc1, 0xea, 0x9c, 0x28, 0xce, 0x9e, + 0x52, 0xc2, 0x9a, 0x7c, 0xf2, 0xd5, 0x83, 0x96, 0x26, 0x08, 0x25, 0x54, 0xd5, 0x93, 0x5f, 0xba, + 0x6a, 0x1f, 0x37, 0xd4, 0x16, 0x52, 0x83, 0x9f, 0x4c, 0xe0, 0x96, 0x39, 0x59, 0x22, 0x84, 0x61, + 0x82, 0x04, 0x7e, 0xb8, 0x5d, 0xa9, 0xa2, 0x98, 0xe0, 0x00, 0x09, 0xfc, 0x98, 0xe1, 0x26, 0x15, + 0xd8, 0xba, 0x06, 0xf2, 0x55, 0xc4, 0xab, 0x05, 0x73, 0xc6, 0xbc, 0x3d, 0xb4, 0x3c, 0xd6, 0x6e, + 0xb9, 0xc3, 0x3b, 0xa8, 0x1e, 0x95, 0x60, 0x52, 0x85, 0x81, 0x14, 0xad, 0x22, 0x18, 0x78, 0x81, + 0x71, 0x88, 0x59, 0xe1, 0x3f, 0x89, 0x5d, 0x6a, 0xb7, 0xdc, 0x11, 0x85, 0xa9, 0x3a, 0x0c, 0x34, + 0x60, 0xcd, 0x83, 0xa1, 0x26, 0x8a, 0x6a, 0x21, 0x12, 0x94, 0x15, 0x72, 0x92, 0x9e, 0x68, 0xb7, + 0xdc, 0xff, 0x15, 0x9d, 0x49, 0x30, 0x38, 0xc2, 0x4a, 0x83, 0xef, 0x76, 0x5d, 0xe3, 0xf7, 0xae, + 0x6b, 0xc0, 0x22, 0xb8, 0x75, 0x4e, 0xe0, 0x00, 0xf3, 0x06, 0x8d, 0x39, 0x86, 0x7f, 0x4c, 0x30, + 0x7d, 0x1a, 0xfb, 0x4c, 0x4f, 0xc6, 0x51, 0x24, 0x7a, 0x27, 0x4b, 0xaa, 0x30, 0x90, 0xa2, 0x75, + 0x1f, 0x8c, 0x62, 0x7d, 0x70, 0x8d, 0x21, 0x81, 0xb9, 0x9e, 0x70, 0xaa, 0xdd, 0x72, 0x2f, 0x2b, + 0xfc, 0xb8, 0x0e, 0x83, 0x11, 0xdc, 0xe1, 0xc4, 0x3b, 0x76, 0x93, 0xeb, 0x6b, 0x37, 0xf9, 0x7e, + 0x77, 0x73, 0x13, 0x5c, 0x3f, 0x6b, 0xde, 0x6c, 0x31, 0x6f, 0x4c, 0x30, 0x59, 0xe6, 0xe4, 0x01, + 0x8e, 0x24, 0xf7, 0x08, 0xe3, 0x70, 0x25, 0x11, 0x62, 0x61, 0xf9, 0x60, 0x90, 0x36, 0x30, 0x93, + 0xfe, 0x6a, 0x2d, 0xe3, 0xed, 0x96, 0x3b, 0xa6, 0xfc, 0x53, 0x05, 0x06, 0x19, 0x94, 0x1c, 0x08, + 0x75, 0x1f, 0xbd, 0x98, 0x8e, 0x03, 0xa9, 0x02, 0x83, 0x0c, 0xea, 0x88, 0x3b, 0x03, 0x9c, 0x93, + 0x53, 0x64, 0x41, 0x3f, 0x9a, 0xc0, 0x2a, 0x73, 0xb2, 0x4a, 0x9b, 0x4f, 0x1b, 0x61, 0xf2, 0x0f, + 0x23, 0x86, 0xea, 0xdc, 0x5a, 0x04, 0x43, 0x68, 0x4b, 0x54, 0x29, 0xab, 0x89, 0x1d, 0x9d, 0xb2, + 0xf0, 0xf5, 0xcb, 0xec, 0x84, 0xbe, 0x0c, 0x4b, 0x61, 0xc8, 0x30, 0xe7, 0x4f, 0x04, 0xab, 0xc5, + 0x24, 0x38, 0x42, 0xad, 0x7b, 0x20, 0xdf, 0x88, 0x50, 0x2c, 0x73, 0x0e, 0xcf, 0x3b, 0xde, 0xb1, + 0x1b, 0xe7, 0xc9, 0xe6, 0xda, 0x27, 0x42, 0xf1, 0x72, 0x7e, 0xaf, 0xe5, 0x1a, 0x81, 0x3c, 0x51, + 0xb2, 0x93, 0xd0, 0x1f, 0x54, 0x70, 0xf3, 0xf5, 0xaf, 0xcf, 0x77, 0x8e, 0xba, 0xc2, 0x69, 0x60, + 0xf7, 0x66, 0xcc, 0x46, 0x58, 0x07, 0x05, 0xa5, 0xae, 0xa0, 0xb8, 0x82, 0xa3, 0x7f, 0x31, 0x47, + 0x69, 0xb4, 0x2b, 0x01, 0x04, 0x33, 0xa7, 0x79, 0xa4, 0x39, 0xe6, 0xbf, 0xe7, 0x40, 0xae, 0xcc, + 0x89, 0xf5, 0xd6, 0x04, 0xd3, 0x67, 0x5e, 0x77, 0xaf, 0x6b, 0x2d, 0xe7, 0xdc, 0x36, 0x7b, 0xb1, + 0x3f, 0x3e, 0x0d, 0x64, 0xbd, 0x02, 0x53, 0xa7, 0xdf, 0xcc, 0xbb, 0x17, 0x6c, 0x9a, 0xc0, 0xf6, + 0x42, 0x1f, 0x70, 0x66, 0xbf, 0x09, 0xc6, 0x4f, 0x7a, 0xff, 0x6f, 0xf4, 0xf6, 0x3a, 0x01, 0xb3, + 0x67, 0x2f, 0x84, 0x65, 0x66, 0x6b, 0x60, 0xac, 0xfb, 0x1d, 0xbe, 0xda, 0xdb, 0xa1, 0x0b, 0xb1, + 0x8b, 0xe7, 0x22, 0xa9, 0xc1, 0xf2, 0xea, 0xde, 0x4f, 0xc7, 0xd8, 0x3b, 0x70, 0xcc, 0xfd, 0x03, + 0xc7, 0xfc, 0x71, 0xe0, 0x98, 0xef, 0x0f, 0x1d, 0x63, 0xff, 0xd0, 0x31, 0xbe, 0x1d, 0x3a, 0xc6, + 0xf3, 0x22, 0xa9, 0x89, 0xea, 0xd6, 0xba, 0x57, 0xa1, 0x75, 0x9f, 0x6e, 0xd0, 0xd9, 0x18, 0x8b, + 0x97, 0x94, 0x6d, 0x26, 0xbf, 0xfd, 0xed, 0xf4, 0xd3, 0x20, 0x76, 0x1a, 0x98, 0xaf, 0x0f, 0xc8, + 0xef, 0xc2, 0xc2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xab, 0x61, 0xd3, 0xa6, 0x06, 0x00, + 0x00, } func (this *MsgGovUpdateParams) Equal(that interface{}) bool { @@ -898,6 +978,59 @@ func (m *MsgGovUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgGovCancelUpdateParams) 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 *MsgGovCancelUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovCancelUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovCancelUpdateParamsResponse) 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 *MsgGovCancelUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovCancelUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1023,6 +1156,28 @@ func (m *MsgGovUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgGovCancelUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgGovCancelUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1782,6 +1937,138 @@ func (m *MsgGovUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgGovCancelUpdateParams) 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 ErrIntOverflowTx + } + 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: MsgGovCancelUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovCancelUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGovCancelUpdateParamsResponse) 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 ErrIntOverflowTx + } + 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: MsgGovCancelUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovCancelUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0