block

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBlock        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlock          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMetaBlock        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetaBlock          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetaBlock = fmt.Errorf("proto: unexpected end of group")
)
View Source
var PeerAction_name = map[int32]string{
	0: "InvalidAction",
	1: "PeerRegistration",
	2: "PeerUnstaking",
	3: "PeerDeregistration",
	4: "PeerJailed",
	5: "PeerUnJailed",
	6: "PeerSlashed",
	7: "PeerReStake",
}
View Source
var PeerAction_value = map[string]int32{
	"InvalidAction":      0,
	"PeerRegistration":   1,
	"PeerUnstaking":      2,
	"PeerDeregistration": 3,
	"PeerJailed":         4,
	"PeerUnJailed":       5,
	"PeerSlashed":        6,
	"PeerReStake":        7,
}
View Source
var Type_name = map[int32]string{
	0:   "TxBlock",
	30:  "StateBlock",
	60:  "PeerBlock",
	90:  "SmartContractResultBlock",
	120: "InvalidBlock",
	150: "ReceiptBlock",
	255: "RewardsBlock",
}
View Source
var Type_value = map[string]int32{
	"TxBlock":                  0,
	"StateBlock":               30,
	"PeerBlock":                60,
	"SmartContractResultBlock": 90,
	"InvalidBlock":             120,
	"ReceiptBlock":             150,
	"RewardsBlock":             255,
}

Functions

This section is empty.

Types

type Body

type Body struct {
	MiniBlocks []*MiniBlock `protobuf:"bytes,1,rep,name=MiniBlocks,proto3" json:"MiniBlocks,omitempty"`
}

func (*Body) Clone

func (b *Body) Clone() data.BodyHandler

Clone returns a clone of the object

func (*Body) Descriptor

func (*Body) Descriptor() ([]byte, []int)

func (*Body) Equal

func (this *Body) Equal(that interface{}) bool

func (*Body) GetMiniBlocks

func (m *Body) GetMiniBlocks() []*MiniBlock

func (*Body) GoString

func (this *Body) GoString() string

func (*Body) IntegrityAndValidity

func (b *Body) IntegrityAndValidity() error

IntegrityAndValidity checks if data is valid

func (*Body) IsInterfaceNil

func (b *Body) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*Body) Marshal

func (m *Body) Marshal() (dAtA []byte, err error)

func (*Body) MarshalTo

func (m *Body) MarshalTo(dAtA []byte) (int, error)

func (*Body) MarshalToSizedBuffer

func (m *Body) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Body) ProtoMessage

func (*Body) ProtoMessage()

func (*Body) Reset

func (m *Body) Reset()

func (*Body) Size

func (m *Body) Size() (n int)

func (*Body) String

func (this *Body) String() string

func (*Body) Unmarshal

func (m *Body) Unmarshal(dAtA []byte) error

func (*Body) XXX_DiscardUnknown

func (m *Body) XXX_DiscardUnknown()

func (*Body) XXX_Marshal

func (m *Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Body) XXX_Merge

func (m *Body) XXX_Merge(src proto.Message)

func (*Body) XXX_Size

func (m *Body) XXX_Size() int

func (*Body) XXX_Unmarshal

func (m *Body) XXX_Unmarshal(b []byte) error

type BodyHeaderPair

type BodyHeaderPair struct {
	Body   []byte `protobuf:"bytes,1,opt,name=Body,proto3" json:"Body,omitempty"`
	Header []byte `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"`
}

BodyHeaderPair holds a body and header hash pair

func (*BodyHeaderPair) Descriptor

func (*BodyHeaderPair) Descriptor() ([]byte, []int)

func (*BodyHeaderPair) Equal

func (this *BodyHeaderPair) Equal(that interface{}) bool

func (*BodyHeaderPair) GetBody

func (m *BodyHeaderPair) GetBody() []byte

func (*BodyHeaderPair) GetHeader

func (m *BodyHeaderPair) GetHeader() []byte

func (*BodyHeaderPair) GoString

func (this *BodyHeaderPair) GoString() string

func (*BodyHeaderPair) Marshal

func (m *BodyHeaderPair) Marshal() (dAtA []byte, err error)

func (*BodyHeaderPair) MarshalTo

func (m *BodyHeaderPair) MarshalTo(dAtA []byte) (int, error)

func (*BodyHeaderPair) MarshalToSizedBuffer

func (m *BodyHeaderPair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BodyHeaderPair) ProtoMessage

func (*BodyHeaderPair) ProtoMessage()

func (*BodyHeaderPair) Reset

func (m *BodyHeaderPair) Reset()

func (*BodyHeaderPair) Size

func (m *BodyHeaderPair) Size() (n int)

func (*BodyHeaderPair) String

func (this *BodyHeaderPair) String() string

func (*BodyHeaderPair) Unmarshal

func (m *BodyHeaderPair) Unmarshal(dAtA []byte) error

func (*BodyHeaderPair) XXX_DiscardUnknown

func (m *BodyHeaderPair) XXX_DiscardUnknown()

func (*BodyHeaderPair) XXX_Marshal

func (m *BodyHeaderPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BodyHeaderPair) XXX_Merge

func (m *BodyHeaderPair) XXX_Merge(src proto.Message)

func (*BodyHeaderPair) XXX_Size

func (m *BodyHeaderPair) XXX_Size() int

func (*BodyHeaderPair) XXX_Unmarshal

func (m *BodyHeaderPair) XXX_Unmarshal(b []byte) error

type Economics

type Economics struct {
	TotalSupply                      *math_big.Int `` /* 154-byte string literal not displayed */
	TotalToDistribute                *math_big.Int `` /* 166-byte string literal not displayed */
	TotalNewlyMinted                 *math_big.Int `` /* 164-byte string literal not displayed */
	RewardsPerBlock                  *math_big.Int `` /* 162-byte string literal not displayed */
	RewardsForProtocolSustainability *math_big.Int `` /* 196-byte string literal not displayed */
	NodePrice                        *math_big.Int `` /* 150-byte string literal not displayed */
	PrevEpochStartRound              uint64        `protobuf:"varint,7,opt,name=PrevEpochStartRound,proto3" json:"PrevEpochStartRound,omitempty"`
	PrevEpochStartHash               []byte        `protobuf:"bytes,8,opt,name=PrevEpochStartHash,proto3" json:"PrevEpochStartHash,omitempty"`
}

Economics holds the block information for total supply and rewards

func (*Economics) Descriptor

func (*Economics) Descriptor() ([]byte, []int)

func (*Economics) Equal

func (this *Economics) Equal(that interface{}) bool

func (*Economics) GetNodePrice

func (m *Economics) GetNodePrice() *math_big.Int

func (*Economics) GetPrevEpochStartHash added in v1.0.102

func (m *Economics) GetPrevEpochStartHash() []byte

func (*Economics) GetPrevEpochStartRound

func (m *Economics) GetPrevEpochStartRound() uint64

func (*Economics) GetRewardsForProtocolSustainability added in v1.0.147

func (m *Economics) GetRewardsForProtocolSustainability() *math_big.Int

func (*Economics) GetRewardsPerBlock added in v1.0.128

func (m *Economics) GetRewardsPerBlock() *math_big.Int

func (*Economics) GetTotalNewlyMinted

func (m *Economics) GetTotalNewlyMinted() *math_big.Int

func (*Economics) GetTotalSupply

func (m *Economics) GetTotalSupply() *math_big.Int

func (*Economics) GetTotalToDistribute

func (m *Economics) GetTotalToDistribute() *math_big.Int

func (*Economics) GoString

func (this *Economics) GoString() string

func (*Economics) Marshal

func (m *Economics) Marshal() (dAtA []byte, err error)

func (*Economics) MarshalTo

func (m *Economics) MarshalTo(dAtA []byte) (int, error)

func (*Economics) MarshalToSizedBuffer

func (m *Economics) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Economics) ProtoMessage

func (*Economics) ProtoMessage()

func (*Economics) Reset

func (m *Economics) Reset()

func (*Economics) Size

func (m *Economics) Size() (n int)

func (*Economics) String

func (this *Economics) String() string

func (*Economics) Unmarshal

func (m *Economics) Unmarshal(dAtA []byte) error

func (*Economics) XXX_DiscardUnknown

func (m *Economics) XXX_DiscardUnknown()

func (*Economics) XXX_Marshal

func (m *Economics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Economics) XXX_Merge

func (m *Economics) XXX_Merge(src proto.Message)

func (*Economics) XXX_Size

func (m *Economics) XXX_Size() int

func (*Economics) XXX_Unmarshal

func (m *Economics) XXX_Unmarshal(b []byte) error

type EpochStart

type EpochStart struct {
	LastFinalizedHeaders []EpochStartShardData `protobuf:"bytes,1,rep,name=LastFinalizedHeaders,proto3" json:"LastFinalizedHeaders"`
	Economics            Economics             `protobuf:"bytes,2,opt,name=Economics,proto3" json:"Economics"`
}

EpochStart holds the block information for end-of-epoch

func (*EpochStart) Descriptor

func (*EpochStart) Descriptor() ([]byte, []int)

func (*EpochStart) Equal

func (this *EpochStart) Equal(that interface{}) bool

func (*EpochStart) GetEconomics

func (m *EpochStart) GetEconomics() Economics

func (*EpochStart) GetLastFinalizedHeaders

func (m *EpochStart) GetLastFinalizedHeaders() []EpochStartShardData

func (*EpochStart) GoString

func (this *EpochStart) GoString() string

func (*EpochStart) Marshal

func (m *EpochStart) Marshal() (dAtA []byte, err error)

func (*EpochStart) MarshalTo

func (m *EpochStart) MarshalTo(dAtA []byte) (int, error)

func (*EpochStart) MarshalToSizedBuffer

func (m *EpochStart) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EpochStart) ProtoMessage

func (*EpochStart) ProtoMessage()

func (*EpochStart) Reset

func (m *EpochStart) Reset()

func (*EpochStart) Size

func (m *EpochStart) Size() (n int)

func (*EpochStart) String

func (this *EpochStart) String() string

func (*EpochStart) Unmarshal

func (m *EpochStart) Unmarshal(dAtA []byte) error

func (*EpochStart) XXX_DiscardUnknown

func (m *EpochStart) XXX_DiscardUnknown()

func (*EpochStart) XXX_Marshal

func (m *EpochStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EpochStart) XXX_Merge

func (m *EpochStart) XXX_Merge(src proto.Message)

func (*EpochStart) XXX_Size

func (m *EpochStart) XXX_Size() int

func (*EpochStart) XXX_Unmarshal

func (m *EpochStart) XXX_Unmarshal(b []byte) error

type EpochStartShardData

type EpochStartShardData struct {
	ShardID                 uint32            `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	Epoch                   uint32            `protobuf:"varint,9,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	Round                   uint64            `protobuf:"varint,7,opt,name=Round,proto3" json:"Round,omitempty"`
	Nonce                   uint64            `protobuf:"varint,8,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	HeaderHash              []byte            `protobuf:"bytes,2,opt,name=HeaderHash,proto3" json:"HeaderHash,omitempty"`
	RootHash                []byte            `protobuf:"bytes,3,opt,name=RootHash,proto3" json:"RootHash,omitempty"`
	FirstPendingMetaBlock   []byte            `protobuf:"bytes,4,opt,name=FirstPendingMetaBlock,proto3" json:"FirstPendingMetaBlock,omitempty"`
	LastFinishedMetaBlock   []byte            `protobuf:"bytes,5,opt,name=LastFinishedMetaBlock,proto3" json:"LastFinishedMetaBlock,omitempty"`
	PendingMiniBlockHeaders []MiniBlockHeader `protobuf:"bytes,6,rep,name=PendingMiniBlockHeaders,proto3" json:"PendingMiniBlockHeaders"`
}

EpochStartShardData hold the last finalized headers hash and state root hash

func (*EpochStartShardData) Descriptor

func (*EpochStartShardData) Descriptor() ([]byte, []int)

func (*EpochStartShardData) Equal

func (this *EpochStartShardData) Equal(that interface{}) bool

func (*EpochStartShardData) GetEpoch added in v1.0.109

func (m *EpochStartShardData) GetEpoch() uint32

func (*EpochStartShardData) GetFirstPendingMetaBlock

func (m *EpochStartShardData) GetFirstPendingMetaBlock() []byte

func (*EpochStartShardData) GetHeaderHash

func (m *EpochStartShardData) GetHeaderHash() []byte

func (*EpochStartShardData) GetLastFinishedMetaBlock

func (m *EpochStartShardData) GetLastFinishedMetaBlock() []byte

func (*EpochStartShardData) GetNonce

func (m *EpochStartShardData) GetNonce() uint64

func (*EpochStartShardData) GetPendingMiniBlockHeaders

func (m *EpochStartShardData) GetPendingMiniBlockHeaders() []MiniBlockHeader

func (*EpochStartShardData) GetRootHash

func (m *EpochStartShardData) GetRootHash() []byte

func (*EpochStartShardData) GetRound

func (m *EpochStartShardData) GetRound() uint64

func (*EpochStartShardData) GetShardID

func (m *EpochStartShardData) GetShardID() uint32

func (*EpochStartShardData) GoString

func (this *EpochStartShardData) GoString() string

func (*EpochStartShardData) Marshal

func (m *EpochStartShardData) Marshal() (dAtA []byte, err error)

func (*EpochStartShardData) MarshalTo

func (m *EpochStartShardData) MarshalTo(dAtA []byte) (int, error)

func (*EpochStartShardData) MarshalToSizedBuffer

func (m *EpochStartShardData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EpochStartShardData) ProtoMessage

func (*EpochStartShardData) ProtoMessage()

func (*EpochStartShardData) Reset

func (m *EpochStartShardData) Reset()

func (*EpochStartShardData) Size

func (m *EpochStartShardData) Size() (n int)

func (*EpochStartShardData) String

func (this *EpochStartShardData) String() string

func (*EpochStartShardData) Unmarshal

func (m *EpochStartShardData) Unmarshal(dAtA []byte) error

func (*EpochStartShardData) XXX_DiscardUnknown

func (m *EpochStartShardData) XXX_DiscardUnknown()

func (*EpochStartShardData) XXX_Marshal

func (m *EpochStartShardData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EpochStartShardData) XXX_Merge

func (m *EpochStartShardData) XXX_Merge(src proto.Message)

func (*EpochStartShardData) XXX_Size

func (m *EpochStartShardData) XXX_Size() int

func (*EpochStartShardData) XXX_Unmarshal

func (m *EpochStartShardData) XXX_Unmarshal(b []byte) error
type Header struct {
	Nonce              uint64            `protobuf:"varint,1,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	PrevHash           []byte            `protobuf:"bytes,2,opt,name=PrevHash,proto3" json:"PrevHash,omitempty"`
	PrevRandSeed       []byte            `protobuf:"bytes,3,opt,name=PrevRandSeed,proto3" json:"PrevRandSeed,omitempty"`
	RandSeed           []byte            `protobuf:"bytes,4,opt,name=RandSeed,proto3" json:"RandSeed,omitempty"`
	PubKeysBitmap      []byte            `protobuf:"bytes,5,opt,name=PubKeysBitmap,proto3" json:"PubKeysBitmap,omitempty"`
	ShardID            uint32            `protobuf:"varint,6,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	TimeStamp          uint64            `protobuf:"varint,7,opt,name=TimeStamp,proto3" json:"TimeStamp,omitempty"`
	Round              uint64            `protobuf:"varint,8,opt,name=Round,proto3" json:"Round,omitempty"`
	Epoch              uint32            `protobuf:"varint,9,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	BlockBodyType      Type              `protobuf:"varint,10,opt,name=BlockBodyType,proto3,enum=proto.Type" json:"BlockBodyType,omitempty"`
	Signature          []byte            `protobuf:"bytes,11,opt,name=Signature,proto3" json:"Signature,omitempty"`
	LeaderSignature    []byte            `protobuf:"bytes,12,opt,name=LeaderSignature,proto3" json:"LeaderSignature,omitempty"`
	MiniBlockHeaders   []MiniBlockHeader `protobuf:"bytes,13,rep,name=MiniBlockHeaders,proto3" json:"MiniBlockHeaders"`
	PeerChanges        []PeerChange      `protobuf:"bytes,14,rep,name=PeerChanges,proto3" json:"PeerChanges"`
	RootHash           []byte            `protobuf:"bytes,15,opt,name=RootHash,proto3" json:"RootHash,omitempty"`
	MetaBlockHashes    [][]byte          `protobuf:"bytes,16,rep,name=MetaBlockHashes,proto3" json:"MetaBlockHashes,omitempty"`
	TxCount            uint32            `protobuf:"varint,17,opt,name=TxCount,proto3" json:"TxCount,omitempty"`
	EpochStartMetaHash []byte            `protobuf:"bytes,18,opt,name=EpochStartMetaHash,proto3" json:"EpochStartMetaHash,omitempty"`
	ReceiptsHash       []byte            `protobuf:"bytes,19,opt,name=ReceiptsHash,proto3" json:"ReceiptsHash,omitempty"`
	ChainID            []byte            `protobuf:"bytes,20,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	SoftwareVersion    []byte            `protobuf:"bytes,21,opt,name=SoftwareVersion,proto3" json:"SoftwareVersion,omitempty"`
	AccumulatedFees    *math_big.Int     `` /* 163-byte string literal not displayed */
	DeveloperFees      *math_big.Int     `` /* 159-byte string literal not displayed */
	Reserved           []byte            `protobuf:"bytes,24,opt,name=Reserved,proto3" json:"Reserved,omitempty"`
}

Header holds the metadata of a block. This is the part that is being hashed and run through consensus. The header holds the hash of the body and also the link to the previous block header hash

func (*Header) Clone

func (h *Header) Clone() data.HeaderHandler

Clone returns a clone of the object

func (*Header) Descriptor

func (*Header) Descriptor() ([]byte, []int)

func (*Header) Equal

func (this *Header) Equal(that interface{}) bool

func (*Header) GetAccumulatedFees

func (m *Header) GetAccumulatedFees() *math_big.Int

func (*Header) GetBlockBodyType

func (m *Header) GetBlockBodyType() Type

func (*Header) GetChainID

func (m *Header) GetChainID() []byte

func (*Header) GetDeveloperFees added in v1.0.114

func (m *Header) GetDeveloperFees() *math_big.Int

func (*Header) GetEpoch

func (m *Header) GetEpoch() uint32

func (*Header) GetEpochStartMetaHash

func (m *Header) GetEpochStartMetaHash() []byte

func (*Header) GetLeaderSignature

func (m *Header) GetLeaderSignature() []byte

func (*Header) GetMetaBlockHashes

func (m *Header) GetMetaBlockHashes() [][]byte

func (*Header) GetMiniBlockHeaders

func (m *Header) GetMiniBlockHeaders() []MiniBlockHeader

func (*Header) GetMiniBlockHeadersHashes added in v1.1.1

func (h *Header) GetMiniBlockHeadersHashes() [][]byte

GetMiniBlockHeadersHashes gets the miniblock hashes

func (*Header) GetMiniBlockHeadersWithDst

func (h *Header) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32

GetMiniBlockHeadersWithDst as a map of hashes and sender IDs

func (*Header) GetNonce

func (m *Header) GetNonce() uint64

func (*Header) GetOrderedCrossMiniblocksWithDst added in v1.1.1

func (h *Header) GetOrderedCrossMiniblocksWithDst(destId uint32) []*data.MiniBlockInfo

GetOrderedCrossMiniblocksWithDst gets all cross miniblocks with the given destination shard ID, ordered in a chronological way, taking into consideration the round in which they were created/executed in the sender shard

func (*Header) GetPeerChanges

func (m *Header) GetPeerChanges() []PeerChange

func (*Header) GetPrevHash

func (m *Header) GetPrevHash() []byte

func (*Header) GetPrevRandSeed

func (m *Header) GetPrevRandSeed() []byte

func (*Header) GetPubKeysBitmap

func (m *Header) GetPubKeysBitmap() []byte

func (*Header) GetRandSeed

func (m *Header) GetRandSeed() []byte

func (*Header) GetReceiptsHash

func (m *Header) GetReceiptsHash() []byte

func (*Header) GetReserved added in v1.0.149

func (m *Header) GetReserved() []byte

func (*Header) GetRootHash

func (m *Header) GetRootHash() []byte

func (*Header) GetRound

func (m *Header) GetRound() uint64

func (*Header) GetShardID

func (m *Header) GetShardID() uint32

func (*Header) GetSignature

func (m *Header) GetSignature() []byte

func (*Header) GetSoftwareVersion added in v1.0.115

func (m *Header) GetSoftwareVersion() []byte

func (*Header) GetTimeStamp

func (m *Header) GetTimeStamp() uint64

func (*Header) GetTxCount

func (m *Header) GetTxCount() uint32

func (*Header) GetValidatorStatsRootHash

func (h *Header) GetValidatorStatsRootHash() []byte

GetValidatorStatsRootHash set's the root hash for the validator statistics trie

func (*Header) GoString

func (this *Header) GoString() string

func (*Header) IsInterfaceNil

func (h *Header) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*Header) IsStartOfEpochBlock

func (h *Header) IsStartOfEpochBlock() bool

IsStartOfEpochBlock verifies if the block is of type start of epoch

func (*Header) MapMiniBlockHashesToShards

func (h *Header) MapMiniBlockHashesToShards() map[string]uint32

MapMiniBlockHashesToShards is a map of mini block hashes and sender IDs

func (*Header) Marshal

func (m *Header) Marshal() (dAtA []byte, err error)

func (*Header) MarshalTo

func (m *Header) MarshalTo(dAtA []byte) (int, error)

func (*Header) MarshalToSizedBuffer

func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) SetAccumulatedFees

func (h *Header) SetAccumulatedFees(value *big.Int)

SetAccumulatedFees sets the accumulated fees in the header

func (*Header) SetChainID

func (h *Header) SetChainID(chainID []byte)

SetChainID sets the chain ID on which this block is valid on

func (*Header) SetDeveloperFees added in v1.0.114

func (h *Header) SetDeveloperFees(value *big.Int)

SetDeveloperFees sets the developer fees in the header

func (*Header) SetEpoch

func (h *Header) SetEpoch(e uint32)

SetEpoch sets header epoch

func (*Header) SetLeaderSignature

func (h *Header) SetLeaderSignature(sg []byte)

SetLeaderSignature will set the leader's signature

func (*Header) SetNonce

func (h *Header) SetNonce(n uint64)

SetNonce sets header nonce

func (*Header) SetPrevHash

func (h *Header) SetPrevHash(pvHash []byte)

SetPrevHash sets prev hash

func (*Header) SetPrevRandSeed

func (h *Header) SetPrevRandSeed(pvRandSeed []byte)

SetPrevRandSeed sets previous random seed

func (*Header) SetPubKeysBitmap

func (h *Header) SetPubKeysBitmap(pkbm []byte)

SetPubKeysBitmap sets publick key bitmap

func (*Header) SetRandSeed

func (h *Header) SetRandSeed(randSeed []byte)

SetRandSeed sets previous random seed

func (*Header) SetRootHash

func (h *Header) SetRootHash(rHash []byte)

SetRootHash sets root hash

func (*Header) SetRound

func (h *Header) SetRound(r uint64)

SetRound sets header round

func (*Header) SetShardID

func (h *Header) SetShardID(shId uint32)

SetShardID sets header shard ID

func (*Header) SetSignature

func (h *Header) SetSignature(sg []byte)

SetSignature sets header signature

func (*Header) SetSoftwareVersion added in v1.0.117

func (h *Header) SetSoftwareVersion(version []byte)

SetSoftwareVersion sets the software version of the header

func (*Header) SetTimeStamp

func (h *Header) SetTimeStamp(ts uint64)

SetTimeStamp sets header timestamp

func (*Header) SetTxCount

func (h *Header) SetTxCount(txCount uint32)

SetTxCount sets the transaction count of the block associated with this header

func (*Header) SetValidatorStatsRootHash

func (h *Header) SetValidatorStatsRootHash(_ []byte)

SetValidatorStatsRootHash set's the root hash for the validator statistics trie

func (*Header) Size

func (m *Header) Size() (n int)

func (*Header) String

func (this *Header) String() string

func (*Header) Unmarshal

func (m *Header) Unmarshal(dAtA []byte) error

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Header) XXX_Merge

func (m *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

func (m *Header) XXX_Unmarshal(b []byte) error

type MetaBlock

type MetaBlock struct {
	Nonce                  uint64            `protobuf:"varint,1,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	Epoch                  uint32            `protobuf:"varint,2,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	Round                  uint64            `protobuf:"varint,3,opt,name=Round,proto3" json:"Round,omitempty"`
	TimeStamp              uint64            `protobuf:"varint,4,opt,name=TimeStamp,proto3" json:"TimeStamp,omitempty"`
	ShardInfo              []ShardData       `protobuf:"bytes,5,rep,name=ShardInfo,proto3" json:"ShardInfo"`
	PeerInfo               []PeerData        `protobuf:"bytes,6,rep,name=PeerInfo,proto3" json:"PeerInfo"`
	Signature              []byte            `protobuf:"bytes,7,opt,name=Signature,proto3" json:"Signature,omitempty"`
	LeaderSignature        []byte            `protobuf:"bytes,8,opt,name=LeaderSignature,proto3" json:"LeaderSignature,omitempty"`
	PubKeysBitmap          []byte            `protobuf:"bytes,9,opt,name=PubKeysBitmap,proto3" json:"PubKeysBitmap,omitempty"`
	PrevHash               []byte            `protobuf:"bytes,10,opt,name=PrevHash,proto3" json:"PrevHash,omitempty"`
	PrevRandSeed           []byte            `protobuf:"bytes,11,opt,name=PrevRandSeed,proto3" json:"PrevRandSeed,omitempty"`
	RandSeed               []byte            `protobuf:"bytes,12,opt,name=RandSeed,proto3" json:"RandSeed,omitempty"`
	RootHash               []byte            `protobuf:"bytes,13,opt,name=RootHash,proto3" json:"RootHash,omitempty"`
	ValidatorStatsRootHash []byte            `protobuf:"bytes,14,opt,name=ValidatorStatsRootHash,proto3" json:"ValidatorStatsRootHash,omitempty"`
	MiniBlockHeaders       []MiniBlockHeader `protobuf:"bytes,16,rep,name=MiniBlockHeaders,proto3" json:"MiniBlockHeaders"`
	ReceiptsHash           []byte            `protobuf:"bytes,17,opt,name=ReceiptsHash,proto3" json:"ReceiptsHash,omitempty"`
	EpochStart             EpochStart        `protobuf:"bytes,18,opt,name=EpochStart,proto3" json:"EpochStart"`
	ChainID                []byte            `protobuf:"bytes,19,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
	SoftwareVersion        []byte            `protobuf:"bytes,20,opt,name=SoftwareVersion,proto3" json:"SoftwareVersion,omitempty"`
	AccumulatedFees        *math_big.Int     `` /* 163-byte string literal not displayed */
	AccumulatedFeesInEpoch *math_big.Int     `` /* 177-byte string literal not displayed */
	DeveloperFees          *math_big.Int     `` /* 159-byte string literal not displayed */
	DevFeesInEpoch         *math_big.Int     `` /* 161-byte string literal not displayed */
	TxCount                uint32            `protobuf:"varint,25,opt,name=TxCount,proto3" json:"TxCount,omitempty"`
	Reserved               []byte            `protobuf:"bytes,26,opt,name=Reserved,proto3" json:"Reserved,omitempty"`
}

MetaBlock holds the data that will be saved to the metachain each round

func (*MetaBlock) Clone

func (m *MetaBlock) Clone() data.HeaderHandler

Clone will return a clone of the object

func (*MetaBlock) Descriptor

func (*MetaBlock) Descriptor() ([]byte, []int)

func (*MetaBlock) Equal

func (this *MetaBlock) Equal(that interface{}) bool

func (*MetaBlock) GetAccumulatedFees

func (m *MetaBlock) GetAccumulatedFees() *math_big.Int

func (*MetaBlock) GetAccumulatedFeesInEpoch

func (m *MetaBlock) GetAccumulatedFeesInEpoch() *math_big.Int

func (*MetaBlock) GetChainID

func (m *MetaBlock) GetChainID() []byte

func (*MetaBlock) GetDevFeesInEpoch added in v1.0.114

func (m *MetaBlock) GetDevFeesInEpoch() *math_big.Int

func (*MetaBlock) GetDeveloperFees added in v1.0.114

func (m *MetaBlock) GetDeveloperFees() *math_big.Int

func (*MetaBlock) GetEpoch

func (m *MetaBlock) GetEpoch() uint32

func (*MetaBlock) GetEpochStart

func (m *MetaBlock) GetEpochStart() EpochStart

func (*MetaBlock) GetEpochStartMetaHash

func (m *MetaBlock) GetEpochStartMetaHash() []byte

GetEpochStartMetaHash returns the hash of the epoch start meta block

func (*MetaBlock) GetLeaderSignature

func (m *MetaBlock) GetLeaderSignature() []byte

func (*MetaBlock) GetMiniBlockHeaders

func (m *MetaBlock) GetMiniBlockHeaders() []MiniBlockHeader

func (*MetaBlock) GetMiniBlockHeadersHashes added in v1.1.1

func (m *MetaBlock) GetMiniBlockHeadersHashes() [][]byte

GetMiniBlockHeadersHashes gets the miniblock hashes

func (*MetaBlock) GetMiniBlockHeadersWithDst

func (m *MetaBlock) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32

GetMiniBlockHeadersWithDst as a map of hashes and sender IDs

func (*MetaBlock) GetNonce

func (m *MetaBlock) GetNonce() uint64

func (*MetaBlock) GetOrderedCrossMiniblocksWithDst added in v1.1.1

func (m *MetaBlock) GetOrderedCrossMiniblocksWithDst(destId uint32) []*data.MiniBlockInfo

GetOrderedCrossMiniblocksWithDst gets all cross miniblocks with the given destination shard ID, ordered in a chronological way, taking into consideration the round in which they were created/executed in the sender shard

func (*MetaBlock) GetPeerInfo

func (m *MetaBlock) GetPeerInfo() []PeerData

func (*MetaBlock) GetPrevHash

func (m *MetaBlock) GetPrevHash() []byte

func (*MetaBlock) GetPrevRandSeed

func (m *MetaBlock) GetPrevRandSeed() []byte

func (*MetaBlock) GetPubKeysBitmap

func (m *MetaBlock) GetPubKeysBitmap() []byte

func (*MetaBlock) GetRandSeed

func (m *MetaBlock) GetRandSeed() []byte

func (*MetaBlock) GetReceiptsHash

func (m *MetaBlock) GetReceiptsHash() []byte

func (*MetaBlock) GetReserved added in v1.0.149

func (m *MetaBlock) GetReserved() []byte

func (*MetaBlock) GetRootHash

func (m *MetaBlock) GetRootHash() []byte

func (*MetaBlock) GetRound

func (m *MetaBlock) GetRound() uint64

func (*MetaBlock) GetShardID

func (m *MetaBlock) GetShardID() uint32

GetShardID returns the metachain shard id

func (*MetaBlock) GetShardInfo

func (m *MetaBlock) GetShardInfo() []ShardData

func (*MetaBlock) GetSignature

func (m *MetaBlock) GetSignature() []byte

func (*MetaBlock) GetSoftwareVersion added in v1.0.115

func (m *MetaBlock) GetSoftwareVersion() []byte

func (*MetaBlock) GetTimeStamp

func (m *MetaBlock) GetTimeStamp() uint64

func (*MetaBlock) GetTxCount

func (m *MetaBlock) GetTxCount() uint32

func (*MetaBlock) GetValidatorStatsRootHash

func (m *MetaBlock) GetValidatorStatsRootHash() []byte

func (*MetaBlock) GoString

func (this *MetaBlock) GoString() string

func (*MetaBlock) IsInterfaceNil

func (m *MetaBlock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MetaBlock) IsStartOfEpochBlock

func (m *MetaBlock) IsStartOfEpochBlock() bool

IsStartOfEpochBlock verifies if the block is of type start of epoch

func (*MetaBlock) Marshal

func (m *MetaBlock) Marshal() (dAtA []byte, err error)

func (*MetaBlock) MarshalTo

func (m *MetaBlock) MarshalTo(dAtA []byte) (int, error)

func (*MetaBlock) MarshalToSizedBuffer

func (m *MetaBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetaBlock) ProtoMessage

func (*MetaBlock) ProtoMessage()

func (*MetaBlock) Reset

func (m *MetaBlock) Reset()

func (*MetaBlock) SetAccumulatedFees

func (m *MetaBlock) SetAccumulatedFees(value *big.Int)

SetAccumulatedFees sets the accumulated fees in the header

func (*MetaBlock) SetChainID

func (m *MetaBlock) SetChainID(chainID []byte)

SetChainID sets the chain ID on which this block is valid on

func (*MetaBlock) SetDeveloperFees added in v1.0.114

func (m *MetaBlock) SetDeveloperFees(value *big.Int)

SetDeveloperFees sets the developer fees in the header

func (*MetaBlock) SetEpoch

func (m *MetaBlock) SetEpoch(e uint32)

SetEpoch sets header epoch

func (*MetaBlock) SetLeaderSignature

func (m *MetaBlock) SetLeaderSignature(sg []byte)

SetLeaderSignature will set the leader's signature

func (*MetaBlock) SetNonce

func (m *MetaBlock) SetNonce(n uint64)

SetNonce sets header nonce

func (*MetaBlock) SetPrevHash

func (m *MetaBlock) SetPrevHash(pvHash []byte)

SetPrevHash sets prev hash

func (*MetaBlock) SetPrevRandSeed

func (m *MetaBlock) SetPrevRandSeed(pvRandSeed []byte)

SetPrevRandSeed sets the previous randomness seed

func (*MetaBlock) SetPubKeysBitmap

func (m *MetaBlock) SetPubKeysBitmap(pkbm []byte)

SetPubKeysBitmap sets publick key bitmap

func (*MetaBlock) SetRandSeed

func (m *MetaBlock) SetRandSeed(randSeed []byte)

SetRandSeed sets the current random seed

func (*MetaBlock) SetRootHash

func (m *MetaBlock) SetRootHash(rHash []byte)

SetRootHash sets root hash

func (*MetaBlock) SetRound

func (m *MetaBlock) SetRound(r uint64)

SetRound sets header round

func (*MetaBlock) SetShardID

func (m *MetaBlock) SetShardID(_ uint32)

SetShardID sets header shard ID

func (*MetaBlock) SetSignature

func (m *MetaBlock) SetSignature(sg []byte)

SetSignature set header signature

func (*MetaBlock) SetSoftwareVersion added in v1.0.117

func (m *MetaBlock) SetSoftwareVersion(version []byte)

SetSoftwareVersion sets the software version of the block

func (*MetaBlock) SetTimeStamp

func (m *MetaBlock) SetTimeStamp(ts uint64)

SetTimeStamp sets header timestamp

func (*MetaBlock) SetTxCount

func (m *MetaBlock) SetTxCount(txCount uint32)

SetTxCount sets the transaction count of the current meta block

func (*MetaBlock) SetValidatorStatsRootHash

func (m *MetaBlock) SetValidatorStatsRootHash(rHash []byte)

SetValidatorStatsRootHash set's the root hash for the validator statistics trie

func (*MetaBlock) Size

func (m *MetaBlock) Size() (n int)

func (*MetaBlock) String

func (this *MetaBlock) String() string

func (*MetaBlock) Unmarshal

func (m *MetaBlock) Unmarshal(dAtA []byte) error

func (*MetaBlock) XXX_DiscardUnknown

func (m *MetaBlock) XXX_DiscardUnknown()

func (*MetaBlock) XXX_Marshal

func (m *MetaBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetaBlock) XXX_Merge

func (m *MetaBlock) XXX_Merge(src proto.Message)

func (*MetaBlock) XXX_Size

func (m *MetaBlock) XXX_Size() int

func (*MetaBlock) XXX_Unmarshal

func (m *MetaBlock) XXX_Unmarshal(b []byte) error

type MiniBlock

type MiniBlock struct {
	TxHashes        [][]byte `protobuf:"bytes,1,rep,name=TxHashes,proto3" json:"TxHashes,omitempty"`
	ReceiverShardID uint32   `protobuf:"varint,2,opt,name=ReceiverShardID,proto3" json:"ReceiverShardID,omitempty"`
	SenderShardID   uint32   `protobuf:"varint,3,opt,name=SenderShardID,proto3" json:"SenderShardID,omitempty"`
	Type            Type     `protobuf:"varint,4,opt,name=Type,proto3,enum=proto.Type" json:"Type,omitempty"`
	Reserved        []byte   `protobuf:"bytes,5,opt,name=Reserved,proto3" json:"Reserved,omitempty"`
}

func (*MiniBlock) Clone

func (mb *MiniBlock) Clone() *MiniBlock

Clone the underlying data

func (*MiniBlock) Descriptor

func (*MiniBlock) Descriptor() ([]byte, []int)

func (*MiniBlock) Equal

func (this *MiniBlock) Equal(that interface{}) bool

func (*MiniBlock) GetReceiverShardID

func (m *MiniBlock) GetReceiverShardID() uint32

func (*MiniBlock) GetReserved added in v1.0.149

func (m *MiniBlock) GetReserved() []byte

func (*MiniBlock) GetSenderShardID

func (m *MiniBlock) GetSenderShardID() uint32

func (*MiniBlock) GetTxHashes

func (m *MiniBlock) GetTxHashes() [][]byte

func (*MiniBlock) GetType

func (m *MiniBlock) GetType() Type

func (*MiniBlock) GoString

func (this *MiniBlock) GoString() string

func (*MiniBlock) Marshal

func (m *MiniBlock) Marshal() (dAtA []byte, err error)

func (*MiniBlock) MarshalTo

func (m *MiniBlock) MarshalTo(dAtA []byte) (int, error)

func (*MiniBlock) MarshalToSizedBuffer

func (m *MiniBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MiniBlock) ProtoMessage

func (*MiniBlock) ProtoMessage()

func (*MiniBlock) Reset

func (m *MiniBlock) Reset()

func (*MiniBlock) Size

func (m *MiniBlock) Size() (n int)

func (*MiniBlock) String

func (this *MiniBlock) String() string

func (*MiniBlock) Unmarshal

func (m *MiniBlock) Unmarshal(dAtA []byte) error

func (*MiniBlock) XXX_DiscardUnknown

func (m *MiniBlock) XXX_DiscardUnknown()

func (*MiniBlock) XXX_Marshal

func (m *MiniBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MiniBlock) XXX_Merge

func (m *MiniBlock) XXX_Merge(src proto.Message)

func (*MiniBlock) XXX_Size

func (m *MiniBlock) XXX_Size() int

func (*MiniBlock) XXX_Unmarshal

func (m *MiniBlock) XXX_Unmarshal(b []byte) error

type MiniBlockHeader

type MiniBlockHeader struct {
	Hash            []byte `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"`
	SenderShardID   uint32 `protobuf:"varint,2,opt,name=SenderShardID,proto3" json:"SenderShardID,omitempty"`
	ReceiverShardID uint32 `protobuf:"varint,3,opt,name=ReceiverShardID,proto3" json:"ReceiverShardID,omitempty"`
	TxCount         uint32 `protobuf:"varint,4,opt,name=TxCount,proto3" json:"TxCount,omitempty"`
	Type            Type   `protobuf:"varint,5,opt,name=Type,proto3,enum=proto.Type" json:"Type,omitempty"`
	Reserved        []byte `protobuf:"bytes,6,opt,name=Reserved,proto3" json:"Reserved,omitempty"`
}

func (*MiniBlockHeader) Descriptor

func (*MiniBlockHeader) Descriptor() ([]byte, []int)

func (*MiniBlockHeader) Equal

func (this *MiniBlockHeader) Equal(that interface{}) bool

func (*MiniBlockHeader) GetHash

func (m *MiniBlockHeader) GetHash() []byte

func (*MiniBlockHeader) GetReceiverShardID

func (m *MiniBlockHeader) GetReceiverShardID() uint32

func (*MiniBlockHeader) GetReserved added in v1.0.149

func (m *MiniBlockHeader) GetReserved() []byte

func (*MiniBlockHeader) GetSenderShardID

func (m *MiniBlockHeader) GetSenderShardID() uint32

func (*MiniBlockHeader) GetTxCount

func (m *MiniBlockHeader) GetTxCount() uint32

func (*MiniBlockHeader) GetType

func (m *MiniBlockHeader) GetType() Type

func (*MiniBlockHeader) GoString

func (this *MiniBlockHeader) GoString() string

func (*MiniBlockHeader) Marshal

func (m *MiniBlockHeader) Marshal() (dAtA []byte, err error)

func (*MiniBlockHeader) MarshalTo

func (m *MiniBlockHeader) MarshalTo(dAtA []byte) (int, error)

func (*MiniBlockHeader) MarshalToSizedBuffer

func (m *MiniBlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MiniBlockHeader) ProtoMessage

func (*MiniBlockHeader) ProtoMessage()

func (*MiniBlockHeader) Reset

func (m *MiniBlockHeader) Reset()

func (*MiniBlockHeader) Size

func (m *MiniBlockHeader) Size() (n int)

func (*MiniBlockHeader) String

func (this *MiniBlockHeader) String() string

func (*MiniBlockHeader) Unmarshal

func (m *MiniBlockHeader) Unmarshal(dAtA []byte) error

func (*MiniBlockHeader) XXX_DiscardUnknown

func (m *MiniBlockHeader) XXX_DiscardUnknown()

func (*MiniBlockHeader) XXX_Marshal

func (m *MiniBlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MiniBlockHeader) XXX_Merge

func (m *MiniBlockHeader) XXX_Merge(src proto.Message)

func (*MiniBlockHeader) XXX_Size

func (m *MiniBlockHeader) XXX_Size() int

func (*MiniBlockHeader) XXX_Unmarshal

func (m *MiniBlockHeader) XXX_Unmarshal(b []byte) error

type MiniBlockSlice

type MiniBlockSlice []*MiniBlock

MiniBlockSlice should be used when referring to subset of mini blocks that is not

necessarily representing a full block body

type MiniblockAndHash added in v1.2.0

type MiniblockAndHash struct {
	Miniblock *MiniBlock
	Hash      []byte
}

MiniblockAndHash holds the info related to a miniblock and its hash

type PeerAction

type PeerAction int32

PeerAction type represents the possible events that a node can trigger for the metachain to notarize

const (
	InvalidAction      PeerAction = 0
	PeerRegistration   PeerAction = 1
	PeerUnstaking      PeerAction = 2
	PeerDeregistration PeerAction = 3
	PeerJailed         PeerAction = 4
	PeerUnJailed       PeerAction = 5
	PeerSlashed        PeerAction = 6
	PeerReStake        PeerAction = 7
)

func (PeerAction) EnumDescriptor

func (PeerAction) EnumDescriptor() ([]byte, []int)

func (PeerAction) String

func (x PeerAction) String() string

type PeerChange

type PeerChange struct {
	PubKey      []byte `protobuf:"bytes,1,opt,name=PubKey,proto3" json:"PubKey,omitempty"`
	ShardIdDest uint32 `protobuf:"varint,2,opt,name=ShardIdDest,proto3" json:"ShardIdDest,omitempty"`
}

PeerChange holds a change in one peer to shard assignation

func (*PeerChange) Descriptor

func (*PeerChange) Descriptor() ([]byte, []int)

func (*PeerChange) Equal

func (this *PeerChange) Equal(that interface{}) bool

func (*PeerChange) GetPubKey

func (m *PeerChange) GetPubKey() []byte

func (*PeerChange) GetShardIdDest

func (m *PeerChange) GetShardIdDest() uint32

func (*PeerChange) GoString

func (this *PeerChange) GoString() string

func (*PeerChange) Marshal

func (m *PeerChange) Marshal() (dAtA []byte, err error)

func (*PeerChange) MarshalTo

func (m *PeerChange) MarshalTo(dAtA []byte) (int, error)

func (*PeerChange) MarshalToSizedBuffer

func (m *PeerChange) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerChange) ProtoMessage

func (*PeerChange) ProtoMessage()

func (*PeerChange) Reset

func (m *PeerChange) Reset()

func (*PeerChange) Size

func (m *PeerChange) Size() (n int)

func (*PeerChange) String

func (this *PeerChange) String() string

func (*PeerChange) Unmarshal

func (m *PeerChange) Unmarshal(dAtA []byte) error

func (*PeerChange) XXX_DiscardUnknown

func (m *PeerChange) XXX_DiscardUnknown()

func (*PeerChange) XXX_Marshal

func (m *PeerChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerChange) XXX_Merge

func (m *PeerChange) XXX_Merge(src proto.Message)

func (*PeerChange) XXX_Size

func (m *PeerChange) XXX_Size() int

func (*PeerChange) XXX_Unmarshal

func (m *PeerChange) XXX_Unmarshal(b []byte) error

type PeerData

type PeerData struct {
	Address     []byte        `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"`
	PublicKey   []byte        `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"`
	Action      PeerAction    `protobuf:"varint,3,opt,name=Action,proto3,enum=proto.PeerAction" json:"Action,omitempty"`
	TimeStamp   uint64        `protobuf:"varint,4,opt,name=TimeStamp,proto3" json:"TimeStamp,omitempty"`
	ValueChange *math_big.Int `` /* 154-byte string literal not displayed */
}

PeerData holds information about actions taken by a peer:

  • a peer can register with an amount to become a validator
  • a peer can choose to deregister and get back the deposited value

func (*PeerData) Descriptor

func (*PeerData) Descriptor() ([]byte, []int)

func (*PeerData) Equal

func (this *PeerData) Equal(that interface{}) bool

func (*PeerData) GetAction

func (m *PeerData) GetAction() PeerAction

func (*PeerData) GetAddress

func (m *PeerData) GetAddress() []byte

func (*PeerData) GetPublicKey

func (m *PeerData) GetPublicKey() []byte

func (*PeerData) GetTimeStamp

func (m *PeerData) GetTimeStamp() uint64

func (*PeerData) GetValueChange

func (m *PeerData) GetValueChange() *math_big.Int

func (*PeerData) GoString

func (this *PeerData) GoString() string

func (*PeerData) Marshal

func (m *PeerData) Marshal() (dAtA []byte, err error)

func (*PeerData) MarshalTo

func (m *PeerData) MarshalTo(dAtA []byte) (int, error)

func (*PeerData) MarshalToSizedBuffer

func (m *PeerData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerData) ProtoMessage

func (*PeerData) ProtoMessage()

func (*PeerData) Reset

func (m *PeerData) Reset()

func (*PeerData) Size

func (m *PeerData) Size() (n int)

func (*PeerData) String

func (this *PeerData) String() string

func (*PeerData) Unmarshal

func (m *PeerData) Unmarshal(dAtA []byte) error

func (*PeerData) XXX_DiscardUnknown

func (m *PeerData) XXX_DiscardUnknown()

func (*PeerData) XXX_Marshal

func (m *PeerData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerData) XXX_Merge

func (m *PeerData) XXX_Merge(src proto.Message)

func (*PeerData) XXX_Size

func (m *PeerData) XXX_Size() int

func (*PeerData) XXX_Unmarshal

func (m *PeerData) XXX_Unmarshal(b []byte) error

type ShardData

type ShardData struct {
	HeaderHash            []byte            `protobuf:"bytes,2,opt,name=HeaderHash,proto3" json:"HeaderHash,omitempty"`
	ShardMiniBlockHeaders []MiniBlockHeader `protobuf:"bytes,3,rep,name=ShardMiniBlockHeaders,proto3" json:"ShardMiniBlockHeaders"`
	PrevRandSeed          []byte            `protobuf:"bytes,4,opt,name=PrevRandSeed,proto3" json:"PrevRandSeed,omitempty"`
	PubKeysBitmap         []byte            `protobuf:"bytes,5,opt,name=PubKeysBitmap,proto3" json:"PubKeysBitmap,omitempty"`
	Signature             []byte            `protobuf:"bytes,6,opt,name=Signature,proto3" json:"Signature,omitempty"`
	Round                 uint64            `protobuf:"varint,8,opt,name=Round,proto3" json:"Round,omitempty"`
	PrevHash              []byte            `protobuf:"bytes,9,opt,name=PrevHash,proto3" json:"PrevHash,omitempty"`
	Nonce                 uint64            `protobuf:"varint,10,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	AccumulatedFees       *math_big.Int     `` /* 163-byte string literal not displayed */
	DeveloperFees         *math_big.Int     `` /* 159-byte string literal not displayed */
	NumPendingMiniBlocks  uint32            `protobuf:"varint,11,opt,name=NumPendingMiniBlocks,proto3" json:"NumPendingMiniBlocks,omitempty"`
	LastIncludedMetaNonce uint64            `protobuf:"varint,13,opt,name=LastIncludedMetaNonce,proto3" json:"LastIncludedMetaNonce,omitempty"`
	ShardID               uint32            `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	TxCount               uint32            `protobuf:"varint,7,opt,name=TxCount,proto3" json:"TxCount,omitempty"`
}

ShardData holds the block information sent by the shards to the metachain

func (*ShardData) Descriptor

func (*ShardData) Descriptor() ([]byte, []int)

func (*ShardData) Equal

func (this *ShardData) Equal(that interface{}) bool

func (*ShardData) GetAccumulatedFees

func (m *ShardData) GetAccumulatedFees() *math_big.Int

func (*ShardData) GetDeveloperFees added in v1.0.114

func (m *ShardData) GetDeveloperFees() *math_big.Int

func (*ShardData) GetHeaderHash

func (m *ShardData) GetHeaderHash() []byte

func (*ShardData) GetLastIncludedMetaNonce added in v1.0.103

func (m *ShardData) GetLastIncludedMetaNonce() uint64

func (*ShardData) GetNonce

func (m *ShardData) GetNonce() uint64

func (*ShardData) GetNumPendingMiniBlocks

func (m *ShardData) GetNumPendingMiniBlocks() uint32

func (*ShardData) GetPrevHash

func (m *ShardData) GetPrevHash() []byte

func (*ShardData) GetPrevRandSeed

func (m *ShardData) GetPrevRandSeed() []byte

func (*ShardData) GetPubKeysBitmap

func (m *ShardData) GetPubKeysBitmap() []byte

func (*ShardData) GetRound

func (m *ShardData) GetRound() uint64

func (*ShardData) GetShardID

func (m *ShardData) GetShardID() uint32

func (*ShardData) GetShardMiniBlockHeaders

func (m *ShardData) GetShardMiniBlockHeaders() []MiniBlockHeader

func (*ShardData) GetSignature

func (m *ShardData) GetSignature() []byte

func (*ShardData) GetTxCount

func (m *ShardData) GetTxCount() uint32

func (*ShardData) GoString

func (this *ShardData) GoString() string

func (*ShardData) Marshal

func (m *ShardData) Marshal() (dAtA []byte, err error)

func (*ShardData) MarshalTo

func (m *ShardData) MarshalTo(dAtA []byte) (int, error)

func (*ShardData) MarshalToSizedBuffer

func (m *ShardData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ShardData) ProtoMessage

func (*ShardData) ProtoMessage()

func (*ShardData) Reset

func (m *ShardData) Reset()

func (*ShardData) Size

func (m *ShardData) Size() (n int)

func (*ShardData) String

func (this *ShardData) String() string

func (*ShardData) Unmarshal

func (m *ShardData) Unmarshal(dAtA []byte) error

func (*ShardData) XXX_DiscardUnknown

func (m *ShardData) XXX_DiscardUnknown()

func (*ShardData) XXX_Marshal

func (m *ShardData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShardData) XXX_Merge

func (m *ShardData) XXX_Merge(src proto.Message)

func (*ShardData) XXX_Size

func (m *ShardData) XXX_Size() int

func (*ShardData) XXX_Unmarshal

func (m *ShardData) XXX_Unmarshal(b []byte) error

type Type

type Type int32

Type identifies the type of the block

const (
	TxBlock                  Type = 0
	StateBlock               Type = 30
	PeerBlock                Type = 60
	SmartContractResultBlock Type = 90
	InvalidBlock             Type = 120
	ReceiptBlock             Type = 150
	RewardsBlock             Type = 255
)

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL