From 63fcc98141f0cbf949f9e3cfaa3090e6213d9d52 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 11 Jul 2023 12:01:56 +0200 Subject: [PATCH 1/2] fix: rename ugov EventMinTxFees to EventMinGasPrice --- proto/umee/ugov/v1/events.proto | 6 +- swagger/swagger.yaml | 43 +++++++++++++++ x/ugov/events.pb.go | 97 +++++++++++++++++---------------- x/ugov/keeper/msg_server.go | 4 +- x/ugov/tx.pb.go | 4 +- 5 files changed, 99 insertions(+), 55 deletions(-) diff --git a/proto/umee/ugov/v1/events.proto b/proto/umee/ugov/v1/events.proto index 8a96495005..1e06c5e763 100644 --- a/proto/umee/ugov/v1/events.proto +++ b/proto/umee/ugov/v1/events.proto @@ -7,7 +7,7 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/umee-network/umee/v5/x/ugov"; option (gogoproto.goproto_getters_all) = false; -// EventMinTxFees is emitted when MsgGovUpdateMinFees is correctly executed. -message EventMinTxFees { - repeated cosmos.base.v1beta1.DecCoin min_tx_fees = 1 [(gogoproto.nullable) = false]; +// EventMinGasPrice is emitted when MsgGovUpdateMinGasPrice is correctly executed. +message EventMinGasPrice { + repeated cosmos.base.v1beta1.DecCoin min_gas_prices = 1 [(gogoproto.nullable) = false]; } diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 9bdd626eeb..3375474216 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -2251,6 +2251,43 @@ paths: format: byte tags: - Query + /umee/ugov/v1/emergency-group: + get: + summary: EmergencyGroup returns emergency group address + operationId: EmergencyGroup + responses: + '200': + description: A successful response. + schema: + type: object + properties: + emergency_group: + type: string + description: QueryEmergencyGroupResponse response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query /umee/ugov/v1/min-gas-price: get: summary: MinGasPrice returns minimum transaction fees. @@ -5248,6 +5285,12 @@ definitions: description: |- QueryParamsResponse defines the response structure for the Params gRPC service handler. + umee.ugov.v1.QueryEmergencyGroupResponse: + type: object + properties: + emergency_group: + type: string + description: QueryEmergencyGroupResponse response type. umee.ugov.v1.QueryMinGasPriceResponse: type: object properties: diff --git a/x/ugov/events.pb.go b/x/ugov/events.pb.go index 26d90ee6ae..7ae4147dca 100644 --- a/x/ugov/events.pb.go +++ b/x/ugov/events.pb.go @@ -24,23 +24,23 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// EventMinTxFees is emitted when MsgGovUpdateMinFees is correctly executed. -type EventMinTxFees struct { - MinTxFees []types.DecCoin `protobuf:"bytes,1,rep,name=min_tx_fees,json=minTxFees,proto3" json:"min_tx_fees"` +// EventMinGasPrice is emitted when MsgGovUpdateMinGasPrice is correctly executed. +type EventMinGasPrice struct { + MinGasPrices []types.DecCoin `protobuf:"bytes,1,rep,name=min_gas_prices,json=minGasPrices,proto3" json:"min_gas_prices"` } -func (m *EventMinTxFees) Reset() { *m = EventMinTxFees{} } -func (m *EventMinTxFees) String() string { return proto.CompactTextString(m) } -func (*EventMinTxFees) ProtoMessage() {} -func (*EventMinTxFees) Descriptor() ([]byte, []int) { +func (m *EventMinGasPrice) Reset() { *m = EventMinGasPrice{} } +func (m *EventMinGasPrice) String() string { return proto.CompactTextString(m) } +func (*EventMinGasPrice) ProtoMessage() {} +func (*EventMinGasPrice) Descriptor() ([]byte, []int) { return fileDescriptor_0885cdf0808da4ea, []int{0} } -func (m *EventMinTxFees) XXX_Unmarshal(b []byte) error { +func (m *EventMinGasPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventMinTxFees) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventMinGasPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventMinTxFees.Marshal(b, m, deterministic) + return xxx_messageInfo_EventMinGasPrice.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -50,44 +50,45 @@ func (m *EventMinTxFees) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *EventMinTxFees) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMinTxFees.Merge(m, src) +func (m *EventMinGasPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventMinGasPrice.Merge(m, src) } -func (m *EventMinTxFees) XXX_Size() int { +func (m *EventMinGasPrice) XXX_Size() int { return m.Size() } -func (m *EventMinTxFees) XXX_DiscardUnknown() { - xxx_messageInfo_EventMinTxFees.DiscardUnknown(m) +func (m *EventMinGasPrice) XXX_DiscardUnknown() { + xxx_messageInfo_EventMinGasPrice.DiscardUnknown(m) } -var xxx_messageInfo_EventMinTxFees proto.InternalMessageInfo +var xxx_messageInfo_EventMinGasPrice proto.InternalMessageInfo func init() { - proto.RegisterType((*EventMinTxFees)(nil), "umee.ugov.v1.EventMinTxFees") + proto.RegisterType((*EventMinGasPrice)(nil), "umee.ugov.v1.EventMinGasPrice") } func init() { proto.RegisterFile("umee/ugov/v1/events.proto", fileDescriptor_0885cdf0808da4ea) } var fileDescriptor_0885cdf0808da4ea = []byte{ - // 236 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8f, 0xb1, 0x4a, 0xc4, 0x40, - 0x10, 0x40, 0x37, 0x28, 0x82, 0x39, 0xb1, 0x38, 0x2c, 0xf4, 0x90, 0x51, 0x2c, 0xc4, 0xc6, 0x19, - 0xa2, 0xf8, 0x03, 0xf1, 0xb4, 0xb3, 0x91, 0xab, 0x6c, 0x8e, 0x4b, 0x18, 0xe3, 0x22, 0xbb, 0x23, - 0xb7, 0x9b, 0x35, 0x9f, 0xe1, 0x67, 0xa5, 0xbc, 0xd2, 0x4a, 0x34, 0xf9, 0x11, 0xd9, 0x44, 0xbb, - 0x19, 0xde, 0xf0, 0x98, 0x97, 0x1e, 0xd5, 0x86, 0x99, 0xea, 0x4a, 0x02, 0x85, 0x8c, 0x38, 0xb0, - 0xf5, 0x0e, 0xdf, 0xd6, 0xe2, 0x65, 0xba, 0x17, 0x11, 0x46, 0x84, 0x21, 0x9b, 0x1d, 0x54, 0x52, - 0xc9, 0x00, 0x28, 0x4e, 0xe3, 0xcd, 0x0c, 0x4a, 0x71, 0x46, 0x1c, 0x15, 0x2b, 0xc7, 0x14, 0xb2, - 0x82, 0xfd, 0x2a, 0xa3, 0x52, 0xb4, 0x1d, 0xf9, 0xd9, 0x22, 0xdd, 0xbf, 0x8b, 0xce, 0x07, 0x6d, - 0x17, 0xcd, 0x3d, 0xb3, 0x9b, 0xe6, 0xe9, 0xc4, 0x68, 0xbb, 0xf4, 0xcd, 0xf2, 0x99, 0xd9, 0x1d, - 0x26, 0xa7, 0x5b, 0x17, 0x93, 0xab, 0x63, 0x1c, 0x3d, 0x18, 0x3d, 0xf8, 0xe7, 0xc1, 0x39, 0x97, - 0xb7, 0xa2, 0x6d, 0xbe, 0xdd, 0x7e, 0x9d, 0xa8, 0xc7, 0x5d, 0xf3, 0xef, 0xc8, 0xe7, 0xed, 0x0f, - 0xa8, 0xb6, 0x83, 0x64, 0xd3, 0x41, 0xf2, 0xdd, 0x41, 0xf2, 0xd1, 0x83, 0xda, 0xf4, 0xa0, 0x3e, - 0x7b, 0x50, 0x4f, 0xe7, 0x95, 0xf6, 0x2f, 0x75, 0x81, 0xa5, 0x18, 0x8a, 0x09, 0x97, 0x96, 0xfd, - 0xbb, 0xac, 0x5f, 0x87, 0x85, 0xc2, 0x0d, 0x35, 0x43, 0x6f, 0xb1, 0x33, 0xbc, 0x78, 0xfd, 0x1b, - 0x00, 0x00, 0xff, 0xff, 0x49, 0x9a, 0xdb, 0x28, 0x03, 0x01, 0x00, 0x00, + // 242 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0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3b, 0x99, 0x7d, 0x77, 0x32, 0xfb, 0xe8, + 0xa5, 0x58, 0xf7, 0x52, 0x7c, 0xf6, 0x52, 0x3c, 0x9d, 0x1a, 0x1b, 0x5e, 0x9a, 0x4a, 0x69, 0x72, + 0x90, 0xaa, 0x9c, 0x7b, 0x0c, 0x6f, 0x54, 0xbf, 0x0e, 0x0b, 0xc4, 0x2b, 0x78, 0x1f, 0x7a, 0x57, + 0x5b, 0x43, 0xd4, 0xcb, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xb3, 0x73, 0x97, 0x0b, 0x01, + 0x00, 0x00, } -func (m *EventMinTxFees) Marshal() (dAtA []byte, err error) { +func (m *EventMinGasPrice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -97,20 +98,20 @@ func (m *EventMinTxFees) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventMinTxFees) MarshalTo(dAtA []byte) (int, error) { +func (m *EventMinGasPrice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventMinTxFees) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventMinGasPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.MinTxFees) > 0 { - for iNdEx := len(m.MinTxFees) - 1; iNdEx >= 0; iNdEx-- { + if len(m.MinGasPrices) > 0 { + for iNdEx := len(m.MinGasPrices) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.MinTxFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.MinGasPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -135,14 +136,14 @@ func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *EventMinTxFees) Size() (n int) { +func (m *EventMinGasPrice) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.MinTxFees) > 0 { - for _, e := range m.MinTxFees { + if len(m.MinGasPrices) > 0 { + for _, e := range m.MinGasPrices { l = e.Size() n += 1 + l + sovEvents(uint64(l)) } @@ -156,7 +157,7 @@ func sovEvents(x uint64) (n int) { func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *EventMinTxFees) Unmarshal(dAtA []byte) error { +func (m *EventMinGasPrice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -179,15 +180,15 @@ func (m *EventMinTxFees) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventMinTxFees: wiretype end group for non-group") + return fmt.Errorf("proto: EventMinGasPrice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventMinTxFees: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventMinGasPrice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinTxFees", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MinGasPrices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -214,8 +215,8 @@ func (m *EventMinTxFees) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MinTxFees = append(m.MinTxFees, types.DecCoin{}) - if err := m.MinTxFees[len(m.MinTxFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.MinGasPrices = append(m.MinGasPrices, types.DecCoin{}) + if err := m.MinGasPrices[len(m.MinGasPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/ugov/keeper/msg_server.go b/x/ugov/keeper/msg_server.go index 76d05b83b4..0dbb7cade1 100644 --- a/x/ugov/keeper/msg_server.go +++ b/x/ugov/keeper/msg_server.go @@ -29,8 +29,8 @@ func (m msgServer) GovUpdateMinGasPrice(ctx context.Context, msg *ugov.MsgGovUpd if err := k.SetMinGasPrice(msg.MinGasPrice); err != nil { return nil, err } - sdkutil.Emit(&sdkCtx, &ugov.EventMinTxFees{ - MinTxFees: sdk.NewDecCoins(msg.MinGasPrice), + sdkutil.Emit(&sdkCtx, &ugov.EventMinGasPrice{ + MinGasPrices: sdk.NewDecCoins(msg.MinGasPrice), }) return &ugov.MsgGovUpdateMinGasPriceResponse{}, nil diff --git a/x/ugov/tx.pb.go b/x/ugov/tx.pb.go index 192e2b37cb..88de6e818b 100644 --- a/x/ugov/tx.pb.go +++ b/x/ugov/tx.pb.go @@ -239,7 +239,7 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // GovUpdateMinGasPrice sets protocol controlled tx min fees. GovUpdateMinGasPrice(ctx context.Context, in *MsgGovUpdateMinGasPrice, opts ...grpc.CallOption) (*MsgGovUpdateMinGasPriceResponse, error) - // GovSetEmergencyGroup sets protocol controlled tx min fees. + // GovSetEmergencyGroup sets emergency group address. GovSetEmergencyGroup(ctx context.Context, in *MsgGovSetEmergencyGroup, opts ...grpc.CallOption) (*MsgGovSetEmergencyGroupResponse, error) } @@ -273,7 +273,7 @@ func (c *msgClient) GovSetEmergencyGroup(ctx context.Context, in *MsgGovSetEmerg type MsgServer interface { // GovUpdateMinGasPrice sets protocol controlled tx min fees. GovUpdateMinGasPrice(context.Context, *MsgGovUpdateMinGasPrice) (*MsgGovUpdateMinGasPriceResponse, error) - // GovSetEmergencyGroup sets protocol controlled tx min fees. + // GovSetEmergencyGroup sets emergency group address. GovSetEmergencyGroup(context.Context, *MsgGovSetEmergencyGroup) (*MsgGovSetEmergencyGroupResponse, error) } From 8137cb1b02bb306619e67f116806bad682f37846 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 11 Jul 2023 12:03:15 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2479aecc1d..c49e6d648d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ - [2134](https://github.com/umee-network/umee/pull/2134) Bump CometBFT to 34.29. +### API Breaking + +- [2140](https://github.com/umee-network/umee/pull/2140) + ## [v5.1.0](https://github.com/umee-network/umee/releases/tag/v5.1.0) - 2023-07-07 ### Bug Fixes