From a3caa49feef5428c2d5cbcc8326cdee971e7a4b6 Mon Sep 17 00:00:00 2001 From: Iuga Mihai Date: Wed, 30 Aug 2023 15:48:08 +0300 Subject: [PATCH 1/4] extend additional data structure --- data/alteredAccount/alteredAccount.pb.go | 336 +++++++++++++++++++---- data/alteredAccount/alteredAccount.proto | 4 + 2 files changed, 290 insertions(+), 50 deletions(-) diff --git a/data/alteredAccount/alteredAccount.pb.go b/data/alteredAccount/alteredAccount.pb.go index 3af961d1..156e1ab3 100644 --- a/data/alteredAccount/alteredAccount.pb.go +++ b/data/alteredAccount/alteredAccount.pb.go @@ -308,6 +308,10 @@ type AdditionalAccountData struct { CurrentOwner string `protobuf:"bytes,3,opt,name=CurrentOwner,proto3" json:"currentOwner,omitempty"` UserName string `protobuf:"bytes,4,opt,name=UserName,proto3" json:"userName,omitempty"` DeveloperRewards string `protobuf:"bytes,5,opt,name=DeveloperRewards,proto3" json:"developerRewards,omitempty"` + Code []byte `protobuf:"bytes,6,opt,name=Code,proto3" json:"code,omitempty"` + CodeHash []byte `protobuf:"bytes,7,opt,name=CodeHash,proto3" json:"codeHash,omitempty"` + RootHash []byte `protobuf:"bytes,8,opt,name=RootHash,proto3" json:"rootHash,omitempty"` + CodeMetadata []byte `protobuf:"bytes,9,opt,name=CodeMetadata,proto3" json:"codeMetadata,omitempty"` } func (m *AdditionalAccountData) Reset() { *m = AdditionalAccountData{} } @@ -373,6 +377,34 @@ func (m *AdditionalAccountData) GetDeveloperRewards() string { return "" } +func (m *AdditionalAccountData) GetCode() []byte { + if m != nil { + return m.Code + } + return nil +} + +func (m *AdditionalAccountData) GetCodeHash() []byte { + if m != nil { + return m.CodeHash + } + return nil +} + +func (m *AdditionalAccountData) GetRootHash() []byte { + if m != nil { + return m.RootHash + } + return nil +} + +func (m *AdditionalAccountData) GetCodeMetadata() []byte { + if m != nil { + return m.CodeMetadata + } + return nil +} + func init() { proto.RegisterType((*AlteredAccount)(nil), "proto.AlteredAccount") proto.RegisterType((*AccountTokenData)(nil), "proto.AccountTokenData") @@ -384,55 +416,59 @@ func init() { func init() { proto.RegisterFile("alteredAccount.proto", fileDescriptor_804e04a1cde31bca) } var fileDescriptor_804e04a1cde31bca = []byte{ - // 759 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x95, 0xcd, 0x6a, 0xdb, 0x4a, - 0x18, 0x86, 0x2d, 0xc7, 0xbf, 0xe3, 0xc4, 0xe4, 0x88, 0x24, 0xc7, 0xc7, 0x04, 0x8d, 0x8f, 0x4b, - 0xc1, 0xd0, 0xda, 0x86, 0x74, 0x19, 0x28, 0x58, 0x49, 0x4b, 0x5c, 0x68, 0x5a, 0xd4, 0x64, 0xd1, - 0xee, 0xc6, 0xd2, 0xc4, 0x1e, 0x6a, 0x69, 0xcc, 0x68, 0x94, 0x9f, 0x5d, 0xa1, 0xfb, 0xd2, 0xcb, - 0xe8, 0x3d, 0xf4, 0x06, 0xba, 0x4c, 0x77, 0x59, 0x89, 0x46, 0xd9, 0x14, 0x41, 0x21, 0x97, 0x50, - 0x34, 0x92, 0xec, 0x51, 0x7e, 0xda, 0x95, 0x3d, 0xef, 0xf7, 0xce, 0xab, 0x4f, 0xcf, 0x37, 0x63, - 0x83, 0x35, 0x34, 0xe5, 0x98, 0x61, 0x6b, 0x60, 0x9a, 0xd4, 0x73, 0x78, 0x6f, 0xc6, 0x28, 0xa7, - 0x6a, 0x51, 0x7c, 0x34, 0xbb, 0x63, 0xc2, 0x27, 0xde, 0xa8, 0x67, 0x52, 0xbb, 0x3f, 0xa6, 0x63, - 0xda, 0x17, 0xf2, 0xc8, 0x3b, 0x12, 0x2b, 0xb1, 0x10, 0xdf, 0xe2, 0x5d, 0xed, 0xaf, 0x79, 0x50, - 0x1f, 0x64, 0xe2, 0xd4, 0x87, 0xa0, 0x3c, 0xb0, 0x2c, 0x86, 0x5d, 0xb7, 0xa1, 0xb4, 0x94, 0x4e,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0x47, 0x08, 0xe7, 0xb1, 0xb3, 0xb9, 0x6a, 0x48, 0x0e, 0x75, 0x0f, - 0x54, 0x5e, 0x62, 0x8e, 0x24, 0x42, 0x6b, 0x09, 0x21, 0xf1, 0x2e, 0x69, 0x4d, 0xdf, 0x08, 0x7d, - 0xa8, 0xda, 0xc9, 0x4a, 0x82, 0x31, 0xdf, 0xad, 0x8e, 0x6f, 0x11, 0x2f, 0x89, 0xbc, 0xff, 0xef, - 0x23, 0xbe, 0x18, 0xe5, 0x66, 0xe8, 0xc3, 0x06, 0xca, 0x6c, 0xfe, 0x03, 0xef, 0x4f, 0x79, 0xb0, - 0x92, 0x69, 0xee, 0xef, 0xb0, 0x37, 0x41, 0x61, 0x1f, 0xd9, 0x38, 0xc1, 0x5c, 0x09, 0x7d, 0x58, - 0x70, 0x90, 0x8d, 0x0d, 0xa1, 0x46, 0x68, 0x77, 0x18, 0x46, 0x9c, 0x32, 0x19, 0xad, 0x19, 0x4b, - 0x46, 0x5a, 0x53, 0x1f, 0x81, 0xaa, 0x41, 0xcf, 0xd0, 0x74, 0x4e, 0x76, 0x45, 0x5f, 0x09, 0x7d, - 0x58, 0x65, 0xa9, 0x68, 0x2c, 0xea, 0xd1, 0x13, 0xf7, 0x90, 0x3b, 0x11, 0x4c, 0x97, 0xe3, 0x27, - 0x4e, 0x90, 0x3b, 0x31, 0x84, 0x1a, 0x55, 0x0f, 0x8d, 0xa1, 0xdb, 0x28, 0xb5, 0x96, 0xd2, 0xaa, - 0xc7, 0x88, 0x6b, 0x08, 0x35, 0x9a, 0xe1, 0x80, 0x73, 0x46, 0x46, 0x1e, 0xc7, 0x6e, 0xa3, 0x2c, - 0x12, 0xc4, 0x0c, 0xd1, 0x5c, 0x35, 0x24, 0x47, 0xfb, 0x2d, 0x68, 0xde, 0x0f, 0x57, 0xdd, 0x06, - 0xb5, 0xa1, 0xbb, 0xff, 0xfc, 0x40, 0xbc, 0x46, 0x8c, 0xa8, 0xa2, 0xff, 0x17, 0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xa1, 0xf4, 0xbb, 0x6e, 0x7b, 0x53, 0x4e, 0x8e, 0x31, 0x73, 0x4f, 0xfb, 0xf6, 0x69, - 0xd7, 0x9c, 0x20, 0xe2, 0x74, 0x4d, 0xca, 0x70, 0x77, 0x4c, 0xfb, 0x16, 0xe2, 0xa8, 0x9f, 0xfd, - 0x83, 0xd8, 0xce, 0x2e, 0x47, 0x25, 0x71, 0x2b, 0x9f, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xdd, - 0xf1, 0x90, 0xfb, 0x48, 0x06, 0x00, 0x00, + // 830 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x95, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xe3, 0x34, 0x3f, 0x27, 0x6d, 0x54, 0x46, 0xed, 0x12, 0xa2, 0xca, 0x13, 0x82, 0x40, + 0x91, 0x20, 0x89, 0x54, 0x8e, 0x2b, 0x21, 0xc5, 0x29, 0x68, 0x83, 0x44, 0x41, 0x66, 0xf7, 0x00, + 0xb7, 0x89, 0x3d, 0x9b, 0x58, 0xc4, 0x9e, 0x68, 0x3c, 0xde, 0x1f, 0x37, 0x24, 0xee, 0x88, 0x7f, + 0x81, 0x1b, 0xff, 0x03, 0xff, 0x00, 0xc7, 0x1e, 0x7b, 0xb2, 0xa8, 0x7b, 0x41, 0x96, 0x90, 0xf6, + 0x4f, 0x40, 0xf3, 0x6c, 0x27, 0xe3, 0x6e, 0xcb, 0x9e, 0x9c, 0xf9, 0xbe, 0xf7, 0xbe, 0xf3, 0xfc, + 0x79, 0x33, 0x31, 0x3a, 0xa1, 0x1b, 0xc9, 0x04, 0x73, 0x67, 0x8e, 0xc3, 0xa3, 0x40, 0x4e, 0xb6, + 0x82, 0x4b, 0x8e, 0xeb, 0xf0, 0xe8, 0x8f, 0x57, 0x9e, 0x5c, 0x47, 0xcb, 0x89, 0xc3, 0xfd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, 0xaa, 0x4f, 0xf5, 0x84, 0x63, 0x94, 0x1d, 0x02, 0xe8, 0xd3, 0xc9, 0x35, 0xbd, + 0xcf, 0x22, 0x4f, 0xd5, 0xd8, 0x9c, 0x4b, 0xa8, 0x69, 0xed, 0x6b, 0x44, 0xae, 0xe9, 0x35, 0x45, + 0x1e, 0xf0, 0xe4, 0x2e, 0x53, 0xb7, 0xc9, 0x55, 0xd7, 0xb6, 0x0d, 0x75, 0x19, 0x4f, 0x4d, 0x2f, + 0xf1, 0xd4, 0x74, 0xeb, 0x17, 0xe3, 0xea, 0xc6, 0xac, 0x5c, 0xdf, 0x98, 0x95, 0x37, 0x37, 0xa6, + 0xf1, 0x73, 0x62, 0x1a, 0x7f, 0x24, 0xa6, 0xf1, 0x57, 0x62, 0x1a, 0x57, 0x89, 0x69, 0x5c, 0x27, + 0xa6, 0xf1, 0x77, 0x62, 0x1a, 0xff, 0x24, 0x66, 0xe5, 0x4d, 0x62, 0x1a, 0xbf, 0xdd, 0x9a, 0x95, + 0xab, 0x5b, 0xb3, 0x72, 0x7d, 0x6b, 0x56, 0x7e, 0x5c, 0x68, 0xdf, 0x29, 0x3f, 0xda, 0x48, 0xef, + 0x05, 0x13, 0xe1, 0xab, 0xa9, 0xff, 0x6a, 0xec, 0xac, 0xa9, 0x17, 0x8c, 0x1d, 0x2e, 0xd8, 0x78, + 0xc5, 0xa7, 0x6a, 0x9f, 0x69, 0xf9, 0x83, 0xf7, 0xb8, 0xbc, 0x5c, 0x36, 0xe0, 0x5f, 0xe6, 0xf3, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x3c, 0x8a, 0x7f, 0x18, 0x07, 0x00, 0x00, } func (this *AlteredAccount) Equal(that interface{}) bool { @@ -620,6 +656,18 @@ func (this *AdditionalAccountData) Equal(that interface{}) bool { if this.DeveloperRewards != that1.DeveloperRewards { return false } + if !bytes.Equal(this.Code, that1.Code) { + return false + } + if !bytes.Equal(this.CodeHash, that1.CodeHash) { + return false + } + if !bytes.Equal(this.RootHash, that1.RootHash) { + return false + } + if !bytes.Equal(this.CodeMetadata, that1.CodeMetadata) { + return false + } return true } func (this *AlteredAccount) GoString() string { @@ -689,13 +737,17 @@ func (this *AdditionalAccountData) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 9) + s := make([]string, 0, 13) s = append(s, "&alteredAccount.AdditionalAccountData{") s = append(s, "IsSender: "+fmt.Sprintf("%#v", this.IsSender)+",\n") s = append(s, "BalanceChanged: "+fmt.Sprintf("%#v", this.BalanceChanged)+",\n") s = append(s, "CurrentOwner: "+fmt.Sprintf("%#v", this.CurrentOwner)+",\n") s = append(s, "UserName: "+fmt.Sprintf("%#v", this.UserName)+",\n") s = append(s, "DeveloperRewards: "+fmt.Sprintf("%#v", this.DeveloperRewards)+",\n") + s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") + s = append(s, "CodeHash: "+fmt.Sprintf("%#v", this.CodeHash)+",\n") + s = append(s, "RootHash: "+fmt.Sprintf("%#v", this.RootHash)+",\n") + s = append(s, "CodeMetadata: "+fmt.Sprintf("%#v", this.CodeMetadata)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -971,6 +1023,34 @@ func (m *AdditionalAccountData) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.CodeMetadata) > 0 { + i -= len(m.CodeMetadata) + copy(dAtA[i:], m.CodeMetadata) + i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.CodeMetadata))) + i-- + dAtA[i] = 0x4a + } + if len(m.RootHash) > 0 { + i -= len(m.RootHash) + copy(dAtA[i:], m.RootHash) + i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.RootHash))) + i-- + dAtA[i] = 0x42 + } + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x32 + } if len(m.DeveloperRewards) > 0 { i -= len(m.DeveloperRewards) copy(dAtA[i:], m.DeveloperRewards) @@ -1161,6 +1241,22 @@ func (m *AdditionalAccountData) Size() (n int) { if l > 0 { n += 1 + l + sovAlteredAccount(uint64(l)) } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovAlteredAccount(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovAlteredAccount(uint64(l)) + } + l = len(m.RootHash) + if l > 0 { + n += 1 + l + sovAlteredAccount(uint64(l)) + } + l = len(m.CodeMetadata) + if l > 0 { + n += 1 + l + sovAlteredAccount(uint64(l)) + } return n } @@ -1240,6 +1336,10 @@ func (this *AdditionalAccountData) String() string { `CurrentOwner:` + fmt.Sprintf("%v", this.CurrentOwner) + `,`, `UserName:` + fmt.Sprintf("%v", this.UserName) + `,`, `DeveloperRewards:` + fmt.Sprintf("%v", this.DeveloperRewards) + `,`, + `Code:` + fmt.Sprintf("%v", this.Code) + `,`, + `CodeHash:` + fmt.Sprintf("%v", this.CodeHash) + `,`, + `RootHash:` + fmt.Sprintf("%v", this.RootHash) + `,`, + `CodeMetadata:` + fmt.Sprintf("%v", this.CodeMetadata) + `,`, `}`, }, "") return s @@ -2191,6 +2291,142 @@ func (m *AdditionalAccountData) Unmarshal(dAtA []byte) error { } m.DeveloperRewards = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAlteredAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAlteredAccount + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAlteredAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...) + if m.Code == nil { + m.Code = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAlteredAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAlteredAccount + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAlteredAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...) + if m.CodeHash == nil { + m.CodeHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAlteredAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAlteredAccount + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAlteredAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootHash = append(m.RootHash[:0], dAtA[iNdEx:postIndex]...) + if m.RootHash == nil { + m.RootHash = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeMetadata", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAlteredAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAlteredAccount + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthAlteredAccount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeMetadata = append(m.CodeMetadata[:0], dAtA[iNdEx:postIndex]...) + if m.CodeMetadata == nil { + m.CodeMetadata = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAlteredAccount(dAtA[iNdEx:]) diff --git a/data/alteredAccount/alteredAccount.proto b/data/alteredAccount/alteredAccount.proto index 68a9c4f8..86e3d9e8 100644 --- a/data/alteredAccount/alteredAccount.proto +++ b/data/alteredAccount/alteredAccount.proto @@ -44,4 +44,8 @@ message AdditionalAccountData { string CurrentOwner = 3 [(gogoproto.jsontag) = "currentOwner,omitempty"]; string UserName = 4 [(gogoproto.jsontag) = "userName,omitempty"]; string DeveloperRewards = 5 [(gogoproto.jsontag) = "developerRewards,omitempty"]; + bytes Code = 6 [(gogoproto.jsontag) = "code,omitempty"]; + bytes CodeHash = 7 [(gogoproto.jsontag) = "codeHash,omitempty"]; + bytes RootHash = 8 [(gogoproto.jsontag) = "rootHash,omitempty"]; + bytes CodeMetadata = 9 [(gogoproto.jsontag) = "codeMetadata,omitempty"]; } From 028435cb3956b85b965c517c78ea56f6aab78e21 Mon Sep 17 00:00:00 2001 From: Iuga Mihai Date: Wed, 30 Aug 2023 15:57:19 +0300 Subject: [PATCH 2/4] remove code field --- data/alteredAccount/alteredAccount.pb.go | 179 ++++++++--------------- data/alteredAccount/alteredAccount.proto | 7 +- 2 files changed, 63 insertions(+), 123 deletions(-) diff --git a/data/alteredAccount/alteredAccount.pb.go b/data/alteredAccount/alteredAccount.pb.go index 156e1ab3..231e1957 100644 --- a/data/alteredAccount/alteredAccount.pb.go +++ b/data/alteredAccount/alteredAccount.pb.go @@ -308,10 +308,9 @@ type AdditionalAccountData struct { CurrentOwner string `protobuf:"bytes,3,opt,name=CurrentOwner,proto3" json:"currentOwner,omitempty"` UserName string `protobuf:"bytes,4,opt,name=UserName,proto3" json:"userName,omitempty"` DeveloperRewards string `protobuf:"bytes,5,opt,name=DeveloperRewards,proto3" json:"developerRewards,omitempty"` - Code []byte `protobuf:"bytes,6,opt,name=Code,proto3" json:"code,omitempty"` - CodeHash []byte `protobuf:"bytes,7,opt,name=CodeHash,proto3" json:"codeHash,omitempty"` - RootHash []byte `protobuf:"bytes,8,opt,name=RootHash,proto3" json:"rootHash,omitempty"` - CodeMetadata []byte `protobuf:"bytes,9,opt,name=CodeMetadata,proto3" json:"codeMetadata,omitempty"` + CodeHash []byte `protobuf:"bytes,6,opt,name=CodeHash,proto3" json:"codeHash,omitempty"` + RootHash []byte `protobuf:"bytes,7,opt,name=RootHash,proto3" json:"rootHash,omitempty"` + CodeMetadata []byte `protobuf:"bytes,8,opt,name=CodeMetadata,proto3" json:"codeMetadata,omitempty"` } func (m *AdditionalAccountData) Reset() { *m = AdditionalAccountData{} } @@ -377,13 +376,6 @@ func (m *AdditionalAccountData) GetDeveloperRewards() string { return "" } -func (m *AdditionalAccountData) GetCode() []byte { - if m != nil { - return m.Code - } - return nil -} - func (m *AdditionalAccountData) GetCodeHash() []byte { if m != nil { return m.CodeHash @@ -416,59 +408,58 @@ func init() { func init() { proto.RegisterFile("alteredAccount.proto", fileDescriptor_804e04a1cde31bca) } var fileDescriptor_804e04a1cde31bca = []byte{ - // 830 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x95, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xc7, 0xe3, 0x34, 0x3f, 0x27, 0x6d, 0x54, 0x46, 0xed, 0x12, 0xa2, 0xca, 0x13, 0x82, 0x40, - 0x91, 0x20, 0x89, 0x54, 0x8e, 0x2b, 0x21, 0xc5, 0x29, 0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, 0x72, 0x7d, 0x6b, 0x56, 0x7e, 0x5c, 0x68, 0xdf, 0x29, 0x3f, 0xda, 0x48, 0xef, - 0x05, 0x13, 0xe1, 0xab, 0xa9, 0xff, 0x6a, 0xec, 0xac, 0xa9, 0x17, 0x8c, 0x1d, 0x2e, 0xd8, 0x78, - 0xc5, 0xa7, 0x6a, 0x9f, 0x69, 0xf9, 0x83, 0xf7, 0xb8, 0xbc, 0x5c, 0x36, 0xe0, 0x5f, 0xe6, 0xf3, - 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x3c, 0x8a, 0x7f, 0x18, 0x07, 0x00, 0x00, + // 810 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x95, 0xcd, 0x6a, 0xeb, 0x46, + 0x14, 0xc7, 0x2d, 0x7f, 0x7b, 0x9c, 0x98, 0x54, 0x24, 0xa9, 0x6b, 0x82, 0xe4, 0xba, 0x14, 0x0c, + 0xad, 0x6d, 0x48, 0x97, 0x81, 0x82, 0xe5, 0xb4, 0xc4, 0x85, 0xa6, 0x45, 0x4d, 0x16, 0xed, 0x6e, + 0x2c, 0x4d, 0x6c, 0x51, 0x4b, 0x63, 0x46, 0xa3, 0x7c, 0xec, 0x0a, 0xdd, 0x97, 0x3e, 0x46, 0xdf, + 0xa1, 0x2f, 0xd0, 0x65, 0x96, 0x59, 0x89, 0x46, 0xd9, 0x5c, 0x04, 0x17, 0xb2, 0xbd, 0xbb, 0xcb, + 0x1c, 0x49, 0xf6, 0x28, 0x1f, 0xf7, 0xae, 0x92, 0xf9, 0x9f, 0x73, 0xfe, 0xe7, 0xf8, 0x77, 0x66, + 0x6c, 0xb4, 0x8b, 0x97, 0x9c, 0x30, 0x62, 0x8f, 0x2d, 0x8b, 0x06, 0x1e, 0x1f, 0xae, 0x18, 0xe5, + 0x54, 0xad, 0xc0, 0x9f, 0xce, 0x60, 0xee, 0xf0, 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, 0xfd, 0xb3, 0x3c, + 0x51, 0x63, 0x52, 0xca, 0xa1, 0xa6, 0xb6, 0xa9, 0x61, 0xa9, 0x26, 0xd7, 0x64, 0x79, 0xc0, 0x89, + 0xda, 0x44, 0xbc, 0x12, 0x5b, 0x3c, 0xc7, 0x3a, 0xd4, 0x25, 0x9c, 0x24, 0x3d, 0xc7, 0x49, 0xd2, + 0x8d, 0x3f, 0x95, 0xdb, 0x7b, 0xad, 0x70, 0x77, 0xaf, 0x15, 0x1e, 0xef, 0x35, 0xe5, 0x8f, 0x48, + 0x53, 0xfe, 0x89, 0x34, 0xe5, 0xbf, 0x48, 0x53, 0x6e, 0x23, 0x4d, 0xb9, 0x8b, 0x34, 0xe5, 0xff, + 0x48, 0x53, 0xde, 0x44, 0x5a, 0xe1, 0x31, 0xd2, 0x94, 0xbf, 0x1f, 0xb4, 0xc2, 0xed, 0x83, 0x56, + 0xb8, 0x7b, 0xd0, 0x0a, 0xbf, 0x4d, 0xa5, 0xdf, 0x1f, 0x37, 0x58, 0x72, 0xe7, 0x92, 0x30, 0xff, + 0x7a, 0xe4, 0x5e, 0x0f, 0xac, 0x05, 0x76, 0xbc, 0x81, 0x45, 0x19, 0x19, 0xcc, 0xe9, 0x48, 0xf4, + 0x19, 0xe5, 0x7f, 0xc8, 0x8e, 0xf2, 0xc7, 0x59, 0x15, 0xbe, 0x3d, 0xbe, 0x79, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0xf3, 0xb4, 0x64, 0x47, 0xf0, 0x06, 0x00, 0x00, } func (this *AlteredAccount) Equal(that interface{}) bool { @@ -656,9 +647,6 @@ func (this *AdditionalAccountData) Equal(that interface{}) bool { if this.DeveloperRewards != that1.DeveloperRewards { return false } - if !bytes.Equal(this.Code, that1.Code) { - return false - } if !bytes.Equal(this.CodeHash, that1.CodeHash) { return false } @@ -737,14 +725,13 @@ func (this *AdditionalAccountData) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 13) + s := make([]string, 0, 12) s = append(s, "&alteredAccount.AdditionalAccountData{") s = append(s, "IsSender: "+fmt.Sprintf("%#v", this.IsSender)+",\n") s = append(s, "BalanceChanged: "+fmt.Sprintf("%#v", this.BalanceChanged)+",\n") s = append(s, "CurrentOwner: "+fmt.Sprintf("%#v", this.CurrentOwner)+",\n") s = append(s, "UserName: "+fmt.Sprintf("%#v", this.UserName)+",\n") s = append(s, "DeveloperRewards: "+fmt.Sprintf("%#v", this.DeveloperRewards)+",\n") - s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") s = append(s, "CodeHash: "+fmt.Sprintf("%#v", this.CodeHash)+",\n") s = append(s, "RootHash: "+fmt.Sprintf("%#v", this.RootHash)+",\n") s = append(s, "CodeMetadata: "+fmt.Sprintf("%#v", this.CodeMetadata)+",\n") @@ -1028,27 +1015,20 @@ func (m *AdditionalAccountData) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.CodeMetadata) i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.CodeMetadata))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if len(m.RootHash) > 0 { i -= len(m.RootHash) copy(dAtA[i:], m.RootHash) i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.RootHash))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if len(m.CodeHash) > 0 { i -= len(m.CodeHash) copy(dAtA[i:], m.CodeHash) i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.CodeHash))) i-- - dAtA[i] = 0x3a - } - if len(m.Code) > 0 { - i -= len(m.Code) - copy(dAtA[i:], m.Code) - i = encodeVarintAlteredAccount(dAtA, i, uint64(len(m.Code))) - i-- dAtA[i] = 0x32 } if len(m.DeveloperRewards) > 0 { @@ -1241,10 +1221,6 @@ func (m *AdditionalAccountData) Size() (n int) { if l > 0 { n += 1 + l + sovAlteredAccount(uint64(l)) } - l = len(m.Code) - if l > 0 { - n += 1 + l + sovAlteredAccount(uint64(l)) - } l = len(m.CodeHash) if l > 0 { n += 1 + l + sovAlteredAccount(uint64(l)) @@ -1336,7 +1312,6 @@ func (this *AdditionalAccountData) String() string { `CurrentOwner:` + fmt.Sprintf("%v", this.CurrentOwner) + `,`, `UserName:` + fmt.Sprintf("%v", this.UserName) + `,`, `DeveloperRewards:` + fmt.Sprintf("%v", this.DeveloperRewards) + `,`, - `Code:` + fmt.Sprintf("%v", this.Code) + `,`, `CodeHash:` + fmt.Sprintf("%v", this.CodeHash) + `,`, `RootHash:` + fmt.Sprintf("%v", this.RootHash) + `,`, `CodeMetadata:` + fmt.Sprintf("%v", this.CodeMetadata) + `,`, @@ -2292,40 +2267,6 @@ func (m *AdditionalAccountData) Unmarshal(dAtA []byte) error { m.DeveloperRewards = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlteredAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAlteredAccount - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAlteredAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Code = append(m.Code[:0], dAtA[iNdEx:postIndex]...) - if m.Code == nil { - m.Code = []byte{} - } - iNdEx = postIndex - case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) } @@ -2359,7 +2300,7 @@ func (m *AdditionalAccountData) Unmarshal(dAtA []byte) error { m.CodeHash = []byte{} } iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RootHash", wireType) } @@ -2393,7 +2334,7 @@ func (m *AdditionalAccountData) Unmarshal(dAtA []byte) error { m.RootHash = []byte{} } iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CodeMetadata", wireType) } diff --git a/data/alteredAccount/alteredAccount.proto b/data/alteredAccount/alteredAccount.proto index 86e3d9e8..08e6c0af 100644 --- a/data/alteredAccount/alteredAccount.proto +++ b/data/alteredAccount/alteredAccount.proto @@ -44,8 +44,7 @@ message AdditionalAccountData { string CurrentOwner = 3 [(gogoproto.jsontag) = "currentOwner,omitempty"]; string UserName = 4 [(gogoproto.jsontag) = "userName,omitempty"]; string DeveloperRewards = 5 [(gogoproto.jsontag) = "developerRewards,omitempty"]; - bytes Code = 6 [(gogoproto.jsontag) = "code,omitempty"]; - bytes CodeHash = 7 [(gogoproto.jsontag) = "codeHash,omitempty"]; - bytes RootHash = 8 [(gogoproto.jsontag) = "rootHash,omitempty"]; - bytes CodeMetadata = 9 [(gogoproto.jsontag) = "codeMetadata,omitempty"]; + bytes CodeHash = 6 [(gogoproto.jsontag) = "codeHash,omitempty"]; + bytes RootHash = 7 [(gogoproto.jsontag) = "rootHash,omitempty"]; + bytes CodeMetadata = 8 [(gogoproto.jsontag) = "codeMetadata,omitempty"]; } From 9a1f804658193561f9c2f028f5331caa6855bf22 Mon Sep 17 00:00:00 2001 From: Iuga Mihai Date: Thu, 31 Aug 2023 12:59:44 +0300 Subject: [PATCH 3/4] extend api block structure --- data/api/apiBlock.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/data/api/apiBlock.go b/data/api/apiBlock.go index d513a02b..df84207a 100644 --- a/data/api/apiBlock.go +++ b/data/api/apiBlock.go @@ -25,6 +25,17 @@ type Block struct { Status string `json:"status,omitempty"` RandSeed string `json:"randSeed,omitempty"` PrevRandSeed string `json:"prevRandSeed,omitempty"` + PubKeyBitmap string `json:"pubKeyBitmap"` + Signature string `json:"signature,omitempty"` + LeaderSignature string `json:"leaderSignature,omitempty"` + ChainID string `json:"chainID,omitempty"` + SoftwareVersion string `json:"softwareVersion,omitempty"` + ReceiptsHash string `json:"receiptsHash,omitempty"` + Reserved []byte `json:"reserved,omitempty"` + GasProvided uint64 `json:"gasProvided"` + GasRefunded uint64 `json:"gasRefunded"` + GasPenalized uint64 `json:"gasPenalized"` + MaxGasLimit uint64 `json:"maxGasLimit"` Timestamp time.Duration `json:"timestamp,omitempty"` NotarizedBlocks []*NotarizedBlock `json:"notarizedBlocks,omitempty"` MiniBlocks []*MiniBlock `json:"miniBlocks,omitempty"` From 30b2efe916285653d3393bc8a938b21d8c157e76 Mon Sep 17 00:00:00 2001 From: Iuga Mihai Date: Thu, 31 Aug 2023 14:19:09 +0300 Subject: [PATCH 4/4] remove --- data/api/apiBlock.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/data/api/apiBlock.go b/data/api/apiBlock.go index df84207a..4ee57b77 100644 --- a/data/api/apiBlock.go +++ b/data/api/apiBlock.go @@ -32,10 +32,6 @@ type Block struct { SoftwareVersion string `json:"softwareVersion,omitempty"` ReceiptsHash string `json:"receiptsHash,omitempty"` Reserved []byte `json:"reserved,omitempty"` - GasProvided uint64 `json:"gasProvided"` - GasRefunded uint64 `json:"gasRefunded"` - GasPenalized uint64 `json:"gasPenalized"` - MaxGasLimit uint64 `json:"maxGasLimit"` Timestamp time.Duration `json:"timestamp,omitempty"` NotarizedBlocks []*NotarizedBlock `json:"notarizedBlocks,omitempty"` MiniBlocks []*MiniBlock `json:"miniBlocks,omitempty"`