From 767b8fdb490c37deee43ac023688410bbb98ccb0 Mon Sep 17 00:00:00 2001 From: Daniel T <30197399+danwt@users.noreply.github.com> Date: Fri, 3 May 2024 06:30:59 +0100 Subject: [PATCH] fix(settlement): remove state index from proto (#777) Co-authored-by: github-actions --- proto/types/dymint/state.proto | 2 +- types/pb/dymint/state.pb.go | 117 +++++++++++---------------------- 2 files changed, 41 insertions(+), 78 deletions(-) diff --git a/proto/types/dymint/state.proto b/proto/types/dymint/state.proto index f5ff6d6cd..b75f8187c 100755 --- a/proto/types/dymint/state.proto +++ b/proto/types/dymint/state.proto @@ -22,7 +22,7 @@ message State { tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; google.protobuf.Timestamp last_block_time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - uint64 sl_state_index = 7 [(gogoproto.customname) = "SLStateIndex"]; + reserved 7; tendermint.types.ValidatorSet next_validators = 8; tendermint.types.ValidatorSet validators = 9; diff --git a/types/pb/dymint/state.pb.go b/types/pb/dymint/state.pb.go index 4cb1db495..a5dbdefee 100644 --- a/types/pb/dymint/state.pb.go +++ b/types/pb/dymint/state.pb.go @@ -37,7 +37,6 @@ type State struct { LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` LastBlockID types.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` LastBlockTime time.Time `protobuf:"bytes,6,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"` - SLStateIndex uint64 `protobuf:"varint,7,opt,name=sl_state_index,json=slStateIndex,proto3" json:"sl_state_index,omitempty"` NextValidators *types.ValidatorSet `protobuf:"bytes,8,opt,name=next_validators,json=nextValidators,proto3" json:"next_validators,omitempty"` Validators *types.ValidatorSet `protobuf:"bytes,9,opt,name=validators,proto3" json:"validators,omitempty"` LastValidators *types.ValidatorSet `protobuf:"bytes,10,opt,name=last_validators,json=lastValidators,proto3" json:"last_validators,omitempty"` @@ -125,13 +124,6 @@ func (m *State) GetLastBlockTime() time.Time { return time.Time{} } -func (m *State) GetSLStateIndex() uint64 { - if m != nil { - return m.SLStateIndex - } - return 0 -} - func (m *State) GetNextValidators() *types.ValidatorSet { if m != nil { return m.NextValidators @@ -209,48 +201,46 @@ func init() { func init() { proto.RegisterFile("types/dymint/state.proto", fileDescriptor_4b679420add07272) } var fileDescriptor_4b679420add07272 = []byte{ - // 643 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6b, 0xdb, 0x30, - 0x1c, 0xc6, 0xe3, 0xf5, 0x25, 0xad, 0xf2, 0xd6, 0xaa, 0x3b, 0xb8, 0x1d, 0xd8, 0x69, 0xf7, 0x42, - 0xd8, 0xc1, 0x81, 0x15, 0x76, 0xdc, 0xc0, 0x2d, 0xac, 0x81, 0x32, 0x86, 0x32, 0x7a, 0xd8, 0xc5, - 0xc8, 0xb6, 0x66, 0x8b, 0x39, 0x96, 0xb1, 0x94, 0xd2, 0xee, 0x53, 0xf4, 0x63, 0xf5, 0xd8, 0xe3, - 0x4e, 0xd9, 0x70, 0x2f, 0xfb, 0x18, 0x43, 0x92, 0xed, 0x78, 0x0d, 0x85, 0xde, 0xac, 0x47, 0xbf, - 0xff, 0xe3, 0x47, 0xfa, 0x4b, 0x02, 0xa6, 0xb8, 0xce, 0x08, 0x1f, 0x87, 0xd7, 0x33, 0x9a, 0x8a, - 0x31, 0x17, 0x58, 0x10, 0x27, 0xcb, 0x99, 0x60, 0x70, 0x53, 0x6b, 0x07, 0xcf, 0x23, 0x16, 0x31, - 0x25, 0x8d, 0xe5, 0x97, 0x9e, 0x3d, 0xb0, 0x23, 0xc6, 0xa2, 0x84, 0x8c, 0xd5, 0xc8, 0x9f, 0x7f, - 0x1f, 0x0b, 0x3a, 0x23, 0x5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0x3d, 0xf0, 0xaf, 0x32, 0x56, 0x07, 0x38, 0x27, 0x7c, 0x9e, 0x08, 0xee, 0xc5, 0x98, 0xc7, - 0x66, 0x7f, 0x68, 0x8c, 0xba, 0xfa, 0x00, 0x23, 0xad, 0x9f, 0x61, 0x1e, 0xcb, 0xeb, 0x82, 0xb3, - 0x4c, 0x23, 0x03, 0x85, 0xb4, 0x71, 0x96, 0xa9, 0xa9, 0x8f, 0xa5, 0x0d, 0x17, 0x2c, 0x27, 0xd5, - 0x3d, 0xd8, 0x51, 0x87, 0x67, 0xaf, 0x58, 0xd8, 0x03, 0x79, 0x80, 0xa7, 0x72, 0x4e, 0x87, 0xd1, - 0xde, 0x0d, 0x01, 0xda, 0xa0, 0xe3, 0x63, 0x5e, 0x97, 0xee, 0xca, 0x52, 0x04, 0xa4, 0xa4, 0x01, - 0xf7, 0xec, 0xb6, 0xb0, 0x8c, 0xbb, 0xc2, 0x32, 0xfe, 0x14, 0x96, 0x71, 0x73, 0x6f, 0xb5, 0xee, - 0xee, 0xad, 0xd6, 0xaf, 0x7b, 0xab, 0xf5, 0xcd, 0x89, 0xa8, 0x88, 0xe7, 0xbe, 0x13, 0xb0, 0x99, - 0x7c, 0x1a, 0x49, 0x2a, 0xef, 0xf6, 0xd5, 0xf5, 0xcf, 0xea, 0x9d, 0x2c, 0xdf, 0x16, 0xbf, 0x1c, - 0xfb, 0x9b, 0xea, 0x4a, 0x1c, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x08, 0x6d, 0x58, 0xb4, 0x4e, - 0x05, 0x00, 0x00, + // 617 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcd, 0x6e, 0x9b, 0x40, + 0x14, 0x85, 0x4d, 0xe3, 0xc4, 0xce, 0x38, 0x0e, 0x09, 0xe9, 0x82, 0xa4, 0x12, 0x90, 0xf4, 0x47, + 0x56, 0x17, 0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0xc2, 0x2f, 0x3a, 0x94, 0xf1, 0x7f, 0xea, 0xed, 0xec, 0x67, 0x75, + 0xeb, 0x95, 0x37, 0x45, 0x50, 0x3e, 0x07, 0x3b, 0x62, 0xc1, 0xcf, 0xff, 0x05, 0x00, 0x00, 0xff, + 0xff, 0xaf, 0x47, 0xf8, 0xdf, 0x1c, 0x05, 0x00, 0x00, } func (m *State) Marshal() (dAtA []byte, err error) { @@ -357,11 +347,6 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - if m.SLStateIndex != 0 { - i = encodeVarintState(dAtA, i, uint64(m.SLStateIndex)) - i-- - dAtA[i] = 0x38 - } n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) if err5 != nil { return 0, err5 @@ -447,9 +432,6 @@ func (m *State) Size() (n int) { n += 1 + l + sovState(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime) n += 1 + l + sovState(uint64(l)) - if m.SLStateIndex != 0 { - n += 1 + sovState(uint64(m.SLStateIndex)) - } if m.NextValidators != nil { l = m.NextValidators.Size() n += 1 + l + sovState(uint64(l)) @@ -694,25 +676,6 @@ func (m *State) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SLStateIndex", wireType) - } - m.SLStateIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SLStateIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NextValidators", wireType)