From 796e5e3f850e72a629a065fc897eccd82942a33e Mon Sep 17 00:00:00 2001 From: Alexander Cristurean Date: Tue, 24 Sep 2024 14:19:57 +0300 Subject: [PATCH 1/4] switched type and operations to enums. --- data/stateChange/stateChange.pb.go | 196 ++++++++++++++++++----------- data/stateChange/stateChange.proto | 14 ++- 2 files changed, 138 insertions(+), 72 deletions(-) diff --git a/data/stateChange/stateChange.pb.go b/data/stateChange/stateChange.pb.go index a32608d2..e527b66e 100644 --- a/data/stateChange/stateChange.pb.go +++ b/data/stateChange/stateChange.pb.go @@ -12,6 +12,7 @@ import ( math "math" math_bits "math/bits" reflect "reflect" + strconv "strconv" strings "strings" ) @@ -26,6 +27,54 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type Type int32 + +const ( + Read Type = 0 + Write Type = 1 +) + +var Type_name = map[int32]string{ + 0: "Read", + 1: "Write", +} + +var Type_value = map[string]int32{ + "Read": 0, + "Write": 1, +} + +func (Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8e577663eebb0888, []int{0} +} + +type Operation int32 + +const ( + GetCode Operation = 0 + SaveAccount Operation = 1 + WriteCode Operation = 2 + RemoveDataTrie Operation = 3 +) + +var Operation_name = map[int32]string{ + 0: "GetCode", + 1: "SaveAccount", + 2: "WriteCode", + 3: "RemoveDataTrie", +} + +var Operation_value = map[string]int32{ + "GetCode": 0, + "SaveAccount": 1, + "WriteCode": 2, + "RemoveDataTrie": 3, +} + +func (Operation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_8e577663eebb0888, []int{1} +} + type StateChanges struct { StateChanges []*StateChange `protobuf:"bytes,1,rep,name=StateChanges,proto3" json:"stateChanges"` } @@ -66,7 +115,7 @@ func (m *StateChanges) GetStateChanges() []*StateChange { } type StateChange struct { - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"type"` + Type Type `protobuf:"varint,1,opt,name=Type,proto3,enum=proto.Type" json:"type"` Index int32 `protobuf:"varint,2,opt,name=Index,proto3" json:"index"` TxHash []byte `protobuf:"bytes,3,opt,name=TxHash,proto3" json:"txHash"` MainTrieKey []byte `protobuf:"bytes,4,opt,name=MainTrieKey,proto3" json:"mainTrieKey"` @@ -103,11 +152,11 @@ func (m *StateChange) XXX_DiscardUnknown() { var xxx_messageInfo_StateChange proto.InternalMessageInfo -func (m *StateChange) GetType() string { +func (m *StateChange) GetType() Type { if m != nil { return m.Type } - return "" + return Read } func (m *StateChange) GetIndex() int32 { @@ -319,6 +368,8 @@ func (m *DataAnalysisStateChange) GetCodeMetadata() bool { } func init() { + proto.RegisterEnum("proto.Type", Type_name, Type_value) + proto.RegisterEnum("proto.Operation", Operation_name, Operation_value) proto.RegisterType((*StateChanges)(nil), "proto.StateChanges") proto.RegisterType((*StateChange)(nil), "proto.StateChange") proto.RegisterType((*DataTrieChange)(nil), "proto.DataTrieChange") @@ -328,51 +379,70 @@ func init() { func init() { proto.RegisterFile("stateChange.proto", fileDescriptor_8e577663eebb0888) } var fileDescriptor_8e577663eebb0888 = []byte{ - // 664 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x6e, 0xd3, 0x4c, - 0x14, 0xc5, 0xe3, 0x24, 0xce, 0x9f, 0x49, 0xbe, 0xe6, 0x63, 0x2a, 0xa8, 0x5b, 0xc1, 0x38, 0xca, - 0x02, 0x45, 0xa2, 0x69, 0x04, 0x2c, 0xbb, 0xaa, 0x5b, 0xa4, 0x22, 0xd4, 0x56, 0x1a, 0x4a, 0x85, - 0x58, 0x20, 0x4d, 0xe2, 0x21, 0xb1, 0xb0, 0x3d, 0x91, 0xed, 0xb4, 0xc9, 0x02, 0x89, 0x47, 0xe0, - 0x31, 0x78, 0x02, 0x9e, 0x81, 0x65, 0x97, 0x5d, 0x59, 0xc4, 0xd9, 0x20, 0xaf, 0xfa, 0x08, 0x68, - 0xc6, 0x71, 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xc7, 0xc4, 0x72, 0x7b, 0x43, 0xe6, 0xd1, 0xde, 0x88, 0xf5, 0x79, 0x9b, 0xbe, - 0xb4, 0x55, 0xfb, 0xd2, 0xf3, 0xa0, 0x22, 0xb6, 0xf0, 0xe5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x5b, 0x6a, 0xb7, 0x74, 0x2f, 0x05, 0x00, 0x00, + // 744 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xc1, 0x6e, 0xe3, 0x44, + 0x18, 0xf6, 0x24, 0x71, 0x12, 0x4f, 0xb2, 0x49, 0x98, 0x15, 0xac, 0x77, 0x01, 0x3b, 0xca, 0x01, + 0x85, 0x65, 0xd3, 0x88, 0xe5, 0xb8, 0xa7, 0xba, 0x45, 0x14, 0x41, 0x5b, 0x69, 0x5a, 0x0a, 0xe2, + 0x80, 0x34, 0xb1, 0x87, 0xc4, 0x22, 0xf6, 0x44, 0xf6, 0x24, 0x4d, 0x0e, 0x48, 0x3c, 0x02, 0x8f, + 0xc1, 0x13, 0xf0, 0x0c, 0x1c, 0x7b, 0xec, 0xc9, 0xa2, 0xee, 0x05, 0xf9, 0xd4, 0x47, 0x40, 0x33, + 0x8e, 0x93, 0x71, 0x8b, 0xc4, 0x29, 0x9e, 0xef, 0xff, 0xbe, 0xff, 0xff, 0xe7, 0x9b, 0x4f, 0x81, + 0xef, 0xc5, 0x9c, 0x70, 0x7a, 0x34, 0x23, 0xe1, 0x94, 0x1e, 0x2c, 0x22, 0xc6, 0x19, 0xd2, 0xe5, + 0xcf, 0xab, 0xd1, 0xd4, 0xe7, 0xb3, 0xe5, 0xe4, 0xc0, 0x65, 0xc1, 0x78, 0xca, 0xa6, 0x6c, 0x2c, + 0xe1, 0xc9, 0xf2, 0x67, 0x79, 0x92, 0x07, 0xf9, 0x95, 0xab, 0x06, 0x3f, 0xc0, 0xf6, 0xc5,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0xbb, 0xbd, + 0xb7, 0xb4, 0x1f, 0x8f, 0x94, 0xff, 0xcf, 0x60, 0x39, 0xe7, 0xfe, 0x8a, 0x46, 0xf1, 0x7a, 0x1c, + 0xac, 0x47, 0xee, 0x8c, 0xf8, 0xe1, 0xc8, 0x65, 0x11, 0x1d, 0x4d, 0xd9, 0x58, 0xdc, 0x68, 0xac, + 0x04, 0xf8, 0x9d, 0xf2, 0x3d, 0xa9, 0xcb, 0xc0, 0x7f, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xa0, 0xc2, 0x09, 0x16, 0xa7, 0x05, 0x00, 0x00, +} + +func (x Type) String() string { + s, ok := Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Operation) String() string { + s, ok := Operation_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) } - func (this *StateChanges) Equal(that interface{}) bool { if that == nil { return this == nil @@ -705,12 +775,10 @@ func (m *StateChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintStateChange(dAtA, i, uint64(len(m.Type))) + if m.Type != 0 { + i = encodeVarintStateChange(dAtA, i, uint64(m.Type)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -913,9 +981,8 @@ func (m *StateChange) Size() (n int) { } var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovStateChange(uint64(l)) + if m.Type != 0 { + n += 1 + sovStateChange(uint64(m.Type)) } if m.Index != 0 { n += 1 + sovStateChange(uint64(m.Index)) @@ -1205,10 +1272,10 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStateChange @@ -1218,24 +1285,11 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Type |= Type(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStateChange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateChange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) diff --git a/data/stateChange/stateChange.proto b/data/stateChange/stateChange.proto index 243d6cd6..f5190746 100644 --- a/data/stateChange/stateChange.proto +++ b/data/stateChange/stateChange.proto @@ -11,8 +11,20 @@ message StateChanges { repeated StateChange StateChanges = 1 [(gogoproto.jsontag) = "stateChanges"]; } +enum Type { + Read = 0; + Write = 1; +} + +enum Operation { + GetCode = 0; + SaveAccount = 1; + WriteCode = 2; + RemoveDataTrie = 3; +} + message StateChange { - string Type = 1 [(gogoproto.jsontag) = "type"]; + Type Type = 1 [(gogoproto.jsontag) = "type"]; int32 Index = 2 [(gogoproto.jsontag) = "index"]; bytes TxHash = 3 [(gogoproto.jsontag) = "txHash"]; bytes MainTrieKey = 4 [(gogoproto.jsontag) = "mainTrieKey"]; From 23eebfa20d9978160aff00bbf3bfa20e0acca0ee Mon Sep 17 00:00:00 2001 From: Alexander Cristurean Date: Tue, 24 Sep 2024 14:48:26 +0300 Subject: [PATCH 2/4] renamed type to actionType. --- data/stateChange/stateChange.pb.go | 242 ++++++++++++----------------- data/stateChange/stateChange.proto | 26 ++-- 2 files changed, 110 insertions(+), 158 deletions(-) diff --git a/data/stateChange/stateChange.pb.go b/data/stateChange/stateChange.pb.go index e527b66e..b8885495 100644 --- a/data/stateChange/stateChange.pb.go +++ b/data/stateChange/stateChange.pb.go @@ -27,24 +27,24 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type Type int32 +type ActionType int32 const ( - Read Type = 0 - Write Type = 1 + Read ActionType = 0 + Write ActionType = 1 ) -var Type_name = map[int32]string{ +var ActionType_name = map[int32]string{ 0: "Read", 1: "Write", } -var Type_value = map[string]int32{ +var ActionType_value = map[string]int32{ "Read": 0, "Write": 1, } -func (Type) EnumDescriptor() ([]byte, []int) { +func (ActionType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_8e577663eebb0888, []int{0} } @@ -115,12 +115,12 @@ func (m *StateChanges) GetStateChanges() []*StateChange { } type StateChange struct { - Type Type `protobuf:"varint,1,opt,name=Type,proto3,enum=proto.Type" json:"type"` + Type ActionType `protobuf:"varint,1,opt,name=Type,proto3,enum=proto.ActionType" json:"type"` Index int32 `protobuf:"varint,2,opt,name=Index,proto3" json:"index"` TxHash []byte `protobuf:"bytes,3,opt,name=TxHash,proto3" json:"txHash"` MainTrieKey []byte `protobuf:"bytes,4,opt,name=MainTrieKey,proto3" json:"mainTrieKey"` MainTrieVal []byte `protobuf:"bytes,5,opt,name=MainTrieVal,proto3" json:"mainTrieVal"` - Operation string `protobuf:"bytes,6,opt,name=Operation,proto3" json:"operation"` + Operation Operation `protobuf:"varint,6,opt,name=Operation,proto3,enum=proto.Operation" json:"operation"` DataTrieChanges []*DataTrieChange `protobuf:"bytes,7,rep,name=DataTrieChanges,proto3" json:"dataTrieChanges,omitempty"` } @@ -152,7 +152,7 @@ func (m *StateChange) XXX_DiscardUnknown() { var xxx_messageInfo_StateChange proto.InternalMessageInfo -func (m *StateChange) GetType() Type { +func (m *StateChange) GetType() ActionType { if m != nil { return m.Type } @@ -187,11 +187,11 @@ func (m *StateChange) GetMainTrieVal() []byte { return nil } -func (m *StateChange) GetOperation() string { +func (m *StateChange) GetOperation() Operation { if m != nil { return m.Operation } - return "" + return GetCode } func (m *StateChange) GetDataTrieChanges() []*DataTrieChange { @@ -202,9 +202,9 @@ func (m *StateChange) GetDataTrieChanges() []*DataTrieChange { } type DataTrieChange struct { - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"type"` - Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"key"` - Val []byte `protobuf:"bytes,3,opt,name=Val,proto3" json:"val"` + Type ActionType `protobuf:"varint,1,opt,name=Type,proto3,enum=proto.ActionType" json:"type"` + Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"key"` + Val []byte `protobuf:"bytes,3,opt,name=Val,proto3" json:"val"` } func (m *DataTrieChange) Reset() { *m = DataTrieChange{} } @@ -235,11 +235,11 @@ func (m *DataTrieChange) XXX_DiscardUnknown() { var xxx_messageInfo_DataTrieChange proto.InternalMessageInfo -func (m *DataTrieChange) GetType() string { +func (m *DataTrieChange) GetType() ActionType { if m != nil { return m.Type } - return "" + return Read } func (m *DataTrieChange) GetKey() []byte { @@ -258,7 +258,7 @@ func (m *DataTrieChange) GetVal() []byte { type DataAnalysisStateChange struct { StateChange *StateChange `protobuf:"bytes,1,opt,name=StateChange,proto3" json:"stateChange"` - Operation string `protobuf:"bytes,2,opt,name=Operation,proto3" json:"operation"` + Operation Operation `protobuf:"varint,2,opt,name=Operation,proto3,enum=proto.Operation" json:"operation"` Nonce bool `protobuf:"varint,3,opt,name=Nonce,proto3" json:"nonceChanged"` Balance bool `protobuf:"varint,4,opt,name=Balance,proto3" json:"balanceChanged"` CodeHash bool `protobuf:"varint,5,opt,name=CodeHash,proto3" json:"codeHashChanged"` @@ -304,11 +304,11 @@ func (m *DataAnalysisStateChange) GetStateChange() *StateChange { return nil } -func (m *DataAnalysisStateChange) GetOperation() string { +func (m *DataAnalysisStateChange) GetOperation() Operation { if m != nil { return m.Operation } - return "" + return GetCode } func (m *DataAnalysisStateChange) GetNonce() bool { @@ -368,7 +368,7 @@ func (m *DataAnalysisStateChange) GetCodeMetadata() bool { } func init() { - proto.RegisterEnum("proto.Type", Type_name, Type_value) + proto.RegisterEnum("proto.ActionType", ActionType_name, ActionType_value) proto.RegisterEnum("proto.Operation", Operation_name, Operation_value) proto.RegisterType((*StateChanges)(nil), "proto.StateChanges") proto.RegisterType((*StateChange)(nil), "proto.StateChange") @@ -379,58 +379,58 @@ func init() { func init() { proto.RegisterFile("stateChange.proto", fileDescriptor_8e577663eebb0888) } var fileDescriptor_8e577663eebb0888 = []byte{ - // 744 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xc1, 0x6e, 0xe3, 0x44, - 0x18, 0xf6, 0x24, 0x71, 0x12, 0x4f, 0xb2, 0x49, 0x98, 0x15, 0xac, 0x77, 0x01, 0x3b, 0xca, 0x01, - 0x85, 0x65, 0xd3, 0x88, 0xe5, 0xb8, 0xa7, 0xba, 0x45, 0x14, 0x41, 0x5b, 0x69, 0x5a, 0x0a, 0xe2, - 0x80, 0x34, 0xb1, 0x87, 0xc4, 0x22, 0xf6, 0x44, 0xf6, 0x24, 0x4d, 0x0e, 0x48, 0x3c, 0x02, 0x8f, - 0xc1, 0x13, 0xf0, 0x0c, 0x1c, 0x7b, 0xec, 0xc9, 0xa2, 0xee, 0x05, 0xf9, 0xd4, 0x47, 0x40, 0x33, - 0x8e, 0x93, 0x71, 0x8b, 0xc4, 0x29, 0x9e, 0xef, 0xff, 0xbe, 0xff, 0xff, 0xe7, 0x9b, 0x4f, 0x81, - 0xef, 0xc5, 0x9c, 0x70, 0x7a, 0x34, 0x23, 0xe1, 0x94, 0x1e, 0x2c, 0x22, 0xc6, 0x19, 0xd2, 0xe5, - 0xcf, 0xab, 0xd1, 0xd4, 0xe7, 0xb3, 0xe5, 0xe4, 0xc0, 0x65, 0xc1, 0x78, 0xca, 0xa6, 0x6c, 0x2c, - 0xe1, 0xc9, 0xf2, 0x67, 0x79, 0x92, 0x07, 0xf9, 0x95, 0xab, 0x06, 0x3f, 0xc0, 0xf6, 0xc5, 0xbe, - 0x55, 0x8c, 0x4e, 0xca, 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 0x8f, 0x94, 0xff, 0xcf, 0x60, 0x39, 0xe7, 0xfe, 0x8a, 0x46, 0xf1, 0x7a, 0x1c, - 0xac, 0x47, 0xee, 0x8c, 0xf8, 0xe1, 0xc8, 0x65, 0x11, 0x1d, 0x4d, 0xd9, 0x58, 0xdc, 0x68, 0xac, - 0x04, 0xf8, 0x9d, 0xf2, 0x3d, 0xa9, 0xcb, 0xc0, 0x7f, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xa0, 0xc2, 0x09, 0x16, 0xa7, 0x05, 0x00, 0x00, -} - -func (x Type) String() string { - s, ok := Type_name[int32(x)] + // 747 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xe2, 0x46, + 0x14, 0xb7, 0x01, 0xf3, 0x67, 0x20, 0x40, 0x26, 0x6a, 0xe3, 0x44, 0xaa, 0x4d, 0x39, 0x54, 0x28, + 0x0a, 0x41, 0x4d, 0x8f, 0x51, 0x0f, 0x38, 0xa9, 0x9a, 0xaa, 0x4d, 0x22, 0x4d, 0xd2, 0xb4, 0xda, + 0xc3, 0x4a, 0x83, 0x3d, 0x0b, 0xd6, 0x62, 0x0f, 0xb2, 0x07, 0x02, 0x87, 0x95, 0xf6, 0xb8, 0xc7, + 0xfd, 0x18, 0xfb, 0x51, 0x72, 0xcc, 0x31, 0x27, 0x6b, 0xe3, 0x5c, 0x56, 0x3e, 0xe5, 0x23, 0xac, + 0x66, 0xc0, 0xd8, 0xce, 0xee, 0x25, 0x27, 0x66, 0x7e, 0x7f, 0xde, 0xbc, 0xf7, 0xf8, 0x01, 0xd8, + 0xf4, 0x19, 0x66, 0xe4, 0x78, 0x84, 0xdd, 0x21, 0x39, 0x98, 0x78, 0x94, 0x51, 0xa8, 0x88, 0x8f, + 0xdd, 0xee, 0xd0, 0x66, 0xa3, 0xe9, 0xe0, 0xc0, 0xa4,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bb, 0x50, 0x93, 0xef, 0x43, + 0x4d, 0xfe, 0x1c, 0x6a, 0xf2, 0x97, 0x50, 0x93, 0x9e, 0x42, 0x4d, 0xfe, 0xf8, 0xa8, 0x49, 0x77, + 0x8f, 0x9a, 0x74, 0xff, 0xa8, 0x49, 0xaf, 0x8e, 0x53, 0x7f, 0xc1, 0xce, 0x74, 0xcc, 0xec, 0x19, + 0xf1, 0xfc, 0x79, 0xcf, 0x99, 0x77, 0xcd, 0x11, 0xb6, 0xdd, 0xae, 0x49, 0x3d, 0xd2, 0x1d, 0xd2, + 0x1e, 0x9f, 0xab, 0x97, 0x0a, 0xf6, 0x51, 0xea, 0x3c, 0x28, 0x8a, 0x0c, 0xff, 0xf6, 0x35, 0x00, + 0x00, 0xff, 0xff, 0x38, 0x09, 0xdf, 0xde, 0xea, 0x05, 0x00, 0x00, +} + +func (x ActionType) String() string { + s, ok := ActionType_name[int32(x)] if ok { return s } @@ -742,12 +742,10 @@ func (m *StateChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x3a } } - if len(m.Operation) > 0 { - i -= len(m.Operation) - copy(dAtA[i:], m.Operation) - i = encodeVarintStateChange(dAtA, i, uint64(len(m.Operation))) + if m.Operation != 0 { + i = encodeVarintStateChange(dAtA, i, uint64(m.Operation)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x30 } if len(m.MainTrieVal) > 0 { i -= len(m.MainTrieVal) @@ -817,12 +815,10 @@ func (m *DataTrieChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintStateChange(dAtA, i, uint64(len(m.Type))) + if m.Type != 0 { + i = encodeVarintStateChange(dAtA, i, uint64(m.Type)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -927,12 +923,10 @@ func (m *DataAnalysisStateChange) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x18 } - if len(m.Operation) > 0 { - i -= len(m.Operation) - copy(dAtA[i:], m.Operation) - i = encodeVarintStateChange(dAtA, i, uint64(len(m.Operation))) + if m.Operation != 0 { + i = encodeVarintStateChange(dAtA, i, uint64(m.Operation)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if m.StateChange != nil { { @@ -999,9 +993,8 @@ func (m *StateChange) Size() (n int) { if l > 0 { n += 1 + l + sovStateChange(uint64(l)) } - l = len(m.Operation) - if l > 0 { - n += 1 + l + sovStateChange(uint64(l)) + if m.Operation != 0 { + n += 1 + sovStateChange(uint64(m.Operation)) } if len(m.DataTrieChanges) > 0 { for _, e := range m.DataTrieChanges { @@ -1018,9 +1011,8 @@ func (m *DataTrieChange) Size() (n int) { } var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovStateChange(uint64(l)) + if m.Type != 0 { + n += 1 + sovStateChange(uint64(m.Type)) } l = len(m.Key) if l > 0 { @@ -1043,9 +1035,8 @@ func (m *DataAnalysisStateChange) Size() (n int) { l = m.StateChange.Size() n += 1 + l + sovStateChange(uint64(l)) } - l = len(m.Operation) - if l > 0 { - n += 1 + l + sovStateChange(uint64(l)) + if m.Operation != 0 { + n += 1 + sovStateChange(uint64(m.Operation)) } if m.Nonce { n += 2 @@ -1285,7 +1276,7 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= Type(b&0x7F) << shift + m.Type |= ActionType(b&0x7F) << shift if b < 0x80 { break } @@ -1412,10 +1403,10 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 6: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) } - var stringLen uint64 + m.Operation = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStateChange @@ -1425,24 +1416,11 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Operation |= Operation(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStateChange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateChange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DataTrieChanges", wireType) @@ -1531,10 +1509,10 @@ func (m *DataTrieChange) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStateChange @@ -1544,24 +1522,11 @@ func (m *DataTrieChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Type |= ActionType(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStateChange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateChange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) @@ -1720,10 +1685,10 @@ func (m *DataAnalysisStateChange) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) } - var stringLen uint64 + m.Operation = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStateChange @@ -1733,24 +1698,11 @@ func (m *DataAnalysisStateChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Operation |= Operation(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStateChange - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStateChange - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) diff --git a/data/stateChange/stateChange.proto b/data/stateChange/stateChange.proto index f5190746..4129bc5b 100644 --- a/data/stateChange/stateChange.proto +++ b/data/stateChange/stateChange.proto @@ -11,7 +11,7 @@ message StateChanges { repeated StateChange StateChanges = 1 [(gogoproto.jsontag) = "stateChanges"]; } -enum Type { +enum ActionType { Read = 0; Write = 1; } @@ -24,30 +24,30 @@ enum Operation { } message StateChange { - Type Type = 1 [(gogoproto.jsontag) = "type"]; + ActionType Type = 1 [(gogoproto.jsontag) = "type"]; int32 Index = 2 [(gogoproto.jsontag) = "index"]; bytes TxHash = 3 [(gogoproto.jsontag) = "txHash"]; bytes MainTrieKey = 4 [(gogoproto.jsontag) = "mainTrieKey"]; bytes MainTrieVal = 5 [(gogoproto.jsontag) = "mainTrieVal"]; - string Operation = 6 [(gogoproto.jsontag) = "operation"]; + Operation Operation = 6 [(gogoproto.jsontag) = "operation"]; repeated DataTrieChange DataTrieChanges = 7 [(gogoproto.jsontag) = "dataTrieChanges,omitempty"]; } message DataTrieChange { - string Type = 1 [(gogoproto.jsontag) = "type"]; + ActionType Type = 1 [(gogoproto.jsontag) = "type"]; bytes Key = 2 [(gogoproto.jsontag) = "key"]; bytes Val = 3 [(gogoproto.jsontag) = "val"]; } message DataAnalysisStateChange { StateChange StateChange = 1 [(gogoproto.jsontag) = "stateChange"]; - string Operation = 2 [(gogoproto.jsontag) = "operation"]; - bool Nonce = 3 [(gogoproto.jsontag) = "nonceChanged"]; - bool Balance = 4 [(gogoproto.jsontag) = "balanceChanged"]; - bool CodeHash = 5 [(gogoproto.jsontag) = "codeHashChanged"]; - bool RootHash = 6 [(gogoproto.jsontag) = "rootHashChanged"]; - bool DeveloperReward = 7 [(gogoproto.jsontag) = "developerRewardChanged"]; - bool OwnerAddress = 8 [(gogoproto.jsontag) = "ownerAddressChanged"]; - bool UserName = 9 [(gogoproto.jsontag) = "userNameChanged"]; - bool CodeMetadata = 10 [(gogoproto.jsontag) = "codeMetadataChanged"]; + Operation Operation = 2 [(gogoproto.jsontag) = "operation"]; + bool Nonce = 3 [(gogoproto.jsontag) = "nonceChanged"]; + bool Balance = 4 [(gogoproto.jsontag) = "balanceChanged"]; + bool CodeHash = 5 [(gogoproto.jsontag) = "codeHashChanged"]; + bool RootHash = 6 [(gogoproto.jsontag) = "rootHashChanged"]; + bool DeveloperReward = 7 [(gogoproto.jsontag) = "developerRewardChanged"]; + bool OwnerAddress = 8 [(gogoproto.jsontag) = "ownerAddressChanged"]; + bool UserName = 9 [(gogoproto.jsontag) = "userNameChanged"]; + bool CodeMetadata = 10 [(gogoproto.jsontag) = "codeMetadataChanged"]; } From 76427893dde416131b2009ba7ce95e26439c4d1f Mon Sep 17 00:00:00 2001 From: Alexander Cristurean Date: Tue, 24 Sep 2024 15:00:18 +0300 Subject: [PATCH 3/4] added GetAccount operation. --- data/stateChange/stateChange.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/stateChange/stateChange.proto b/data/stateChange/stateChange.proto index 4129bc5b..6f309651 100644 --- a/data/stateChange/stateChange.proto +++ b/data/stateChange/stateChange.proto @@ -19,8 +19,9 @@ enum ActionType { enum Operation { GetCode = 0; SaveAccount = 1; - WriteCode = 2; - RemoveDataTrie = 3; + GetAccount = 2; + WriteCode = 3; + RemoveDataTrie = 4; } message StateChange { From a1e60f8d53f010daa1ef3be266c68788c245db94 Mon Sep 17 00:00:00 2001 From: Alexander Cristurean Date: Tue, 24 Sep 2024 15:03:53 +0300 Subject: [PATCH 4/4] generate go file after proto. --- data/stateChange/stateChange.pb.go | 112 +++++++++++++++-------------- 1 file changed, 58 insertions(+), 54 deletions(-) diff --git a/data/stateChange/stateChange.pb.go b/data/stateChange/stateChange.pb.go index b8885495..ec047a19 100644 --- a/data/stateChange/stateChange.pb.go +++ b/data/stateChange/stateChange.pb.go @@ -53,22 +53,25 @@ type Operation int32 const ( GetCode Operation = 0 SaveAccount Operation = 1 - WriteCode Operation = 2 - RemoveDataTrie Operation = 3 + GetAccount Operation = 2 + WriteCode Operation = 3 + RemoveDataTrie Operation = 4 ) var Operation_name = map[int32]string{ 0: "GetCode", 1: "SaveAccount", - 2: "WriteCode", - 3: "RemoveDataTrie", + 2: "GetAccount", + 3: "WriteCode", + 4: "RemoveDataTrie", } var Operation_value = map[string]int32{ "GetCode": 0, "SaveAccount": 1, - "WriteCode": 2, - "RemoveDataTrie": 3, + "GetAccount": 2, + "WriteCode": 3, + "RemoveDataTrie": 4, } func (Operation) EnumDescriptor() ([]byte, []int) { @@ -379,54 +382,55 @@ func init() { func init() { proto.RegisterFile("stateChange.proto", fileDescriptor_8e577663eebb0888) } var fileDescriptor_8e577663eebb0888 = []byte{ - // 747 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xe2, 0x46, - 0x14, 0xb7, 0x01, 0xf3, 0x67, 0x20, 0x40, 0x26, 0x6a, 0xe3, 0x44, 0xaa, 0x4d, 0x39, 0x54, 0x28, - 0x0a, 0x41, 0x4d, 0x8f, 0x51, 0x0f, 0x38, 0xa9, 0x9a, 0xaa, 0x4d, 0x22, 0x4d, 0xd2, 0xb4, 0xda, - 0xc3, 0x4a, 0x83, 0x3d, 0x0b, 0xd6, 0x62, 0x0f, 0xb2, 0x07, 0x02, 0x87, 0x95, 0xf6, 0xb8, 0xc7, - 0xfd, 0x18, 0xfb, 0x51, 0x72, 0xcc, 0x31, 0x27, 0x6b, 0xe3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0x4d, 0x3a, 0x75, - 0x59, 0x53, 0x86, 0x1b, 0xa0, 0x22, 0x5c, 0x82, 0xcf, 0x41, 0x08, 0xea, 0x88, 0x38, 0x74, 0x46, - 0xe2, 0x9f, 0x49, 0x33, 0x6f, 0xbc, 0xbb, 0x7b, 0xd0, 0xa4, 0xfb, 0x07, 0x4d, 0x7a, 0x7a, 0xd0, - 0xe4, 0xf7, 0xa1, 0x26, 0x7f, 0x0a, 0x35, 0xf9, 0x36, 0xd4, 0xe4, 0xbb, 0x50, 0x93, 0xef, 0x43, - 0x4d, 0xfe, 0x1c, 0x6a, 0xf2, 0x97, 0x50, 0x93, 0x9e, 0x42, 0x4d, 0xfe, 0xf8, 0xa8, 0x49, 0x77, - 0x8f, 0x9a, 0x74, 0xff, 0xa8, 0x49, 0xaf, 0x8e, 0x53, 0x7f, 0xc1, 0xce, 0x74, 0xcc, 0xec, 0x19, - 0xf1, 0xfc, 0x79, 0xcf, 0x99, 0x77, 0xcd, 0x11, 0xb6, 0xdd, 0xae, 0x49, 0x3d, 0xd2, 0x1d, 0xd2, - 0x1e, 0x9f, 0xab, 0x97, 0x0a, 0xf6, 0x51, 0xea, 0x3c, 0x28, 0x8a, 0x0c, 0xff, 0xf6, 0x35, 0x00, - 0x00, 0xff, 0xff, 0x38, 0x09, 0xdf, 0xde, 0xea, 0x05, 0x00, 0x00, + // 756 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x6f, 0xe2, 0x46, + 0x18, 0xb5, 0x01, 0xf3, 0x63, 0x20, 0x40, 0x26, 0x6a, 0xe3, 0x44, 0xaa, 0x4d, 0x39, 0x54, 0x28, + 0x0a, 0x41, 0x4d, 0x8f, 0x51, 0x0f, 0x38, 0xa9, 0x92, 0xaa, 0x4a, 0x22, 0x4d, 0xd2, 0xb4, 0xaa, + 0xaa, 0x4a, 0x83, 0x3d, 0x05, 0x6b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xde, 0xfb, 0x37, 0x15, 0x05, 0x58, 0x05, + 0xa5, 0x53, 0xc2, 0xb8, 0x45, 0x53, 0x82, 0x0d, 0x50, 0xbd, 0xc2, 0x33, 0xd2, 0x37, 0x4d, 0x3a, + 0x75, 0x59, 0x53, 0x86, 0x75, 0x00, 0x4e, 0x09, 0x8b, 0xef, 0x39, 0xb8, 0x01, 0x2a, 0xc2, 0x45, + 0xf0, 0xf3, 0x10, 0x82, 0x3a, 0x22, 0x0e, 0x9d, 0x91, 0xf8, 0x67, 0xd3, 0x2c, 0x18, 0x6f, 0xef, + 0x1f, 0x35, 0xe9, 0xe1, 0x51, 0x93, 0x9e, 0x1f, 0x35, 0xf9, 0x5d, 0xa8, 0xc9, 0x1f, 0x43, 0x4d, + 0xbe, 0x0b, 0x35, 0xf9, 0x3e, 0xd4, 0xe4, 0x87, 0x50, 0x93, 0x3f, 0x85, 0x9a, 0xfc, 0x39, 0xd4, + 0xa4, 0xe7, 0x50, 0x93, 0x3f, 0x3c, 0x69, 0xd2, 0xfd, 0x93, 0x26, 0x3d, 0x3c, 0x69, 0xd2, 0x3f, + 0xc7, 0xa9, 0xbf, 0x64, 0x67, 0x3a, 0x66, 0xf6, 0x8c, 0x78, 0xfe, 0xbc, 0xe7, 0xcc, 0xbb, 0xe6, + 0x08, 0xdb, 0x6e, 0xd7, 0xa4, 0x1e, 0xe9, 0x0e, 0x69, 0x8f, 0xcf, 0xd9, 0x4b, 0x05, 0xfd, 0x28, + 0x75, 0x1e, 0x14, 0x45, 0xa6, 0x7f, 0xf9, 0x12, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x5e, 0xf2, 0xf2, + 0xfa, 0x05, 0x00, 0x00, } func (x ActionType) String() string {