From c6419e8201eb3dfe4837359994cdd878bc3df2ef Mon Sep 17 00:00:00 2001 From: georgezgeorgez Date: Thu, 28 Sep 2023 19:33:41 +0000 Subject: [PATCH] [dep] Migrate deprecated protobuf "github.com/golang/protobuf/proto" is deprecated in favor of "google.golang.org/protobuf/proto" Most changes are from re-generated proto classes --- chain/nom/account_block.go | 2 +- chain/nom/momentum.go | 2 +- chain/nom/protobuf.pb.go | 594 +++++++++++++++++--------- chain/nom/protobuf.proto | 1 + common/types/account_header.go | 2 +- common/types/hash_height.go | 2 +- common/types/protobuf.pb.go | 438 ++++++++++++------- common/types/protobuf.proto | 1 + consensus/storage/election_data.go | 2 +- consensus/storage/election_data.pb.go | 288 ++++++++----- consensus/storage/election_data.proto | 1 + consensus/storage/point.go | 2 +- consensus/storage/point.pb.go | 329 +++++++++----- consensus/storage/point.proto | 1 + 14 files changed, 1097 insertions(+), 568 deletions(-) diff --git a/chain/nom/account_block.go b/chain/nom/account_block.go index 7db6a22..89c0562 100644 --- a/chain/nom/account_block.go +++ b/chain/nom/account_block.go @@ -7,8 +7,8 @@ import ( "fmt" "math/big" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "github.com/zenon-network/go-zenon/common" "github.com/zenon-network/go-zenon/common/db" diff --git a/chain/nom/momentum.go b/chain/nom/momentum.go index a03666d..d5e2b64 100644 --- a/chain/nom/momentum.go +++ b/chain/nom/momentum.go @@ -4,7 +4,7 @@ import ( "crypto/ed25519" "time" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zenon-network/go-zenon/common" "github.com/zenon-network/go-zenon/common/db" diff --git a/chain/nom/protobuf.pb.go b/chain/nom/protobuf.pb.go index 1f5560d..7bb1836 100644 --- a/chain/nom/protobuf.pb.go +++ b/chain/nom/protobuf.pb.go @@ -1,356 +1,550 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.22.3 // source: chain/nom/protobuf.proto -/* -Package nom is a generated protocol buffer package. - -It is generated from these files: - chain/nom/protobuf.proto - -It has these top-level messages: - AccountBlockProto - MomentumProto -*/ package nom -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import types "github.com/zenon-network/go-zenon/common/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +import ( + types "github.com/zenon-network/go-zenon/common/types" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type AccountBlockProto struct { - Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` - ChainIdentifier uint64 `protobuf:"varint,2,opt,name=chainIdentifier" json:"chainIdentifier,omitempty"` - BlockType uint64 `protobuf:"varint,3,opt,name=blockType" json:"blockType,omitempty"` - Hash *types.HashProto `protobuf:"bytes,4,opt,name=hash" json:"hash,omitempty"` - PreviousHash *types.HashProto `protobuf:"bytes,5,opt,name=previousHash" json:"previousHash,omitempty"` - Height uint64 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"` - MomentumAcknowledged *types.HashHeightProto `protobuf:"bytes,7,opt,name=momentumAcknowledged" json:"momentumAcknowledged,omitempty"` - Address *types.AddressProto `protobuf:"bytes,8,opt,name=address" json:"address,omitempty"` - ToAddress *types.AddressProto `protobuf:"bytes,9,opt,name=toAddress" json:"toAddress,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + ChainIdentifier uint64 `protobuf:"varint,2,opt,name=chainIdentifier,proto3" json:"chainIdentifier,omitempty"` + BlockType uint64 `protobuf:"varint,3,opt,name=blockType,proto3" json:"blockType,omitempty"` + Hash *types.HashProto `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + PreviousHash *types.HashProto `protobuf:"bytes,5,opt,name=previousHash,proto3" json:"previousHash,omitempty"` + Height uint64 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"` + MomentumAcknowledged *types.HashHeightProto `protobuf:"bytes,7,opt,name=momentumAcknowledged,proto3" json:"momentumAcknowledged,omitempty"` + Address *types.AddressProto `protobuf:"bytes,8,opt,name=address,proto3" json:"address,omitempty"` + ToAddress *types.AddressProto `protobuf:"bytes,9,opt,name=toAddress,proto3" json:"toAddress,omitempty"` Amount []byte `protobuf:"bytes,10,opt,name=amount,proto3" json:"amount,omitempty"` TokenStandard []byte `protobuf:"bytes,11,opt,name=tokenStandard,proto3" json:"tokenStandard,omitempty"` - FromBlockHash *types.HashProto `protobuf:"bytes,12,opt,name=fromBlockHash" json:"fromBlockHash,omitempty"` - DescendantBlocks []*AccountBlockProto `protobuf:"bytes,13,rep,name=descendantBlocks" json:"descendantBlocks,omitempty"` + FromBlockHash *types.HashProto `protobuf:"bytes,12,opt,name=fromBlockHash,proto3" json:"fromBlockHash,omitempty"` + DescendantBlocks []*AccountBlockProto `protobuf:"bytes,13,rep,name=descendantBlocks,proto3" json:"descendantBlocks,omitempty"` Data []byte `protobuf:"bytes,14,opt,name=data,proto3" json:"data,omitempty"` - FusedPlasma uint64 `protobuf:"varint,15,opt,name=fusedPlasma" json:"fusedPlasma,omitempty"` - Difficulty uint64 `protobuf:"varint,17,opt,name=difficulty" json:"difficulty,omitempty"` + FusedPlasma uint64 `protobuf:"varint,15,opt,name=fusedPlasma,proto3" json:"fusedPlasma,omitempty"` + Difficulty uint64 `protobuf:"varint,17,opt,name=difficulty,proto3" json:"difficulty,omitempty"` Nonce []byte `protobuf:"bytes,18,opt,name=nonce,proto3" json:"nonce,omitempty"` - BasePlasma uint64 `protobuf:"varint,19,opt,name=basePlasma" json:"basePlasma,omitempty"` - TotalPlasma uint64 `protobuf:"varint,20,opt,name=totalPlasma" json:"totalPlasma,omitempty"` - ChangesHash *types.HashProto `protobuf:"bytes,21,opt,name=changesHash" json:"changesHash,omitempty"` + BasePlasma uint64 `protobuf:"varint,19,opt,name=basePlasma,proto3" json:"basePlasma,omitempty"` + TotalPlasma uint64 `protobuf:"varint,20,opt,name=totalPlasma,proto3" json:"totalPlasma,omitempty"` + ChangesHash *types.HashProto `protobuf:"bytes,21,opt,name=changesHash,proto3" json:"changesHash,omitempty"` PublicKey []byte `protobuf:"bytes,22,opt,name=publicKey,proto3" json:"publicKey,omitempty"` Signature []byte `protobuf:"bytes,23,opt,name=signature,proto3" json:"signature,omitempty"` } -func (m *AccountBlockProto) Reset() { *m = AccountBlockProto{} } -func (m *AccountBlockProto) String() string { return proto.CompactTextString(m) } -func (*AccountBlockProto) ProtoMessage() {} -func (*AccountBlockProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (x *AccountBlockProto) Reset() { + *x = AccountBlockProto{} + if protoimpl.UnsafeEnabled { + mi := &file_chain_nom_protobuf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountBlockProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountBlockProto) ProtoMessage() {} + +func (x *AccountBlockProto) ProtoReflect() protoreflect.Message { + mi := &file_chain_nom_protobuf_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountBlockProto.ProtoReflect.Descriptor instead. +func (*AccountBlockProto) Descriptor() ([]byte, []int) { + return file_chain_nom_protobuf_proto_rawDescGZIP(), []int{0} +} -func (m *AccountBlockProto) GetVersion() uint64 { - if m != nil { - return m.Version +func (x *AccountBlockProto) GetVersion() uint64 { + if x != nil { + return x.Version } return 0 } -func (m *AccountBlockProto) GetChainIdentifier() uint64 { - if m != nil { - return m.ChainIdentifier +func (x *AccountBlockProto) GetChainIdentifier() uint64 { + if x != nil { + return x.ChainIdentifier } return 0 } -func (m *AccountBlockProto) GetBlockType() uint64 { - if m != nil { - return m.BlockType +func (x *AccountBlockProto) GetBlockType() uint64 { + if x != nil { + return x.BlockType } return 0 } -func (m *AccountBlockProto) GetHash() *types.HashProto { - if m != nil { - return m.Hash +func (x *AccountBlockProto) GetHash() *types.HashProto { + if x != nil { + return x.Hash } return nil } -func (m *AccountBlockProto) GetPreviousHash() *types.HashProto { - if m != nil { - return m.PreviousHash +func (x *AccountBlockProto) GetPreviousHash() *types.HashProto { + if x != nil { + return x.PreviousHash } return nil } -func (m *AccountBlockProto) GetHeight() uint64 { - if m != nil { - return m.Height +func (x *AccountBlockProto) GetHeight() uint64 { + if x != nil { + return x.Height } return 0 } -func (m *AccountBlockProto) GetMomentumAcknowledged() *types.HashHeightProto { - if m != nil { - return m.MomentumAcknowledged +func (x *AccountBlockProto) GetMomentumAcknowledged() *types.HashHeightProto { + if x != nil { + return x.MomentumAcknowledged } return nil } -func (m *AccountBlockProto) GetAddress() *types.AddressProto { - if m != nil { - return m.Address +func (x *AccountBlockProto) GetAddress() *types.AddressProto { + if x != nil { + return x.Address } return nil } -func (m *AccountBlockProto) GetToAddress() *types.AddressProto { - if m != nil { - return m.ToAddress +func (x *AccountBlockProto) GetToAddress() *types.AddressProto { + if x != nil { + return x.ToAddress } return nil } -func (m *AccountBlockProto) GetAmount() []byte { - if m != nil { - return m.Amount +func (x *AccountBlockProto) GetAmount() []byte { + if x != nil { + return x.Amount } return nil } -func (m *AccountBlockProto) GetTokenStandard() []byte { - if m != nil { - return m.TokenStandard +func (x *AccountBlockProto) GetTokenStandard() []byte { + if x != nil { + return x.TokenStandard } return nil } -func (m *AccountBlockProto) GetFromBlockHash() *types.HashProto { - if m != nil { - return m.FromBlockHash +func (x *AccountBlockProto) GetFromBlockHash() *types.HashProto { + if x != nil { + return x.FromBlockHash } return nil } -func (m *AccountBlockProto) GetDescendantBlocks() []*AccountBlockProto { - if m != nil { - return m.DescendantBlocks +func (x *AccountBlockProto) GetDescendantBlocks() []*AccountBlockProto { + if x != nil { + return x.DescendantBlocks } return nil } -func (m *AccountBlockProto) GetData() []byte { - if m != nil { - return m.Data +func (x *AccountBlockProto) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *AccountBlockProto) GetFusedPlasma() uint64 { - if m != nil { - return m.FusedPlasma +func (x *AccountBlockProto) GetFusedPlasma() uint64 { + if x != nil { + return x.FusedPlasma } return 0 } -func (m *AccountBlockProto) GetDifficulty() uint64 { - if m != nil { - return m.Difficulty +func (x *AccountBlockProto) GetDifficulty() uint64 { + if x != nil { + return x.Difficulty } return 0 } -func (m *AccountBlockProto) GetNonce() []byte { - if m != nil { - return m.Nonce +func (x *AccountBlockProto) GetNonce() []byte { + if x != nil { + return x.Nonce } return nil } -func (m *AccountBlockProto) GetBasePlasma() uint64 { - if m != nil { - return m.BasePlasma +func (x *AccountBlockProto) GetBasePlasma() uint64 { + if x != nil { + return x.BasePlasma } return 0 } -func (m *AccountBlockProto) GetTotalPlasma() uint64 { - if m != nil { - return m.TotalPlasma +func (x *AccountBlockProto) GetTotalPlasma() uint64 { + if x != nil { + return x.TotalPlasma } return 0 } -func (m *AccountBlockProto) GetChangesHash() *types.HashProto { - if m != nil { - return m.ChangesHash +func (x *AccountBlockProto) GetChangesHash() *types.HashProto { + if x != nil { + return x.ChangesHash } return nil } -func (m *AccountBlockProto) GetPublicKey() []byte { - if m != nil { - return m.PublicKey +func (x *AccountBlockProto) GetPublicKey() []byte { + if x != nil { + return x.PublicKey } return nil } -func (m *AccountBlockProto) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *AccountBlockProto) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } type MomentumProto struct { - Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` - ChainIdentifier uint64 `protobuf:"varint,2,opt,name=chainIdentifier" json:"chainIdentifier,omitempty"` - Hash *types.HashProto `protobuf:"bytes,3,opt,name=hash" json:"hash,omitempty"` - PreviousHash *types.HashProto `protobuf:"bytes,4,opt,name=previousHash" json:"previousHash,omitempty"` - Height uint64 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"` - Timestamp uint64 `protobuf:"varint,6,opt,name=timestamp" json:"timestamp,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + ChainIdentifier uint64 `protobuf:"varint,2,opt,name=chainIdentifier,proto3" json:"chainIdentifier,omitempty"` + Hash *types.HashProto `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` + PreviousHash *types.HashProto `protobuf:"bytes,4,opt,name=previousHash,proto3" json:"previousHash,omitempty"` + Height uint64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` + Timestamp uint64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` - Content []*types.AccountHeaderProto `protobuf:"bytes,8,rep,name=content" json:"content,omitempty"` - ChangesHash *types.HashProto `protobuf:"bytes,9,opt,name=changesHash" json:"changesHash,omitempty"` + Content []*types.AccountHeaderProto `protobuf:"bytes,8,rep,name=content,proto3" json:"content,omitempty"` + ChangesHash *types.HashProto `protobuf:"bytes,9,opt,name=changesHash,proto3" json:"changesHash,omitempty"` PublicKey []byte `protobuf:"bytes,10,opt,name=publicKey,proto3" json:"publicKey,omitempty"` Signature []byte `protobuf:"bytes,11,opt,name=signature,proto3" json:"signature,omitempty"` } -func (m *MomentumProto) Reset() { *m = MomentumProto{} } -func (m *MomentumProto) String() string { return proto.CompactTextString(m) } -func (*MomentumProto) ProtoMessage() {} -func (*MomentumProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (x *MomentumProto) Reset() { + *x = MomentumProto{} + if protoimpl.UnsafeEnabled { + mi := &file_chain_nom_protobuf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MomentumProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MomentumProto) ProtoMessage() {} + +func (x *MomentumProto) ProtoReflect() protoreflect.Message { + mi := &file_chain_nom_protobuf_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MomentumProto.ProtoReflect.Descriptor instead. +func (*MomentumProto) Descriptor() ([]byte, []int) { + return file_chain_nom_protobuf_proto_rawDescGZIP(), []int{1} +} -func (m *MomentumProto) GetVersion() uint64 { - if m != nil { - return m.Version +func (x *MomentumProto) GetVersion() uint64 { + if x != nil { + return x.Version } return 0 } -func (m *MomentumProto) GetChainIdentifier() uint64 { - if m != nil { - return m.ChainIdentifier +func (x *MomentumProto) GetChainIdentifier() uint64 { + if x != nil { + return x.ChainIdentifier } return 0 } -func (m *MomentumProto) GetHash() *types.HashProto { - if m != nil { - return m.Hash +func (x *MomentumProto) GetHash() *types.HashProto { + if x != nil { + return x.Hash } return nil } -func (m *MomentumProto) GetPreviousHash() *types.HashProto { - if m != nil { - return m.PreviousHash +func (x *MomentumProto) GetPreviousHash() *types.HashProto { + if x != nil { + return x.PreviousHash } return nil } -func (m *MomentumProto) GetHeight() uint64 { - if m != nil { - return m.Height +func (x *MomentumProto) GetHeight() uint64 { + if x != nil { + return x.Height } return 0 } -func (m *MomentumProto) GetTimestamp() uint64 { - if m != nil { - return m.Timestamp +func (x *MomentumProto) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp } return 0 } -func (m *MomentumProto) GetData() []byte { - if m != nil { - return m.Data +func (x *MomentumProto) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *MomentumProto) GetContent() []*types.AccountHeaderProto { - if m != nil { - return m.Content +func (x *MomentumProto) GetContent() []*types.AccountHeaderProto { + if x != nil { + return x.Content } return nil } -func (m *MomentumProto) GetChangesHash() *types.HashProto { - if m != nil { - return m.ChangesHash +func (x *MomentumProto) GetChangesHash() *types.HashProto { + if x != nil { + return x.ChangesHash } return nil } -func (m *MomentumProto) GetPublicKey() []byte { - if m != nil { - return m.PublicKey +func (x *MomentumProto) GetPublicKey() []byte { + if x != nil { + return x.PublicKey } return nil } -func (m *MomentumProto) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *MomentumProto) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } -func init() { - proto.RegisterType((*AccountBlockProto)(nil), "nom.AccountBlockProto") - proto.RegisterType((*MomentumProto)(nil), "nom.MomentumProto") -} - -func init() { proto.RegisterFile("chain/nom/protobuf.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 557 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xd1, 0x6e, 0x1a, 0x3b, - 0x10, 0x15, 0x17, 0x02, 0x61, 0x80, 0x9b, 0xc4, 0xa1, 0xd4, 0x6d, 0xa3, 0x0a, 0x45, 0x79, 0xe0, - 0xa5, 0xa0, 0x26, 0x55, 0xdf, 0xc9, 0x13, 0x6d, 0x55, 0x29, 0xa2, 0xfd, 0x01, 0x63, 0xcf, 0xb2, - 0x2b, 0xd6, 0xf6, 0x6a, 0xed, 0x4d, 0xc5, 0xcf, 0xf4, 0x17, 0xfb, 0x0b, 0xd5, 0xce, 0x2e, 0x61, - 0x21, 0xa5, 0x12, 0x52, 0xdf, 0xd6, 0x67, 0xce, 0x19, 0x9b, 0x99, 0x73, 0x00, 0x2e, 0x43, 0x11, - 0x99, 0x89, 0xb1, 0x7a, 0x92, 0xa4, 0xd6, 0xdb, 0x45, 0x16, 0x8c, 0xe9, 0x83, 0xd5, 0x8d, 0xd5, - 0xaf, 0xdf, 0x48, 0xab, 0xb5, 0x35, 0x13, 0xbf, 0x4e, 0xd0, 0xed, 0x31, 0xae, 0x7f, 0x35, 0xe1, - 0x62, 0x2a, 0xa5, 0xcd, 0x8c, 0xbf, 0x8f, 0xad, 0x5c, 0x3d, 0x90, 0x8e, 0x43, 0xeb, 0x11, 0x53, - 0x17, 0x59, 0xc3, 0x6b, 0xc3, 0xda, 0xa8, 0x31, 0xdf, 0x1c, 0xd9, 0x08, 0xce, 0xe8, 0xb6, 0x4f, - 0x0a, 0x8d, 0x8f, 0x82, 0x08, 0x53, 0xfe, 0x1f, 0x31, 0xf6, 0x61, 0x76, 0x05, 0xed, 0x45, 0xde, - 0xf1, 0xfb, 0x3a, 0x41, 0x5e, 0x27, 0xce, 0x16, 0x60, 0x37, 0xd0, 0x08, 0x85, 0x0b, 0x79, 0x63, - 0x58, 0x1b, 0x75, 0x6e, 0xcf, 0xc7, 0xf4, 0xb8, 0xf1, 0x4c, 0xb8, 0x90, 0x5e, 0x30, 0xa7, 0x2a, - 0xfb, 0x00, 0xdd, 0x24, 0xc5, 0xc7, 0xc8, 0x66, 0x2e, 0x2f, 0xf1, 0x93, 0x03, 0xec, 0x1d, 0x16, - 0x1b, 0x40, 0x33, 0xc4, 0x68, 0x19, 0x7a, 0xde, 0xa4, 0x6b, 0xcb, 0x13, 0xfb, 0x0c, 0x7d, 0x6d, - 0x35, 0x1a, 0x9f, 0xe9, 0xa9, 0x5c, 0x19, 0xfb, 0x23, 0x46, 0xb5, 0x44, 0xc5, 0x5b, 0xd4, 0x75, - 0x50, 0xe9, 0x3a, 0x23, 0x41, 0xd1, 0xfb, 0x8f, 0x1a, 0xf6, 0x0e, 0x5a, 0x42, 0xa9, 0x14, 0x9d, - 0xe3, 0xa7, 0x24, 0xbf, 0x2c, 0xe5, 0xd3, 0x02, 0x2d, 0xb4, 0x1b, 0x0e, 0x7b, 0x0f, 0x6d, 0x6f, - 0xcb, 0x12, 0x6f, 0x1f, 0x16, 0x6c, 0x59, 0xf9, 0xaf, 0x10, 0x3a, 0xdf, 0x0b, 0x87, 0x61, 0x6d, - 0xd4, 0x9d, 0x97, 0x27, 0x76, 0x03, 0x3d, 0x6f, 0x57, 0x68, 0xbe, 0x79, 0x61, 0x94, 0x48, 0x15, - 0xef, 0x50, 0x79, 0x17, 0x64, 0x1f, 0xa1, 0x17, 0xa4, 0x56, 0xd3, 0x4e, 0x69, 0x74, 0xdd, 0x03, - 0xa3, 0xdb, 0xa5, 0xb1, 0x7b, 0x38, 0x57, 0xe8, 0x24, 0x1a, 0x25, 0x4a, 0x47, 0x38, 0xde, 0x1b, - 0xd6, 0x69, 0x3e, 0xc6, 0xea, 0xf1, 0x33, 0xaf, 0xcc, 0x9f, 0xf1, 0x19, 0x83, 0x86, 0x12, 0x5e, - 0xf0, 0xff, 0xe9, 0x61, 0xf4, 0xcd, 0x86, 0xd0, 0x09, 0x32, 0x87, 0xea, 0x21, 0x16, 0x4e, 0x0b, - 0x7e, 0x46, 0x8b, 0xa9, 0x42, 0xec, 0x2d, 0x80, 0x8a, 0x82, 0x20, 0x92, 0x59, 0xec, 0xd7, 0xfc, - 0x82, 0x08, 0x15, 0x84, 0xf5, 0xe1, 0xc4, 0x58, 0x23, 0x91, 0x33, 0x6a, 0x5b, 0x1c, 0x72, 0xd5, - 0x42, 0x38, 0x2c, 0xdb, 0x5e, 0x16, 0xaa, 0x2d, 0x92, 0xdf, 0xeb, 0xad, 0x17, 0x71, 0x49, 0xe8, - 0x17, 0xf7, 0x56, 0x20, 0x76, 0x0b, 0x1d, 0x19, 0x0a, 0xb3, 0xc4, 0xc2, 0x62, 0x2f, 0x0e, 0xcc, - 0xa9, 0x4a, 0xca, 0xbd, 0x9d, 0x64, 0x8b, 0x38, 0x92, 0x5f, 0x70, 0xcd, 0x07, 0xf4, 0x9e, 0x2d, - 0x90, 0x57, 0x5d, 0xb4, 0x34, 0xc2, 0x67, 0x29, 0xf2, 0x97, 0x45, 0xf5, 0x09, 0xb8, 0xfe, 0x59, - 0x87, 0xde, 0xd7, 0xd2, 0x52, 0xff, 0x2e, 0x6d, 0x9b, 0x3c, 0xd5, 0x8f, 0xca, 0x53, 0xe3, 0xc8, - 0x3c, 0x9d, 0xec, 0xe4, 0xe9, 0x0a, 0xda, 0x3e, 0xd2, 0xe8, 0xbc, 0xd0, 0x49, 0x19, 0xb5, 0x2d, - 0xf0, 0xe4, 0x82, 0x56, 0xc5, 0x05, 0x77, 0xd0, 0x92, 0xd6, 0x78, 0x34, 0x9e, 0x9f, 0x92, 0xa9, - 0x5e, 0x6d, 0x42, 0x50, 0xd8, 0x6a, 0x86, 0x42, 0x61, 0x5a, 0x66, 0xa7, 0x64, 0xee, 0x2f, 0xa8, - 0x7d, 0xf4, 0x82, 0xe0, 0xaf, 0x0b, 0xea, 0xec, 0x2d, 0x68, 0xd1, 0xa4, 0x7f, 0xc6, 0xbb, 0xdf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xc3, 0xed, 0x16, 0x57, 0x05, 0x00, 0x00, +var File_chain_nom_protobuf_proto protoreflect.FileDescriptor + +var file_chain_nom_protobuf_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6e, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x6e, 0x6f, 0x6d, 0x1a, + 0x1b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x06, 0x0a, + 0x11, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x14, 0x6d, 0x6f, 0x6d, 0x65, + 0x6e, 0x74, 0x75, 0x6d, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, + 0x61, 0x73, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x14, + 0x6d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x75, 0x6d, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x31, 0x0a, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x74, 0x6f, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, + 0x0a, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x6e, + 0x64, 0x61, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0d, 0x66, + 0x72, 0x6f, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x42, 0x0a, 0x10, + 0x64, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x61, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x6f, 0x6d, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x10, + 0x64, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x61, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x75, 0x73, 0x65, 0x64, 0x50, 0x6c, 0x61, + 0x73, 0x6d, 0x61, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x66, 0x75, 0x73, 0x65, 0x64, + 0x50, 0x6c, 0x61, 0x73, 0x6d, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, + 0x75, 0x6c, 0x74, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, + 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, + 0x12, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x62, 0x61, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x73, 0x6d, 0x61, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x73, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x73, 0x6d, 0x61, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x73, 0x6d, 0x61, 0x12, 0x32, + 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x48, 0x61, 0x73, 0x68, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x17, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9e, + 0x03, 0x0a, 0x0d, 0x4d, 0x6f, 0x6d, 0x65, 0x6e, 0x74, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, + 0x32, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x48, 0x61, 0x73, 0x68, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, + 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, + 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x65, + 0x6e, 0x6f, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x67, 0x6f, 0x2d, 0x7a, + 0x65, 0x6e, 0x6f, 0x6e, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x6e, 0x6f, 0x6d, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_chain_nom_protobuf_proto_rawDescOnce sync.Once + file_chain_nom_protobuf_proto_rawDescData = file_chain_nom_protobuf_proto_rawDesc +) + +func file_chain_nom_protobuf_proto_rawDescGZIP() []byte { + file_chain_nom_protobuf_proto_rawDescOnce.Do(func() { + file_chain_nom_protobuf_proto_rawDescData = protoimpl.X.CompressGZIP(file_chain_nom_protobuf_proto_rawDescData) + }) + return file_chain_nom_protobuf_proto_rawDescData +} + +var file_chain_nom_protobuf_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_chain_nom_protobuf_proto_goTypes = []interface{}{ + (*AccountBlockProto)(nil), // 0: nom.AccountBlockProto + (*MomentumProto)(nil), // 1: nom.MomentumProto + (*types.HashProto)(nil), // 2: types.HashProto + (*types.HashHeightProto)(nil), // 3: types.HashHeightProto + (*types.AddressProto)(nil), // 4: types.AddressProto + (*types.AccountHeaderProto)(nil), // 5: types.AccountHeaderProto +} +var file_chain_nom_protobuf_proto_depIdxs = []int32{ + 2, // 0: nom.AccountBlockProto.hash:type_name -> types.HashProto + 2, // 1: nom.AccountBlockProto.previousHash:type_name -> types.HashProto + 3, // 2: nom.AccountBlockProto.momentumAcknowledged:type_name -> types.HashHeightProto + 4, // 3: nom.AccountBlockProto.address:type_name -> types.AddressProto + 4, // 4: nom.AccountBlockProto.toAddress:type_name -> types.AddressProto + 2, // 5: nom.AccountBlockProto.fromBlockHash:type_name -> types.HashProto + 0, // 6: nom.AccountBlockProto.descendantBlocks:type_name -> nom.AccountBlockProto + 2, // 7: nom.AccountBlockProto.changesHash:type_name -> types.HashProto + 2, // 8: nom.MomentumProto.hash:type_name -> types.HashProto + 2, // 9: nom.MomentumProto.previousHash:type_name -> types.HashProto + 5, // 10: nom.MomentumProto.content:type_name -> types.AccountHeaderProto + 2, // 11: nom.MomentumProto.changesHash:type_name -> types.HashProto + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_chain_nom_protobuf_proto_init() } +func file_chain_nom_protobuf_proto_init() { + if File_chain_nom_protobuf_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_chain_nom_protobuf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountBlockProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chain_nom_protobuf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MomentumProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_chain_nom_protobuf_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_chain_nom_protobuf_proto_goTypes, + DependencyIndexes: file_chain_nom_protobuf_proto_depIdxs, + MessageInfos: file_chain_nom_protobuf_proto_msgTypes, + }.Build() + File_chain_nom_protobuf_proto = out.File + file_chain_nom_protobuf_proto_rawDesc = nil + file_chain_nom_protobuf_proto_goTypes = nil + file_chain_nom_protobuf_proto_depIdxs = nil } diff --git a/chain/nom/protobuf.proto b/chain/nom/protobuf.proto index 80b12f8..050941b 100644 --- a/chain/nom/protobuf.proto +++ b/chain/nom/protobuf.proto @@ -1,5 +1,6 @@ syntax = "proto3"; package nom; +option go_package = "github.com/zenon-network/go-zenon/chain/nom"; import "common/types/protobuf.proto"; diff --git a/common/types/account_header.go b/common/types/account_header.go index 65ef2dd..46d4e04 100644 --- a/common/types/account_header.go +++ b/common/types/account_header.go @@ -1,7 +1,7 @@ package types import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zenon-network/go-zenon/common" ) diff --git a/common/types/hash_height.go b/common/types/hash_height.go index e9e3526..15b7b39 100644 --- a/common/types/hash_height.go +++ b/common/types/hash_height.go @@ -1,7 +1,7 @@ package types import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zenon-network/go-zenon/common" ) diff --git a/common/types/protobuf.pb.go b/common/types/protobuf.pb.go index 054eea7..7107a16 100644 --- a/common/types/protobuf.pb.go +++ b/common/types/protobuf.pb.go @@ -1,219 +1,359 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.22.3 // source: common/types/protobuf.proto package types import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type AddressProto struct { - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *AddressProto) Reset() { *m = AddressProto{} } -func (m *AddressProto) String() string { return proto.CompactTextString(m) } -func (*AddressProto) ProtoMessage() {} -func (*AddressProto) Descriptor() ([]byte, []int) { - return fileDescriptor_283a3be7ca5abadb, []int{0} + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (m *AddressProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddressProto.Unmarshal(m, b) -} -func (m *AddressProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddressProto.Marshal(b, m, deterministic) -} -func (m *AddressProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressProto.Merge(m, src) +func (x *AddressProto) Reset() { + *x = AddressProto{} + if protoimpl.UnsafeEnabled { + mi := &file_common_types_protobuf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AddressProto) XXX_Size() int { - return xxx_messageInfo_AddressProto.Size(m) + +func (x *AddressProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AddressProto) XXX_DiscardUnknown() { - xxx_messageInfo_AddressProto.DiscardUnknown(m) + +func (*AddressProto) ProtoMessage() {} + +func (x *AddressProto) ProtoReflect() protoreflect.Message { + mi := &file_common_types_protobuf_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AddressProto proto.InternalMessageInfo +// Deprecated: Use AddressProto.ProtoReflect.Descriptor instead. +func (*AddressProto) Descriptor() ([]byte, []int) { + return file_common_types_protobuf_proto_rawDescGZIP(), []int{0} +} -func (m *AddressProto) GetAddress() []byte { - if m != nil { - return m.Address +func (x *AddressProto) GetAddress() []byte { + if x != nil { + return x.Address } return nil } type HashProto struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HashProto) Reset() { *m = HashProto{} } -func (m *HashProto) String() string { return proto.CompactTextString(m) } -func (*HashProto) ProtoMessage() {} -func (*HashProto) Descriptor() ([]byte, []int) { - return fileDescriptor_283a3be7ca5abadb, []int{1} + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` } -func (m *HashProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HashProto.Unmarshal(m, b) -} -func (m *HashProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HashProto.Marshal(b, m, deterministic) -} -func (m *HashProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashProto.Merge(m, src) +func (x *HashProto) Reset() { + *x = HashProto{} + if protoimpl.UnsafeEnabled { + mi := &file_common_types_protobuf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HashProto) XXX_Size() int { - return xxx_messageInfo_HashProto.Size(m) + +func (x *HashProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HashProto) XXX_DiscardUnknown() { - xxx_messageInfo_HashProto.DiscardUnknown(m) + +func (*HashProto) ProtoMessage() {} + +func (x *HashProto) ProtoReflect() protoreflect.Message { + mi := &file_common_types_protobuf_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HashProto proto.InternalMessageInfo +// Deprecated: Use HashProto.ProtoReflect.Descriptor instead. +func (*HashProto) Descriptor() ([]byte, []int) { + return file_common_types_protobuf_proto_rawDescGZIP(), []int{1} +} -func (m *HashProto) GetHash() []byte { - if m != nil { - return m.Hash +func (x *HashProto) GetHash() []byte { + if x != nil { + return x.Hash } return nil } type HashHeightProto struct { - Hash *HashProto `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HashHeightProto) Reset() { *m = HashHeightProto{} } -func (m *HashHeightProto) String() string { return proto.CompactTextString(m) } -func (*HashHeightProto) ProtoMessage() {} -func (*HashHeightProto) Descriptor() ([]byte, []int) { - return fileDescriptor_283a3be7ca5abadb, []int{2} + Hash *HashProto `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` } -func (m *HashHeightProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HashHeightProto.Unmarshal(m, b) -} -func (m *HashHeightProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HashHeightProto.Marshal(b, m, deterministic) -} -func (m *HashHeightProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashHeightProto.Merge(m, src) +func (x *HashHeightProto) Reset() { + *x = HashHeightProto{} + if protoimpl.UnsafeEnabled { + mi := &file_common_types_protobuf_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HashHeightProto) XXX_Size() int { - return xxx_messageInfo_HashHeightProto.Size(m) + +func (x *HashHeightProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HashHeightProto) XXX_DiscardUnknown() { - xxx_messageInfo_HashHeightProto.DiscardUnknown(m) + +func (*HashHeightProto) ProtoMessage() {} + +func (x *HashHeightProto) ProtoReflect() protoreflect.Message { + mi := &file_common_types_protobuf_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HashHeightProto proto.InternalMessageInfo +// Deprecated: Use HashHeightProto.ProtoReflect.Descriptor instead. +func (*HashHeightProto) Descriptor() ([]byte, []int) { + return file_common_types_protobuf_proto_rawDescGZIP(), []int{2} +} -func (m *HashHeightProto) GetHash() *HashProto { - if m != nil { - return m.Hash +func (x *HashHeightProto) GetHash() *HashProto { + if x != nil { + return x.Hash } return nil } -func (m *HashHeightProto) GetHeight() uint64 { - if m != nil { - return m.Height +func (x *HashHeightProto) GetHeight() uint64 { + if x != nil { + return x.Height } return 0 } type AccountHeaderProto struct { - Address *AddressProto `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - HashHeight *HashHeightProto `protobuf:"bytes,2,opt,name=hashHeight,proto3" json:"hashHeight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *AccountHeaderProto) Reset() { *m = AccountHeaderProto{} } -func (m *AccountHeaderProto) String() string { return proto.CompactTextString(m) } -func (*AccountHeaderProto) ProtoMessage() {} -func (*AccountHeaderProto) Descriptor() ([]byte, []int) { - return fileDescriptor_283a3be7ca5abadb, []int{3} + Address *AddressProto `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + HashHeight *HashHeightProto `protobuf:"bytes,2,opt,name=hashHeight,proto3" json:"hashHeight,omitempty"` } -func (m *AccountHeaderProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountHeaderProto.Unmarshal(m, b) -} -func (m *AccountHeaderProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountHeaderProto.Marshal(b, m, deterministic) -} -func (m *AccountHeaderProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountHeaderProto.Merge(m, src) +func (x *AccountHeaderProto) Reset() { + *x = AccountHeaderProto{} + if protoimpl.UnsafeEnabled { + mi := &file_common_types_protobuf_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AccountHeaderProto) XXX_Size() int { - return xxx_messageInfo_AccountHeaderProto.Size(m) + +func (x *AccountHeaderProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AccountHeaderProto) XXX_DiscardUnknown() { - xxx_messageInfo_AccountHeaderProto.DiscardUnknown(m) + +func (*AccountHeaderProto) ProtoMessage() {} + +func (x *AccountHeaderProto) ProtoReflect() protoreflect.Message { + mi := &file_common_types_protobuf_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AccountHeaderProto proto.InternalMessageInfo +// Deprecated: Use AccountHeaderProto.ProtoReflect.Descriptor instead. +func (*AccountHeaderProto) Descriptor() ([]byte, []int) { + return file_common_types_protobuf_proto_rawDescGZIP(), []int{3} +} -func (m *AccountHeaderProto) GetAddress() *AddressProto { - if m != nil { - return m.Address +func (x *AccountHeaderProto) GetAddress() *AddressProto { + if x != nil { + return x.Address } return nil } -func (m *AccountHeaderProto) GetHashHeight() *HashHeightProto { - if m != nil { - return m.HashHeight +func (x *AccountHeaderProto) GetHashHeight() *HashHeightProto { + if x != nil { + return x.HashHeight } return nil } -func init() { - proto.RegisterType((*AddressProto)(nil), "types.AddressProto") - proto.RegisterType((*HashProto)(nil), "types.HashProto") - proto.RegisterType((*HashHeightProto)(nil), "types.HashHeightProto") - proto.RegisterType((*AccountHeaderProto)(nil), "types.AccountHeaderProto") -} - -func init() { proto.RegisterFile("common/types/protobuf.proto", fileDescriptor_283a3be7ca5abadb) } - -var fileDescriptor_283a3be7ca5abadb = []byte{ - // 205 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xce, 0xcf, 0xcd, - 0xcd, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, - 0x4d, 0xd3, 0x03, 0x33, 0x84, 0x58, 0xc1, 0xa2, 0x4a, 0x1a, 0x5c, 0x3c, 0x8e, 0x29, 0x29, 0x45, - 0xa9, 0xc5, 0xc5, 0x01, 0x60, 0x61, 0x09, 0x2e, 0xf6, 0x44, 0x08, 0x5f, 0x82, 0x51, 0x81, 0x51, - 0x83, 0x27, 0x08, 0xc6, 0x55, 0x92, 0xe7, 0xe2, 0xf4, 0x48, 0x2c, 0xce, 0x80, 0x28, 0x13, 0xe2, - 0x62, 0xc9, 0x48, 0x2c, 0xce, 0x80, 0xaa, 0x01, 0xb3, 0x95, 0xfc, 0xb9, 0xf8, 0x41, 0x0a, 0x3c, - 0x52, 0x33, 0xd3, 0x33, 0x4a, 0x20, 0xca, 0x54, 0x90, 0x94, 0x71, 0x1b, 0x09, 0xe8, 0x81, 0xed, - 0xd4, 0x83, 0x1b, 0x03, 0xd1, 0x28, 0x24, 0xc6, 0xc5, 0x96, 0x01, 0xd6, 0x24, 0xc1, 0xa4, 0xc0, - 0xa8, 0xc1, 0x12, 0x04, 0xe5, 0x29, 0x55, 0x73, 0x09, 0x39, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, - 0x78, 0xa4, 0x26, 0xa6, 0xa4, 0x16, 0x41, 0xcc, 0xd4, 0x45, 0x75, 0x21, 0xb7, 0x91, 0x30, 0xd4, - 0x58, 0x64, 0x7f, 0xc0, 0x9d, 0x2d, 0x64, 0xc6, 0xc5, 0x95, 0x01, 0x77, 0x15, 0xd8, 0x02, 0x6e, - 0x23, 0x31, 0x24, 0x87, 0x20, 0x39, 0x37, 0x08, 0x49, 0x65, 0x12, 0x1b, 0x38, 0x98, 0x8c, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x97, 0x1a, 0x1e, 0x98, 0x45, 0x01, 0x00, 0x00, +var File_common_types_protobuf_proto protoreflect.FileDescriptor + +var file_common_types_protobuf_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1f, + 0x0a, 0x09, 0x48, 0x61, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, + 0x4f, 0x0a, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x22, 0x7b, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x30, 0x5a, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x65, 0x6e, 0x6f, + 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x67, 0x6f, 0x2d, 0x7a, 0x65, 0x6e, + 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_common_types_protobuf_proto_rawDescOnce sync.Once + file_common_types_protobuf_proto_rawDescData = file_common_types_protobuf_proto_rawDesc +) + +func file_common_types_protobuf_proto_rawDescGZIP() []byte { + file_common_types_protobuf_proto_rawDescOnce.Do(func() { + file_common_types_protobuf_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_types_protobuf_proto_rawDescData) + }) + return file_common_types_protobuf_proto_rawDescData +} + +var file_common_types_protobuf_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_common_types_protobuf_proto_goTypes = []interface{}{ + (*AddressProto)(nil), // 0: types.AddressProto + (*HashProto)(nil), // 1: types.HashProto + (*HashHeightProto)(nil), // 2: types.HashHeightProto + (*AccountHeaderProto)(nil), // 3: types.AccountHeaderProto +} +var file_common_types_protobuf_proto_depIdxs = []int32{ + 1, // 0: types.HashHeightProto.hash:type_name -> types.HashProto + 0, // 1: types.AccountHeaderProto.address:type_name -> types.AddressProto + 2, // 2: types.AccountHeaderProto.hashHeight:type_name -> types.HashHeightProto + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_common_types_protobuf_proto_init() } +func file_common_types_protobuf_proto_init() { + if File_common_types_protobuf_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_common_types_protobuf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddressProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_types_protobuf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_types_protobuf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashHeightProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_types_protobuf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountHeaderProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_common_types_protobuf_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_common_types_protobuf_proto_goTypes, + DependencyIndexes: file_common_types_protobuf_proto_depIdxs, + MessageInfos: file_common_types_protobuf_proto_msgTypes, + }.Build() + File_common_types_protobuf_proto = out.File + file_common_types_protobuf_proto_rawDesc = nil + file_common_types_protobuf_proto_goTypes = nil + file_common_types_protobuf_proto_depIdxs = nil } diff --git a/common/types/protobuf.proto b/common/types/protobuf.proto index a5fabbe..a6bc7ec 100644 --- a/common/types/protobuf.proto +++ b/common/types/protobuf.proto @@ -1,5 +1,6 @@ syntax = "proto3"; package types; +option go_package = "github.com/zenon-network/go-zenon/common/types"; message AddressProto { bytes address = 1; diff --git a/consensus/storage/election_data.go b/consensus/storage/election_data.go index e13cc4c..ac39ae3 100644 --- a/consensus/storage/election_data.go +++ b/consensus/storage/election_data.go @@ -3,7 +3,7 @@ package storage import ( "math/big" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "github.com/zenon-network/go-zenon/common/types" ) diff --git a/consensus/storage/election_data.pb.go b/consensus/storage/election_data.pb.go index 868bea8..db111d6 100644 --- a/consensus/storage/election_data.pb.go +++ b/consensus/storage/election_data.pb.go @@ -1,149 +1,243 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.22.3 // source: consensus/storage/election_data.proto package storage import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type PillarDelegationProto struct { - ProducingAddress []byte `protobuf:"bytes,1,opt,name=producingAddress,proto3" json:"producingAddress,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Weight []byte `protobuf:"bytes,3,opt,name=weight,proto3" json:"weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PillarDelegationProto) Reset() { *m = PillarDelegationProto{} } -func (m *PillarDelegationProto) String() string { return proto.CompactTextString(m) } -func (*PillarDelegationProto) ProtoMessage() {} -func (*PillarDelegationProto) Descriptor() ([]byte, []int) { - return fileDescriptor_163f9f85a46af540, []int{0} + ProducingAddress []byte `protobuf:"bytes,1,opt,name=producingAddress,proto3" json:"producingAddress,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Weight []byte `protobuf:"bytes,3,opt,name=weight,proto3" json:"weight,omitempty"` } -func (m *PillarDelegationProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PillarDelegationProto.Unmarshal(m, b) -} -func (m *PillarDelegationProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PillarDelegationProto.Marshal(b, m, deterministic) -} -func (m *PillarDelegationProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_PillarDelegationProto.Merge(m, src) +func (x *PillarDelegationProto) Reset() { + *x = PillarDelegationProto{} + if protoimpl.UnsafeEnabled { + mi := &file_consensus_storage_election_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PillarDelegationProto) XXX_Size() int { - return xxx_messageInfo_PillarDelegationProto.Size(m) + +func (x *PillarDelegationProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PillarDelegationProto) XXX_DiscardUnknown() { - xxx_messageInfo_PillarDelegationProto.DiscardUnknown(m) + +func (*PillarDelegationProto) ProtoMessage() {} + +func (x *PillarDelegationProto) ProtoReflect() protoreflect.Message { + mi := &file_consensus_storage_election_data_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PillarDelegationProto proto.InternalMessageInfo +// Deprecated: Use PillarDelegationProto.ProtoReflect.Descriptor instead. +func (*PillarDelegationProto) Descriptor() ([]byte, []int) { + return file_consensus_storage_election_data_proto_rawDescGZIP(), []int{0} +} -func (m *PillarDelegationProto) GetProducingAddress() []byte { - if m != nil { - return m.ProducingAddress +func (x *PillarDelegationProto) GetProducingAddress() []byte { + if x != nil { + return x.ProducingAddress } return nil } -func (m *PillarDelegationProto) GetName() string { - if m != nil { - return m.Name +func (x *PillarDelegationProto) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *PillarDelegationProto) GetWeight() []byte { - if m != nil { - return m.Weight +func (x *PillarDelegationProto) GetWeight() []byte { + if x != nil { + return x.Weight } return nil } type ElectionDataProto struct { - Producers [][]byte `protobuf:"bytes,1,rep,name=producers,proto3" json:"producers,omitempty"` - Delegations []*PillarDelegationProto `protobuf:"bytes,2,rep,name=delegations,proto3" json:"delegations,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ElectionDataProto) Reset() { *m = ElectionDataProto{} } -func (m *ElectionDataProto) String() string { return proto.CompactTextString(m) } -func (*ElectionDataProto) ProtoMessage() {} -func (*ElectionDataProto) Descriptor() ([]byte, []int) { - return fileDescriptor_163f9f85a46af540, []int{1} + Producers [][]byte `protobuf:"bytes,1,rep,name=producers,proto3" json:"producers,omitempty"` + Delegations []*PillarDelegationProto `protobuf:"bytes,2,rep,name=delegations,proto3" json:"delegations,omitempty"` } -func (m *ElectionDataProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ElectionDataProto.Unmarshal(m, b) -} -func (m *ElectionDataProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ElectionDataProto.Marshal(b, m, deterministic) -} -func (m *ElectionDataProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_ElectionDataProto.Merge(m, src) +func (x *ElectionDataProto) Reset() { + *x = ElectionDataProto{} + if protoimpl.UnsafeEnabled { + mi := &file_consensus_storage_election_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ElectionDataProto) XXX_Size() int { - return xxx_messageInfo_ElectionDataProto.Size(m) + +func (x *ElectionDataProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ElectionDataProto) XXX_DiscardUnknown() { - xxx_messageInfo_ElectionDataProto.DiscardUnknown(m) + +func (*ElectionDataProto) ProtoMessage() {} + +func (x *ElectionDataProto) ProtoReflect() protoreflect.Message { + mi := &file_consensus_storage_election_data_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ElectionDataProto proto.InternalMessageInfo +// Deprecated: Use ElectionDataProto.ProtoReflect.Descriptor instead. +func (*ElectionDataProto) Descriptor() ([]byte, []int) { + return file_consensus_storage_election_data_proto_rawDescGZIP(), []int{1} +} -func (m *ElectionDataProto) GetProducers() [][]byte { - if m != nil { - return m.Producers +func (x *ElectionDataProto) GetProducers() [][]byte { + if x != nil { + return x.Producers } return nil } -func (m *ElectionDataProto) GetDelegations() []*PillarDelegationProto { - if m != nil { - return m.Delegations +func (x *ElectionDataProto) GetDelegations() []*PillarDelegationProto { + if x != nil { + return x.Delegations } return nil } -func init() { - proto.RegisterType((*PillarDelegationProto)(nil), "storage.PillarDelegationProto") - proto.RegisterType((*ElectionDataProto)(nil), "storage.ElectionDataProto") +var File_consensus_storage_election_data_proto protoreflect.FileDescriptor + +var file_consensus_storage_election_data_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x22, 0x6f, 0x0a, 0x15, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x73, 0x0a, 0x11, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x65, 0x6e, 0x6f, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x67, 0x6f, 0x2d, 0x7a, 0x65, 0x6e, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_consensus_storage_election_data_proto_rawDescOnce sync.Once + file_consensus_storage_election_data_proto_rawDescData = file_consensus_storage_election_data_proto_rawDesc +) + +func file_consensus_storage_election_data_proto_rawDescGZIP() []byte { + file_consensus_storage_election_data_proto_rawDescOnce.Do(func() { + file_consensus_storage_election_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_consensus_storage_election_data_proto_rawDescData) + }) + return file_consensus_storage_election_data_proto_rawDescData } -func init() { - proto.RegisterFile("consensus/storage/election_data.proto", fileDescriptor_163f9f85a46af540) +var file_consensus_storage_election_data_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_consensus_storage_election_data_proto_goTypes = []interface{}{ + (*PillarDelegationProto)(nil), // 0: storage.PillarDelegationProto + (*ElectionDataProto)(nil), // 1: storage.ElectionDataProto +} +var file_consensus_storage_election_data_proto_depIdxs = []int32{ + 0, // 0: storage.ElectionDataProto.delegations:type_name -> storage.PillarDelegationProto + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } -var fileDescriptor_163f9f85a46af540 = []byte{ - // 207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x4f, 0xd1, 0x4a, 0x03, 0x31, - 0x10, 0xe4, 0x7a, 0x52, 0xe9, 0xb6, 0x0f, 0x1a, 0x50, 0xf2, 0x20, 0x72, 0x14, 0x84, 0xe0, 0xc3, - 0x15, 0xf4, 0x07, 0x14, 0xea, 0x7b, 0xc9, 0x0f, 0xc8, 0x7a, 0x59, 0x62, 0x20, 0x26, 0x47, 0x36, - 0x87, 0xbf, 0x2f, 0x97, 0x0b, 0x2a, 0xe8, 0xdb, 0xee, 0xec, 0xcc, 0xce, 0x0c, 0xdc, 0x0d, 0x31, - 0x30, 0x05, 0x9e, 0xf8, 0xc0, 0x39, 0x26, 0xb4, 0x74, 0x20, 0x4f, 0x43, 0x76, 0x31, 0xbc, 0x1a, - 0xcc, 0xd8, 0x8f, 0x29, 0xe6, 0x28, 0xce, 0xeb, 0x71, 0x1f, 0xe1, 0xea, 0xe4, 0xbc, 0xc7, 0x74, - 0x24, 0x4f, 0x16, 0x67, 0xde, 0xa9, 0x30, 0xee, 0xe1, 0x62, 0x4c, 0xd1, 0x4c, 0x83, 0x0b, 0xf6, - 0xd9, 0x98, 0x44, 0xcc, 0xb2, 0xe9, 0x1a, 0xb5, 0xd3, 0x7f, 0x70, 0x21, 0xe0, 0x2c, 0xe0, 0x07, - 0xc9, 0x55, 0xd7, 0xa8, 0x8d, 0x2e, 0xb3, 0xb8, 0x86, 0xf5, 0x27, 0x39, 0xfb, 0x9e, 0x65, 0x5b, - 0x54, 0x75, 0xdb, 0x33, 0x5c, 0xbe, 0xd4, 0x40, 0x47, 0xcc, 0xb8, 0x98, 0xdd, 0xc0, 0x66, 0x79, - 0x4a, 0x69, 0x76, 0x69, 0xd5, 0x4e, 0xff, 0x00, 0xe2, 0x09, 0xb6, 0xe6, 0x3b, 0x1d, 0xcb, 0x55, - 0xd7, 0xaa, 0xed, 0xc3, 0x6d, 0x5f, 0x2b, 0xf4, 0xff, 0xe6, 0xd7, 0xbf, 0x25, 0x6f, 0xeb, 0xd2, - 0xfa, 0xf1, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x1c, 0x6f, 0xd4, 0x1e, 0x01, 0x00, 0x00, +func init() { file_consensus_storage_election_data_proto_init() } +func file_consensus_storage_election_data_proto_init() { + if File_consensus_storage_election_data_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_consensus_storage_election_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PillarDelegationProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_consensus_storage_election_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ElectionDataProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_consensus_storage_election_data_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_consensus_storage_election_data_proto_goTypes, + DependencyIndexes: file_consensus_storage_election_data_proto_depIdxs, + MessageInfos: file_consensus_storage_election_data_proto_msgTypes, + }.Build() + File_consensus_storage_election_data_proto = out.File + file_consensus_storage_election_data_proto_rawDesc = nil + file_consensus_storage_election_data_proto_goTypes = nil + file_consensus_storage_election_data_proto_depIdxs = nil } diff --git a/consensus/storage/election_data.proto b/consensus/storage/election_data.proto index 8e2348c..2e1b9a1 100644 --- a/consensus/storage/election_data.proto +++ b/consensus/storage/election_data.proto @@ -1,5 +1,6 @@ syntax = "proto3"; package storage; +option go_package = "github.com/zenon-network/go-zenon/consensus/storage"; message PillarDelegationProto { bytes producingAddress = 1; diff --git a/consensus/storage/point.go b/consensus/storage/point.go index 8a619cc..e369835 100644 --- a/consensus/storage/point.go +++ b/consensus/storage/point.go @@ -4,8 +4,8 @@ import ( "encoding/json" "math/big" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "github.com/zenon-network/go-zenon/common/types" ) diff --git a/consensus/storage/point.pb.go b/consensus/storage/point.pb.go index 214de09..8de18db 100644 --- a/consensus/storage/point.pb.go +++ b/consensus/storage/point.pb.go @@ -1,174 +1,271 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.22.3 // source: consensus/storage/point.proto package storage import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ProducerDetailProto struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - FactualNum uint32 `protobuf:"fixed32,2,opt,name=factualNum,proto3" json:"factualNum,omitempty"` - ExpectedNum uint32 `protobuf:"fixed32,3,opt,name=expectedNum,proto3" json:"expectedNum,omitempty"` - Weight []byte `protobuf:"bytes,4,opt,name=weight,proto3" json:"weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ProducerDetailProto) Reset() { *m = ProducerDetailProto{} } -func (m *ProducerDetailProto) String() string { return proto.CompactTextString(m) } -func (*ProducerDetailProto) ProtoMessage() {} -func (*ProducerDetailProto) Descriptor() ([]byte, []int) { - return fileDescriptor_8c67e21f5180c21b, []int{0} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ProducerDetailProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProducerDetailProto.Unmarshal(m, b) -} -func (m *ProducerDetailProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProducerDetailProto.Marshal(b, m, deterministic) + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + FactualNum uint32 `protobuf:"fixed32,2,opt,name=factualNum,proto3" json:"factualNum,omitempty"` + ExpectedNum uint32 `protobuf:"fixed32,3,opt,name=expectedNum,proto3" json:"expectedNum,omitempty"` + Weight []byte `protobuf:"bytes,4,opt,name=weight,proto3" json:"weight,omitempty"` } -func (m *ProducerDetailProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProducerDetailProto.Merge(m, src) + +func (x *ProducerDetailProto) Reset() { + *x = ProducerDetailProto{} + if protoimpl.UnsafeEnabled { + mi := &file_consensus_storage_point_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ProducerDetailProto) XXX_Size() int { - return xxx_messageInfo_ProducerDetailProto.Size(m) + +func (x *ProducerDetailProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ProducerDetailProto) XXX_DiscardUnknown() { - xxx_messageInfo_ProducerDetailProto.DiscardUnknown(m) + +func (*ProducerDetailProto) ProtoMessage() {} + +func (x *ProducerDetailProto) ProtoReflect() protoreflect.Message { + mi := &file_consensus_storage_point_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ProducerDetailProto proto.InternalMessageInfo +// Deprecated: Use ProducerDetailProto.ProtoReflect.Descriptor instead. +func (*ProducerDetailProto) Descriptor() ([]byte, []int) { + return file_consensus_storage_point_proto_rawDescGZIP(), []int{0} +} -func (m *ProducerDetailProto) GetName() string { - if m != nil { - return m.Name +func (x *ProducerDetailProto) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *ProducerDetailProto) GetFactualNum() uint32 { - if m != nil { - return m.FactualNum +func (x *ProducerDetailProto) GetFactualNum() uint32 { + if x != nil { + return x.FactualNum } return 0 } -func (m *ProducerDetailProto) GetExpectedNum() uint32 { - if m != nil { - return m.ExpectedNum +func (x *ProducerDetailProto) GetExpectedNum() uint32 { + if x != nil { + return x.ExpectedNum } return 0 } -func (m *ProducerDetailProto) GetWeight() []byte { - if m != nil { - return m.Weight +func (x *ProducerDetailProto) GetWeight() []byte { + if x != nil { + return x.Weight } return nil } type ConsensusPointProto struct { - PrevHash []byte `protobuf:"bytes,1,opt,name=prevHash,proto3" json:"prevHash,omitempty"` - EndHash []byte `protobuf:"bytes,2,opt,name=endHash,proto3" json:"endHash,omitempty"` - TotalWeight []byte `protobuf:"bytes,3,opt,name=totalWeight,proto3" json:"totalWeight,omitempty"` - Content []*ProducerDetailProto `protobuf:"bytes,4,rep,name=content,proto3" json:"content,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConsensusPointProto) Reset() { *m = ConsensusPointProto{} } -func (m *ConsensusPointProto) String() string { return proto.CompactTextString(m) } -func (*ConsensusPointProto) ProtoMessage() {} -func (*ConsensusPointProto) Descriptor() ([]byte, []int) { - return fileDescriptor_8c67e21f5180c21b, []int{1} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ConsensusPointProto) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ConsensusPointProto.Unmarshal(m, b) -} -func (m *ConsensusPointProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ConsensusPointProto.Marshal(b, m, deterministic) + PrevHash []byte `protobuf:"bytes,1,opt,name=prevHash,proto3" json:"prevHash,omitempty"` + EndHash []byte `protobuf:"bytes,2,opt,name=endHash,proto3" json:"endHash,omitempty"` + TotalWeight []byte `protobuf:"bytes,3,opt,name=totalWeight,proto3" json:"totalWeight,omitempty"` + Content []*ProducerDetailProto `protobuf:"bytes,4,rep,name=content,proto3" json:"content,omitempty"` } -func (m *ConsensusPointProto) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusPointProto.Merge(m, src) + +func (x *ConsensusPointProto) Reset() { + *x = ConsensusPointProto{} + if protoimpl.UnsafeEnabled { + mi := &file_consensus_storage_point_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ConsensusPointProto) XXX_Size() int { - return xxx_messageInfo_ConsensusPointProto.Size(m) + +func (x *ConsensusPointProto) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ConsensusPointProto) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusPointProto.DiscardUnknown(m) + +func (*ConsensusPointProto) ProtoMessage() {} + +func (x *ConsensusPointProto) ProtoReflect() protoreflect.Message { + mi := &file_consensus_storage_point_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ConsensusPointProto proto.InternalMessageInfo +// Deprecated: Use ConsensusPointProto.ProtoReflect.Descriptor instead. +func (*ConsensusPointProto) Descriptor() ([]byte, []int) { + return file_consensus_storage_point_proto_rawDescGZIP(), []int{1} +} -func (m *ConsensusPointProto) GetPrevHash() []byte { - if m != nil { - return m.PrevHash +func (x *ConsensusPointProto) GetPrevHash() []byte { + if x != nil { + return x.PrevHash } return nil } -func (m *ConsensusPointProto) GetEndHash() []byte { - if m != nil { - return m.EndHash +func (x *ConsensusPointProto) GetEndHash() []byte { + if x != nil { + return x.EndHash } return nil } -func (m *ConsensusPointProto) GetTotalWeight() []byte { - if m != nil { - return m.TotalWeight +func (x *ConsensusPointProto) GetTotalWeight() []byte { + if x != nil { + return x.TotalWeight } return nil } -func (m *ConsensusPointProto) GetContent() []*ProducerDetailProto { - if m != nil { - return m.Content +func (x *ConsensusPointProto) GetContent() []*ProducerDetailProto { + if x != nil { + return x.Content } return nil } -func init() { - proto.RegisterType((*ProducerDetailProto)(nil), "storage.ProducerDetailProto") - proto.RegisterType((*ConsensusPointProto)(nil), "storage.ConsensusPointProto") -} - -func init() { proto.RegisterFile("consensus/storage/point.proto", fileDescriptor_8c67e21f5180c21b) } - -var fileDescriptor_8c67e21f5180c21b = []byte{ - // 242 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xcf, 0x4a, 0xc3, 0x40, - 0x10, 0xc6, 0xd9, 0xa6, 0x34, 0x3a, 0xed, 0x69, 0x0b, 0x12, 0x44, 0x25, 0xf4, 0x94, 0x53, 0x0a, - 0x0a, 0xbe, 0x80, 0x1e, 0x3c, 0x49, 0xd8, 0x8b, 0xe7, 0x75, 0x33, 0xb6, 0x81, 0x74, 0x37, 0xec, - 0x4e, 0xd4, 0xbb, 0xcf, 0xe2, 0x7b, 0xca, 0x4e, 0x12, 0xc9, 0xa1, 0xb7, 0xf9, 0xfe, 0xc0, 0xfc, - 0xf8, 0xe0, 0xd6, 0x38, 0x1b, 0xd0, 0x86, 0x3e, 0xec, 0x03, 0x39, 0xaf, 0x0f, 0xb8, 0xef, 0x5c, - 0x63, 0xa9, 0xec, 0xbc, 0x23, 0x27, 0xd3, 0xd1, 0xdc, 0xfd, 0x08, 0xd8, 0x56, 0xde, 0xd5, 0xbd, - 0x41, 0xff, 0x8c, 0xa4, 0x9b, 0xb6, 0xe2, 0x82, 0x84, 0xa5, 0xd5, 0x27, 0xcc, 0x44, 0x2e, 0x8a, - 0x4b, 0xc5, 0xb7, 0xbc, 0x03, 0xf8, 0xd0, 0x86, 0x7a, 0xdd, 0xbe, 0xf6, 0xa7, 0x6c, 0x91, 0x8b, - 0x22, 0x55, 0x33, 0x47, 0xe6, 0xb0, 0xc6, 0xef, 0x0e, 0x0d, 0x61, 0x1d, 0x0b, 0x09, 0x17, 0xe6, - 0x96, 0xbc, 0x82, 0xd5, 0x17, 0x36, 0x87, 0x23, 0x65, 0xcb, 0x5c, 0x14, 0x1b, 0x35, 0xaa, 0xdd, - 0xaf, 0x80, 0xed, 0xd3, 0x04, 0x5c, 0x45, 0xce, 0x81, 0xe2, 0x1a, 0x2e, 0x3a, 0x8f, 0x9f, 0x2f, - 0x3a, 0x1c, 0x99, 0x64, 0xa3, 0xfe, 0xb5, 0xcc, 0x20, 0x45, 0x5b, 0x73, 0xb4, 0xe0, 0x68, 0x92, - 0x91, 0x83, 0x1c, 0xe9, 0xf6, 0x6d, 0x78, 0x95, 0x70, 0x3a, 0xb7, 0xe4, 0x23, 0xa4, 0xc6, 0x59, - 0x42, 0x1b, 0x41, 0x92, 0x62, 0x7d, 0x7f, 0x53, 0x8e, 0x83, 0x94, 0x67, 0xc6, 0x50, 0x53, 0xf9, - 0x7d, 0xc5, 0xeb, 0x3d, 0xfc, 0x05, 0x00, 0x00, 0xff, 0xff, 0xea, 0x53, 0xf2, 0xe9, 0x5e, 0x01, - 0x00, 0x00, +var File_consensus_storage_point_proto protoreflect.FileDescriptor + +var file_consensus_storage_point_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x4e, + 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0a, 0x66, 0x61, 0x63, 0x74, 0x75, 0x61, + 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xa5, + 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x76, 0x48, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x65, 0x76, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x36, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x65, 0x6e, 0x6f, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x67, 0x6f, 0x2d, 0x7a, 0x65, 0x6e, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_consensus_storage_point_proto_rawDescOnce sync.Once + file_consensus_storage_point_proto_rawDescData = file_consensus_storage_point_proto_rawDesc +) + +func file_consensus_storage_point_proto_rawDescGZIP() []byte { + file_consensus_storage_point_proto_rawDescOnce.Do(func() { + file_consensus_storage_point_proto_rawDescData = protoimpl.X.CompressGZIP(file_consensus_storage_point_proto_rawDescData) + }) + return file_consensus_storage_point_proto_rawDescData +} + +var file_consensus_storage_point_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_consensus_storage_point_proto_goTypes = []interface{}{ + (*ProducerDetailProto)(nil), // 0: storage.ProducerDetailProto + (*ConsensusPointProto)(nil), // 1: storage.ConsensusPointProto +} +var file_consensus_storage_point_proto_depIdxs = []int32{ + 0, // 0: storage.ConsensusPointProto.content:type_name -> storage.ProducerDetailProto + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_consensus_storage_point_proto_init() } +func file_consensus_storage_point_proto_init() { + if File_consensus_storage_point_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_consensus_storage_point_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProducerDetailProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_consensus_storage_point_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConsensusPointProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_consensus_storage_point_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_consensus_storage_point_proto_goTypes, + DependencyIndexes: file_consensus_storage_point_proto_depIdxs, + MessageInfos: file_consensus_storage_point_proto_msgTypes, + }.Build() + File_consensus_storage_point_proto = out.File + file_consensus_storage_point_proto_rawDesc = nil + file_consensus_storage_point_proto_goTypes = nil + file_consensus_storage_point_proto_depIdxs = nil } diff --git a/consensus/storage/point.proto b/consensus/storage/point.proto index 00c09ba..892e13f 100644 --- a/consensus/storage/point.proto +++ b/consensus/storage/point.proto @@ -1,5 +1,6 @@ syntax = "proto3"; package storage; +option go_package = "github.com/zenon-network/go-zenon/consensus/storage"; message ProducerDetailProto { string name = 1;