block

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: GPL-3.0 Imports: 18 Imported by: 87

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 (
	ErrInvalidLengthBlockV2        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlockV2          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlockV2 = 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 (
	ErrInvalidLengthTrigger        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTrigger          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTrigger = fmt.Errorf("proto: unexpected end of group")
)
View Source
var MiniBlockState_name = map[int32]string{
	0: "Final",
	1: "Proposed",
	2: "PartialExecuted",
}
View Source
var MiniBlockState_value = map[string]int32{
	"Final":           0,
	"Proposed":        1,
	"PartialExecuted": 2,
}
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 ProcessingType_name = map[int32]string{
	0: "Normal",
	1: "Scheduled",
	2: "Processed",
}
View Source
var ProcessingType_value = map[string]int32{
	"Normal":    0,
	"Scheduled": 1,
	"Processed": 2,
}
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

func GetHeaderFromBytes

func GetHeaderFromBytes(marshaller marshal.Marshalizer, creator EmptyBlockCreator, headerBytes []byte) (data.HeaderHandler, error)

GetHeaderFromBytes will unmarshal the header bytes based on the header type

func NewEmptyBlockCreatorsContainer

func NewEmptyBlockCreatorsContainer() *emptyBlockCreatorsContainer

NewEmptyBlockCreatorsContainer creates a new block creators container

func NewEmptyHeaderCreator

func NewEmptyHeaderCreator() *emptyHeaderCreator

NewEmptyHeaderCreator is able to create empty header v1 instances

func NewEmptyHeaderV2Creator

func NewEmptyHeaderV2Creator() *emptyHeaderV2Creator

NewEmptyHeaderV2Creator is able to create empty header v2 instances

func NewEmptyMetaBlockCreator

func NewEmptyMetaBlockCreator() *emptyMetaBlockCreator

NewEmptyMetaBlockCreator is able to create empty metablock instances

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 `` /* 157-byte string literal not displayed */
	TotalToDistribute                *math_big.Int `` /* 169-byte string literal not displayed */
	TotalNewlyMinted                 *math_big.Int `` /* 167-byte string literal not displayed */
	RewardsPerBlock                  *math_big.Int `` /* 165-byte string literal not displayed */
	RewardsForProtocolSustainability *math_big.Int `` /* 199-byte string literal not displayed */
	NodePrice                        *math_big.Int `` /* 153-byte string literal not displayed */
	PrevEpochStartRound              uint64        `protobuf:"varint,7,opt,name=PrevEpochStartRound,proto3" json:"prevEpochStartRound"`
	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

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

func (*Economics) GetPrevEpochStartRound

func (m *Economics) GetPrevEpochStartRound() uint64

func (*Economics) GetRewardsForProtocolSustainability

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

func (*Economics) GetRewardsPerBlock

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) SetNodePrice

func (e *Economics) SetNodePrice(nodePrice *big.Int) error

SetNodePrice sets the node price

func (*Economics) SetPrevEpochStartHash

func (e *Economics) SetPrevEpochStartHash(prevEpochStartHash []byte) error

SetPrevEpochStartHash sets the previous epoch start hash

func (*Economics) SetPrevEpochStartRound

func (e *Economics) SetPrevEpochStartRound(prevEpochStartRound uint64) error

SetPrevEpochStartRound sets the previous epoch start round

func (*Economics) SetRewardsForProtocolSustainability

func (e *Economics) SetRewardsForProtocolSustainability(rewardsForProtocolSustainability *big.Int) error

SetRewardsForProtocolSustainability sets the rewards for protocol sustainability

func (*Economics) SetRewardsPerBlock

func (e *Economics) SetRewardsPerBlock(rewardsPerBlock *big.Int) error

SetRewardsPerBlock sets the rewards per block

func (*Economics) SetTotalNewlyMinted

func (e *Economics) SetTotalNewlyMinted(totalNewlyMinted *big.Int) error

SetTotalNewlyMinted sets the total number of minted tokens

func (*Economics) SetTotalSupply

func (e *Economics) SetTotalSupply(totalSupply *big.Int) error

SetTotalSupply sets the total supply

func (*Economics) SetTotalToDistribute

func (e *Economics) SetTotalToDistribute(totalToDistribute *big.Int) error

SetTotalToDistribute sets the total to be distributed

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 EmptyBlockCreator

type EmptyBlockCreator interface {
	CreateNewHeader() data.HeaderHandler
	IsInterfaceNil() bool
}

EmptyBlockCreator is able to create empty block instances

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) GetEconomicsHandler

func (es *EpochStart) GetEconomicsHandler() data.EconomicsHandler

GetEconomicsHandler returns the economics handler

func (*EpochStart) GetLastFinalizedHeaderHandlers

func (es *EpochStart) GetLastFinalizedHeaderHandlers() []data.EpochStartShardDataHandler

GetLastFinalizedHeaderHandlers returns the last finalized header handlers

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) SetEconomics

func (es *EpochStart) SetEconomics(economicsHandler data.EconomicsHandler) error

SetEconomics sets the economics data

func (*EpochStart) SetLastFinalizedHeaders

func (es *EpochStart) SetLastFinalizedHeaders(epochStartDataHandlers []data.EpochStartShardDataHandler) error

SetLastFinalizedHeaders sets the last finalized header

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"`
	Epoch                   uint32            `protobuf:"varint,9,opt,name=Epoch,proto3" json:"epoch"`
	Round                   uint64            `protobuf:"varint,7,opt,name=Round,proto3" json:"round"`
	Nonce                   uint64            `protobuf:"varint,8,opt,name=Nonce,proto3" json:"nonce"`
	HeaderHash              []byte            `protobuf:"bytes,2,opt,name=HeaderHash,proto3" json:"headerHash,omitempty"`
	RootHash                []byte            `protobuf:"bytes,3,opt,name=RootHash,proto3" json:"rootHash,omitempty"`
	ScheduledRootHash       []byte            `protobuf:"bytes,10,opt,name=ScheduledRootHash,proto3" json:"scheduledRootHash,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

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) GetPendingMiniBlockHeaderHandlers

func (essd *EpochStartShardData) GetPendingMiniBlockHeaderHandlers() []data.MiniBlockHeaderHandler

GetPendingMiniBlockHeaderHandlers returns the pending miniBlock header handlers

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) GetScheduledRootHash

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

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) SetEpoch

func (essd *EpochStartShardData) SetEpoch(epoch uint32) error

SetEpoch sets the epoch start shardData epoch

func (*EpochStartShardData) SetFirstPendingMetaBlock

func (essd *EpochStartShardData) SetFirstPendingMetaBlock(metaBlock []byte) error

SetFirstPendingMetaBlock sets the epoch start shardData first pending metaBlock

func (*EpochStartShardData) SetHeaderHash

func (essd *EpochStartShardData) SetHeaderHash(hash []byte) error

SetHeaderHash sets the epoch start shardData header hash

func (*EpochStartShardData) SetLastFinishedMetaBlock

func (essd *EpochStartShardData) SetLastFinishedMetaBlock(lastFinishedMetaBlock []byte) error

SetLastFinishedMetaBlock sets the epoch start shardData last finished metaBlock

func (*EpochStartShardData) SetNonce

func (essd *EpochStartShardData) SetNonce(nonce uint64) error

SetNonce sets the epoch start shardData nonce

func (*EpochStartShardData) SetPendingMiniBlockHeaders

func (essd *EpochStartShardData) SetPendingMiniBlockHeaders(miniBlockHeaderHandlers []data.MiniBlockHeaderHandler) error

SetPendingMiniBlockHeaders sets the epoch start shardData pending miniBlock headers

func (*EpochStartShardData) SetRootHash

func (essd *EpochStartShardData) SetRootHash(rootHash []byte) error

SetRootHash sets the epoch start shardData root hash

func (*EpochStartShardData) SetRound

func (essd *EpochStartShardData) SetRound(round uint64) error

SetRound sets the epoch start shardData round

func (*EpochStartShardData) SetScheduledRootHash

func (essd *EpochStartShardData) SetScheduledRootHash(schRootHash []byte) error

SetScheduledRootHash sets the scheduled root hash

func (*EpochStartShardData) SetShardID

func (essd *EpochStartShardData) SetShardID(shardID uint32) error

SetShardID sets the epoch start shardData shardID

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"`
	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"`
	TimeStamp          uint64            `protobuf:"varint,7,opt,name=TimeStamp,proto3" json:"timeStamp,omitempty"`
	Round              uint64            `protobuf:"varint,8,opt,name=Round,proto3" json:"round"`
	Epoch              uint32            `protobuf:"varint,9,opt,name=Epoch,proto3" json:"epoch"`
	BlockBodyType      Type              `protobuf:"varint,10,opt,name=BlockBodyType,proto3,enum=proto.Type" json:"blockBodyType"`
	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"`
	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     `` /* 166-byte string literal not displayed */
	DeveloperFees      *math_big.Int     `` /* 162-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) CheckFieldsForNil

func (h *Header) CheckFieldsForNil() error

CheckFieldsForNil checks a predefined set of fields for nil values

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) GetAdditionalData

func (h *Header) GetAdditionalData() headerVersionData.HeaderAdditionalData

GetAdditionalData gets the additional version-related data for the header

func (*Header) GetBlockBodyType

func (m *Header) GetBlockBodyType() Type

func (*Header) GetBlockBodyTypeInt32

func (h *Header) GetBlockBodyTypeInt32() int32

GetBlockBodyTypeInt32 returns the block body type as int32

func (*Header) GetChainID

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

func (*Header) GetDeveloperFees

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) GetMiniBlockHeaderHandlers

func (h *Header) GetMiniBlockHeaderHandlers() []data.MiniBlockHeaderHandler

GetMiniBlockHeaderHandlers returns the miniBlock headers as an array of miniBlock header handlers

func (*Header) GetMiniBlockHeaders

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

func (*Header) GetMiniBlockHeadersHashes

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

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

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

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 returns the root hash for the validator statistics trie

func (*Header) GoString

func (this *Header) GoString() string

func (*Header) HasScheduledMiniBlocks

func (h *Header) HasScheduledMiniBlocks() bool

HasScheduledMiniBlocks returns false as v1 Header has no support for scheduled data

func (*Header) HasScheduledSupport

func (h *Header) HasScheduledSupport() bool

HasScheduledSupport returns false as the first block version does not support scheduled data

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) error

SetAccumulatedFees sets the accumulated fees in the header

func (*Header) SetAdditionalData

func (h *Header) SetAdditionalData(_ headerVersionData.HeaderAdditionalData) error

SetAdditionalData sets the additional data for the header

func (*Header) SetBlockBodyTypeInt32

func (h *Header) SetBlockBodyTypeInt32(blockBodyType int32) error

SetBlockBodyTypeInt32 sets the blockBodyType in the header

func (*Header) SetChainID

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

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

func (*Header) SetDeveloperFees

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

SetDeveloperFees sets the developer fees in the header

func (*Header) SetEpoch

func (h *Header) SetEpoch(e uint32) error

SetEpoch sets header epoch

func (*Header) SetEpochStartMetaHash

func (h *Header) SetEpochStartMetaHash(hash []byte) error

SetEpochStartMetaHash sets the epoch start metaBlock hash

func (*Header) SetLeaderSignature

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

SetLeaderSignature will set the leader's signature

func (*Header) SetMetaBlockHashes

func (h *Header) SetMetaBlockHashes(hashes [][]byte) error

SetMetaBlockHashes sets the metaBlock hashes

func (*Header) SetMiniBlockHeaderHandlers

func (h *Header) SetMiniBlockHeaderHandlers(mbHeaderHandlers []data.MiniBlockHeaderHandler) error

SetMiniBlockHeaderHandlers sets the miniBlock headers from the given miniBlock header handlers

func (*Header) SetNonce

func (h *Header) SetNonce(n uint64) error

SetNonce sets header nonce

func (*Header) SetPrevHash

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

SetPrevHash sets prev hash

func (*Header) SetPrevRandSeed

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

SetPrevRandSeed sets previous random seed

func (*Header) SetPubKeysBitmap

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

SetPubKeysBitmap sets public key bitmap

func (*Header) SetRandSeed

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

SetRandSeed sets previous random seed

func (*Header) SetReceiptsHash

func (h *Header) SetReceiptsHash(hash []byte) error

SetReceiptsHash sets the receipts hash

func (*Header) SetRootHash

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

SetRootHash sets root hash

func (*Header) SetRound

func (h *Header) SetRound(r uint64) error

SetRound sets header round

func (*Header) SetScheduledRootHash

func (h *Header) SetScheduledRootHash(_ []byte) error

SetScheduledRootHash not supported by V1 header

func (*Header) SetShardID

func (h *Header) SetShardID(shId uint32) error

SetShardID sets header shard ID

func (*Header) SetSignature

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

SetSignature sets header signature

func (*Header) SetSoftwareVersion

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

SetSoftwareVersion sets the software version of the header

func (*Header) SetTimeStamp

func (h *Header) SetTimeStamp(ts uint64) error

SetTimeStamp sets header timestamp

func (*Header) SetTxCount

func (h *Header) SetTxCount(txCount uint32) error

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

func (*Header) SetValidatorStatsRootHash

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

SetValidatorStatsRootHash sets the root hash for the validator statistics trie

func (*Header) ShallowClone

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

ShallowClone returns a clone of the object

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) ValidateHeaderVersion

func (h *Header) ValidateHeaderVersion() error

ValidateHeaderVersion does extra validation for header version

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 HeaderV2

type HeaderV2 struct {
	Header                   *Header       `protobuf:"bytes,1,opt,name=Header,proto3" json:"header,omitempty"`
	ScheduledRootHash        []byte        `protobuf:"bytes,2,opt,name=ScheduledRootHash,proto3" json:"scheduledRootHash,omitempty"`
	ScheduledAccumulatedFees *math_big.Int `` /* 183-byte string literal not displayed */
	ScheduledDeveloperFees   *math_big.Int `` /* 179-byte string literal not displayed */
	ScheduledGasProvided     uint64        `protobuf:"varint,5,opt,name=ScheduledGasProvided,proto3" json:"scheduledGasProvided"`
	ScheduledGasPenalized    uint64        `protobuf:"varint,6,opt,name=ScheduledGasPenalized,proto3" json:"scheduledGasPenalized"`
	ScheduledGasRefunded     uint64        `protobuf:"varint,7,opt,name=ScheduledGasRefunded,proto3" json:"scheduledGasRefunded"`
}

HeaderV2 extends the Header structure with extra fields for version 2

func (*HeaderV2) CheckFieldsForNil

func (hv2 *HeaderV2) CheckFieldsForNil() error

CheckFieldsForNil checks a predefined set of fields for nil values

func (*HeaderV2) Descriptor

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

func (*HeaderV2) Equal

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

func (*HeaderV2) GetAccumulatedFees

func (hv2 *HeaderV2) GetAccumulatedFees() *big.Int

GetAccumulatedFees returns the block accumulated fees

func (*HeaderV2) GetAdditionalData

func (hv2 *HeaderV2) GetAdditionalData() headerVersionData.HeaderAdditionalData

GetAdditionalData gets the additional version related data for the header

func (*HeaderV2) GetBlockBodyTypeInt32

func (hv2 *HeaderV2) GetBlockBodyTypeInt32() int32

GetBlockBodyTypeInt32 returns the block body type as int32

func (*HeaderV2) GetChainID

func (hv2 *HeaderV2) GetChainID() []byte

GetChainID returns the chain ID

func (*HeaderV2) GetDeveloperFees

func (hv2 *HeaderV2) GetDeveloperFees() *big.Int

GetDeveloperFees returns the block developer fees

func (*HeaderV2) GetEpoch

func (hv2 *HeaderV2) GetEpoch() uint32

GetEpoch returns the header epoch

func (*HeaderV2) GetEpochStartMetaHash

func (hv2 *HeaderV2) GetEpochStartMetaHash() []byte

GetEpochStartMetaHash returns the epoch start metaBlock hash

func (*HeaderV2) GetHeader

func (m *HeaderV2) GetHeader() *Header

func (*HeaderV2) GetLeaderSignature

func (hv2 *HeaderV2) GetLeaderSignature() []byte

GetLeaderSignature returns the leader signature on top of the finalized (signed) header

func (*HeaderV2) GetMetaBlockHashes

func (hv2 *HeaderV2) GetMetaBlockHashes() [][]byte

GetMetaBlockHashes returns the metaBlock hashes

func (*HeaderV2) GetMiniBlockHeaderHandlers

func (hv2 *HeaderV2) GetMiniBlockHeaderHandlers() []data.MiniBlockHeaderHandler

GetMiniBlockHeaderHandlers returns the miniBlock headers as an array of miniBlock header handlers

func (*HeaderV2) GetMiniBlockHeadersHashes

func (hv2 *HeaderV2) GetMiniBlockHeadersHashes() [][]byte

GetMiniBlockHeadersHashes gets the miniblock hashes

func (*HeaderV2) GetMiniBlockHeadersWithDst

func (hv2 *HeaderV2) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32

GetMiniBlockHeadersWithDst as a map of hashes and sender IDs

func (*HeaderV2) GetNonce

func (hv2 *HeaderV2) GetNonce() uint64

GetNonce returns the header nonce

func (*HeaderV2) GetOrderedCrossMiniblocksWithDst

func (hv2 *HeaderV2) 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 (*HeaderV2) GetPrevHash

func (hv2 *HeaderV2) GetPrevHash() []byte

GetPrevHash returns the header previous header hash

func (*HeaderV2) GetPrevRandSeed

func (hv2 *HeaderV2) GetPrevRandSeed() []byte

GetPrevRandSeed returns the header previous random seed

func (*HeaderV2) GetPubKeysBitmap

func (hv2 *HeaderV2) GetPubKeysBitmap() []byte

GetPubKeysBitmap returns the header public key bitmap for the aggregated signatures

func (*HeaderV2) GetRandSeed

func (hv2 *HeaderV2) GetRandSeed() []byte

GetRandSeed returns the header random seed

func (*HeaderV2) GetReceiptsHash

func (hv2 *HeaderV2) GetReceiptsHash() []byte

GetReceiptsHash returns the header receipt hash

func (*HeaderV2) GetReserved

func (hv2 *HeaderV2) GetReserved() []byte

GetReserved returns the reserved field

func (*HeaderV2) GetRootHash

func (hv2 *HeaderV2) GetRootHash() []byte

GetRootHash returns the header root hash

func (*HeaderV2) GetRound

func (hv2 *HeaderV2) GetRound() uint64

GetRound returns the header round

func (*HeaderV2) GetScheduledAccumulatedFees

func (m *HeaderV2) GetScheduledAccumulatedFees() *math_big.Int

func (*HeaderV2) GetScheduledDeveloperFees

func (m *HeaderV2) GetScheduledDeveloperFees() *math_big.Int

func (*HeaderV2) GetScheduledGasPenalized

func (m *HeaderV2) GetScheduledGasPenalized() uint64

func (*HeaderV2) GetScheduledGasProvided

func (m *HeaderV2) GetScheduledGasProvided() uint64

func (*HeaderV2) GetScheduledGasRefunded

func (m *HeaderV2) GetScheduledGasRefunded() uint64

func (*HeaderV2) GetScheduledRootHash

func (m *HeaderV2) GetScheduledRootHash() []byte

func (*HeaderV2) GetShardID

func (hv2 *HeaderV2) GetShardID() uint32

GetShardID returns the header shardID

func (*HeaderV2) GetSignature

func (hv2 *HeaderV2) GetSignature() []byte

GetSignature returns the header aggregated signature

func (*HeaderV2) GetSoftwareVersion

func (hv2 *HeaderV2) GetSoftwareVersion() []byte

GetSoftwareVersion returns the header software version

func (*HeaderV2) GetTimeStamp

func (hv2 *HeaderV2) GetTimeStamp() uint64

GetTimeStamp returns the header timestamp

func (*HeaderV2) GetTxCount

func (hv2 *HeaderV2) GetTxCount() uint32

GetTxCount returns the number of txs included in the block

func (*HeaderV2) GoString

func (this *HeaderV2) GoString() string

func (*HeaderV2) HasScheduledMiniBlocks

func (hv2 *HeaderV2) HasScheduledMiniBlocks() bool

HasScheduledMiniBlocks returns true if the header has scheduled miniBlock headers

func (*HeaderV2) HasScheduledSupport

func (hv2 *HeaderV2) HasScheduledSupport() bool

HasScheduledSupport returns true as the second block version does support scheduled data

func (*HeaderV2) IsInterfaceNil

func (hv2 *HeaderV2) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*HeaderV2) IsStartOfEpochBlock

func (hv2 *HeaderV2) IsStartOfEpochBlock() bool

IsStartOfEpochBlock verifies if the block is of type start of epoch

func (*HeaderV2) MapMiniBlockHashesToShards

func (hv2 *HeaderV2) MapMiniBlockHashesToShards() map[string]uint32

MapMiniBlockHashesToShards is a map of mini block hashes and sender IDs

func (*HeaderV2) Marshal

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

func (*HeaderV2) MarshalTo

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

func (*HeaderV2) MarshalToSizedBuffer

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

func (*HeaderV2) ProtoMessage

func (*HeaderV2) ProtoMessage()

func (*HeaderV2) Reset

func (m *HeaderV2) Reset()

func (*HeaderV2) SetAccumulatedFees

func (hv2 *HeaderV2) SetAccumulatedFees(value *big.Int) error

SetAccumulatedFees sets the accumulated fees in the header

func (*HeaderV2) SetAdditionalData

func (hv2 *HeaderV2) SetAdditionalData(headerVersionData headerVersionData.HeaderAdditionalData) error

SetAdditionalData sets the additional version related data for the header

func (*HeaderV2) SetBlockBodyTypeInt32

func (hv2 *HeaderV2) SetBlockBodyTypeInt32(blockBodyType int32) error

SetBlockBodyTypeInt32 sets the blockBodyType in the header

func (*HeaderV2) SetChainID

func (hv2 *HeaderV2) SetChainID(chainID []byte) error

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

func (*HeaderV2) SetDeveloperFees

func (hv2 *HeaderV2) SetDeveloperFees(value *big.Int) error

SetDeveloperFees sets the developer fees in the header

func (*HeaderV2) SetEpoch

func (hv2 *HeaderV2) SetEpoch(e uint32) error

SetEpoch sets header epoch

func (*HeaderV2) SetEpochStartMetaHash

func (hv2 *HeaderV2) SetEpochStartMetaHash(hash []byte) error

SetEpochStartMetaHash sets the epoch start metaBlock hash

func (*HeaderV2) SetLeaderSignature

func (hv2 *HeaderV2) SetLeaderSignature(sg []byte) error

SetLeaderSignature will set the leader's signature

func (*HeaderV2) SetMetaBlockHashes

func (hv2 *HeaderV2) SetMetaBlockHashes(hashes [][]byte) error

SetMetaBlockHashes sets the metaBlock hashes

func (*HeaderV2) SetMiniBlockHeaderHandlers

func (hv2 *HeaderV2) SetMiniBlockHeaderHandlers(mbHeaderHandlers []data.MiniBlockHeaderHandler) error

SetMiniBlockHeaderHandlers sets the miniBlock headers from the given miniBlock header handlers

func (*HeaderV2) SetNonce

func (hv2 *HeaderV2) SetNonce(n uint64) error

SetNonce sets header nonce

func (*HeaderV2) SetPrevHash

func (hv2 *HeaderV2) SetPrevHash(pvHash []byte) error

SetPrevHash sets prev hash

func (*HeaderV2) SetPrevRandSeed

func (hv2 *HeaderV2) SetPrevRandSeed(pvRandSeed []byte) error

SetPrevRandSeed sets previous random seed

func (*HeaderV2) SetPubKeysBitmap

func (hv2 *HeaderV2) SetPubKeysBitmap(pkbm []byte) error

SetPubKeysBitmap sets public key bitmap

func (*HeaderV2) SetRandSeed

func (hv2 *HeaderV2) SetRandSeed(randSeed []byte) error

SetRandSeed sets previous random seed

func (*HeaderV2) SetReceiptsHash

func (hv2 *HeaderV2) SetReceiptsHash(hash []byte) error

SetReceiptsHash sets the receipts hash

func (*HeaderV2) SetRootHash

func (hv2 *HeaderV2) SetRootHash(rHash []byte) error

SetRootHash sets root hash

func (*HeaderV2) SetRound

func (hv2 *HeaderV2) SetRound(r uint64) error

SetRound sets header round

func (*HeaderV2) SetScheduledAccumulatedFees

func (hv2 *HeaderV2) SetScheduledAccumulatedFees(value *big.Int) error

SetScheduledAccumulatedFees sets the scheduled accumulated fees

func (*HeaderV2) SetScheduledDeveloperFees

func (hv2 *HeaderV2) SetScheduledDeveloperFees(value *big.Int) error

SetScheduledDeveloperFees sets the scheduled developer fees

func (*HeaderV2) SetScheduledGasPenalized

func (hv2 *HeaderV2) SetScheduledGasPenalized(gasPenalized uint64) error

SetScheduledGasPenalized sets the scheduled SC calls penalized gas

func (*HeaderV2) SetScheduledGasProvided

func (hv2 *HeaderV2) SetScheduledGasProvided(gasProvided uint64) error

SetScheduledGasProvided sets the scheduled SC calls provided gas

func (*HeaderV2) SetScheduledGasRefunded

func (hv2 *HeaderV2) SetScheduledGasRefunded(gasRefunded uint64) error

SetScheduledGasRefunded sets the scheduled SC calls refunded gas

func (*HeaderV2) SetScheduledRootHash

func (hv2 *HeaderV2) SetScheduledRootHash(rootHash []byte) error

SetScheduledRootHash sets the scheduled root hash

func (*HeaderV2) SetShardID

func (hv2 *HeaderV2) SetShardID(shId uint32) error

SetShardID sets header shard ID

func (*HeaderV2) SetSignature

func (hv2 *HeaderV2) SetSignature(sg []byte) error

SetSignature sets header signature

func (*HeaderV2) SetSoftwareVersion

func (hv2 *HeaderV2) SetSoftwareVersion(version []byte) error

SetSoftwareVersion sets the software version of the header

func (*HeaderV2) SetTimeStamp

func (hv2 *HeaderV2) SetTimeStamp(ts uint64) error

SetTimeStamp sets header timestamp

func (*HeaderV2) SetTxCount

func (hv2 *HeaderV2) SetTxCount(txCount uint32) error

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

func (*HeaderV2) ShallowClone

func (hv2 *HeaderV2) ShallowClone() data.HeaderHandler

ShallowClone returns a clone of the object

func (*HeaderV2) Size

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

func (*HeaderV2) String

func (this *HeaderV2) String() string

func (*HeaderV2) Unmarshal

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

func (*HeaderV2) ValidateHeaderVersion

func (hv2 *HeaderV2) ValidateHeaderVersion() error

ValidateHeaderVersion does extra validation for header version

func (*HeaderV2) XXX_DiscardUnknown

func (m *HeaderV2) XXX_DiscardUnknown()

func (*HeaderV2) XXX_Marshal

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

func (*HeaderV2) XXX_Merge

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

func (*HeaderV2) XXX_Size

func (m *HeaderV2) XXX_Size() int

func (*HeaderV2) XXX_Unmarshal

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

type MetaBlock

type MetaBlock struct {
	Nonce                  uint64            `protobuf:"varint,1,opt,name=Nonce,proto3" json:"nonce"`
	Epoch                  uint32            `protobuf:"varint,2,opt,name=Epoch,proto3" json:"epoch"`
	Round                  uint64            `protobuf:"varint,3,opt,name=Round,proto3" json:"round"`
	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,omitempty"`
	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     `` /* 166-byte string literal not displayed */
	AccumulatedFeesInEpoch *math_big.Int     `` /* 180-byte string literal not displayed */
	DeveloperFees          *math_big.Int     `` /* 162-byte string literal not displayed */
	DevFeesInEpoch         *math_big.Int     `` /* 164-byte string literal not displayed */
	TxCount                uint32            `protobuf:"varint,25,opt,name=TxCount,proto3" json:"txCount"`
	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) CheckFieldsForNil

func (m *MetaBlock) CheckFieldsForNil() error

CheckFieldsForNil checks a predefined set of fields for nil values

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) GetAdditionalData

func (m *MetaBlock) GetAdditionalData() headerVersionData.HeaderAdditionalData

GetAdditionalData gets the additional version-related data for the header

func (*MetaBlock) GetChainID

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

func (*MetaBlock) GetDevFeesInEpoch

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

func (*MetaBlock) GetDeveloperFees

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) GetEpochStartHandler

func (m *MetaBlock) GetEpochStartHandler() data.EpochStartHandler

GetEpochStartHandler -

func (*MetaBlock) GetLeaderSignature

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

func (*MetaBlock) GetMiniBlockHeaderHandlers

func (m *MetaBlock) GetMiniBlockHeaderHandlers() []data.MiniBlockHeaderHandler

GetMiniBlockHeaderHandlers returns the miniBlock headers as an array of miniBlock header handlers

func (*MetaBlock) GetMiniBlockHeaders

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

func (*MetaBlock) GetMiniBlockHeadersHashes

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

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

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) GetShardInfoHandlers

func (m *MetaBlock) GetShardInfoHandlers() []data.ShardDataHandler

GetShardInfoHandlers - gets the shardInfo as an array of ShardDataHandler

func (*MetaBlock) GetSignature

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

func (*MetaBlock) GetSoftwareVersion

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) HasScheduledMiniBlocks

func (m *MetaBlock) HasScheduledMiniBlocks() bool

HasScheduledMiniBlocks returns true if the metaBlock holds scheduled miniBlocks

func (*MetaBlock) HasScheduledSupport

func (m *MetaBlock) HasScheduledSupport() bool

HasScheduledSupport returns false as the initial metaBlock version does not support scheduled data

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) error

SetAccumulatedFees sets the accumulated fees in the header

func (*MetaBlock) SetAccumulatedFeesInEpoch

func (m *MetaBlock) SetAccumulatedFeesInEpoch(value *big.Int) error

SetAccumulatedFeesInEpoch sets the epoch accumulated fees in the header

func (*MetaBlock) SetAdditionalData

func (m *MetaBlock) SetAdditionalData(_ headerVersionData.HeaderAdditionalData) error

SetAdditionalData sets the additional version-related data

func (*MetaBlock) SetChainID

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

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

func (*MetaBlock) SetDevFeesInEpoch

func (m *MetaBlock) SetDevFeesInEpoch(value *big.Int) error

SetDevFeesInEpoch sets the developer fees in the header

func (*MetaBlock) SetDeveloperFees

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

SetDeveloperFees sets the developer fees in the header

func (*MetaBlock) SetEpoch

func (m *MetaBlock) SetEpoch(e uint32) error

SetEpoch sets header epoch

func (*MetaBlock) SetLeaderSignature

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

SetLeaderSignature will set the leader's signature

func (*MetaBlock) SetMiniBlockHeaderHandlers

func (m *MetaBlock) SetMiniBlockHeaderHandlers(mbHeaderHandlers []data.MiniBlockHeaderHandler) error

SetMiniBlockHeaderHandlers sets the miniBlock headers from the given miniBlock header handlers

func (*MetaBlock) SetNonce

func (m *MetaBlock) SetNonce(n uint64) error

SetNonce sets header nonce

func (*MetaBlock) SetPrevHash

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

SetPrevHash sets prev hash

func (*MetaBlock) SetPrevRandSeed

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

SetPrevRandSeed sets the previous randomness seed

func (*MetaBlock) SetPubKeysBitmap

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

SetPubKeysBitmap sets public key bitmap

func (*MetaBlock) SetRandSeed

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

SetRandSeed sets the current random seed

func (*MetaBlock) SetReceiptsHash

func (m *MetaBlock) SetReceiptsHash(hash []byte) error

SetReceiptsHash sets the receipts hash

func (*MetaBlock) SetRootHash

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

SetRootHash sets root hash

func (*MetaBlock) SetRound

func (m *MetaBlock) SetRound(r uint64) error

SetRound sets header round

func (*MetaBlock) SetScheduledRootHash

func (m *MetaBlock) SetScheduledRootHash(_ []byte) error

SetScheduledRootHash not supported on the first version of metablock

func (*MetaBlock) SetShardID

func (m *MetaBlock) SetShardID(_ uint32) error

SetShardID sets header shard ID

func (*MetaBlock) SetShardInfoHandlers

func (m *MetaBlock) SetShardInfoHandlers(shardInfo []data.ShardDataHandler) error

SetShardInfoHandlers -

func (*MetaBlock) SetSignature

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

SetSignature set header signature

func (*MetaBlock) SetSoftwareVersion

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

SetSoftwareVersion sets the software version of the block

func (*MetaBlock) SetTimeStamp

func (m *MetaBlock) SetTimeStamp(ts uint64) error

SetTimeStamp sets header timestamp

func (*MetaBlock) SetTxCount

func (m *MetaBlock) SetTxCount(txCount uint32) error

SetTxCount sets the transaction count of the current meta block

func (*MetaBlock) SetValidatorStatsRootHash

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

SetValidatorStatsRootHash sets the root hash for the validator statistics trie

func (*MetaBlock) ShallowClone

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

ShallowClone will return a clone of the object

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) ValidateHeaderVersion

func (m *MetaBlock) ValidateHeaderVersion() error

ValidateHeaderVersion - always valid for initial version

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 MetaTriggerRegistry

type MetaTriggerRegistry struct {
	Epoch                       uint32     `protobuf:"varint,1,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	CurrentRound                uint64     `protobuf:"varint,2,opt,name=CurrentRound,proto3" json:"CurrentRound,omitempty"`
	EpochFinalityAttestingRound uint64     `protobuf:"varint,3,opt,name=EpochFinalityAttestingRound,proto3" json:"EpochFinalityAttestingRound,omitempty"`
	CurrEpochStartRound         uint64     `protobuf:"varint,4,opt,name=CurrEpochStartRound,proto3" json:"CurrEpochStartRound,omitempty"`
	PrevEpochStartRound         uint64     `protobuf:"varint,5,opt,name=PrevEpochStartRound,proto3" json:"PrevEpochStartRound,omitempty"`
	EpochStartMetaHash          []byte     `protobuf:"bytes,6,opt,name=EpochStartMetaHash,proto3" json:"EpochStartMetaHash,omitempty"`
	EpochStartMeta              *MetaBlock `protobuf:"bytes,7,opt,name=EpochStartMeta,proto3" json:"EpochStartMeta,omitempty"`
}

func (*MetaTriggerRegistry) Descriptor

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

func (*MetaTriggerRegistry) Equal

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

func (*MetaTriggerRegistry) GetCurrEpochStartRound

func (m *MetaTriggerRegistry) GetCurrEpochStartRound() uint64

func (*MetaTriggerRegistry) GetCurrentRound

func (m *MetaTriggerRegistry) GetCurrentRound() uint64

func (*MetaTriggerRegistry) GetEpoch

func (m *MetaTriggerRegistry) GetEpoch() uint32

func (*MetaTriggerRegistry) GetEpochFinalityAttestingRound

func (m *MetaTriggerRegistry) GetEpochFinalityAttestingRound() uint64

func (*MetaTriggerRegistry) GetEpochStartMeta

func (m *MetaTriggerRegistry) GetEpochStartMeta() *MetaBlock

func (*MetaTriggerRegistry) GetEpochStartMetaHash

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

func (*MetaTriggerRegistry) GetPrevEpochStartRound

func (m *MetaTriggerRegistry) GetPrevEpochStartRound() uint64

func (*MetaTriggerRegistry) GoString

func (this *MetaTriggerRegistry) GoString() string

func (*MetaTriggerRegistry) Marshal

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

func (*MetaTriggerRegistry) MarshalTo

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

func (*MetaTriggerRegistry) MarshalToSizedBuffer

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

func (*MetaTriggerRegistry) ProtoMessage

func (*MetaTriggerRegistry) ProtoMessage()

func (*MetaTriggerRegistry) Reset

func (m *MetaTriggerRegistry) Reset()

func (*MetaTriggerRegistry) Size

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

func (*MetaTriggerRegistry) String

func (this *MetaTriggerRegistry) String() string

func (*MetaTriggerRegistry) Unmarshal

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

func (*MetaTriggerRegistry) XXX_DiscardUnknown

func (m *MetaTriggerRegistry) XXX_DiscardUnknown()

func (*MetaTriggerRegistry) XXX_Marshal

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

func (*MetaTriggerRegistry) XXX_Merge

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

func (*MetaTriggerRegistry) XXX_Size

func (m *MetaTriggerRegistry) XXX_Size() int

func (*MetaTriggerRegistry) XXX_Unmarshal

func (m *MetaTriggerRegistry) 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"`
	SenderShardID   uint32   `protobuf:"varint,3,opt,name=SenderShardID,proto3" json:"senderShardID"`
	Type            Type     `protobuf:"varint,4,opt,name=Type,proto3,enum=proto.Type" json:"type"`
	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) GetMiniBlockReserved

func (mb *MiniBlock) GetMiniBlockReserved() (*MiniBlockReserved, error)

GetMiniBlockReserved returns the unmarshalled reserved field for the miniblock

func (*MiniBlock) GetProcessingType

func (mb *MiniBlock) GetProcessingType() int32

GetProcessingType returns the miniBlock processing type as a int32

func (*MiniBlock) GetReceiverShardID

func (m *MiniBlock) GetReceiverShardID() uint32

func (*MiniBlock) GetReserved

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

func (*MiniBlock) GetSenderShardID

func (m *MiniBlock) GetSenderShardID() uint32

func (*MiniBlock) GetTxHashes

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

func (*MiniBlock) GetTxsTypeFromMiniBlock

func (mb *MiniBlock) GetTxsTypeFromMiniBlock() ([]Type, error)

GetTxsTypeFromMiniBlock returns all the txs type from mini block

func (*MiniBlock) GetType

func (m *MiniBlock) GetType() Type

func (*MiniBlock) GoString

func (this *MiniBlock) GoString() string

func (*MiniBlock) IsScheduledMiniBlock

func (mb *MiniBlock) IsScheduledMiniBlock() bool

IsScheduledMiniBlock returns if the mini block is of type scheduled or not

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) SetMiniBlockReserved

func (mb *MiniBlock) SetMiniBlockReserved(mbr *MiniBlockReserved) error

SetMiniBlockReserved sets the reserved field for the miniBlock with the given parameter

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"`
	ReceiverShardID uint32 `protobuf:"varint,3,opt,name=ReceiverShardID,proto3" json:"receiverShardID"`
	TxCount         uint32 `protobuf:"varint,4,opt,name=TxCount,proto3" json:"txCount"`
	Type            Type   `protobuf:"varint,5,opt,name=Type,proto3,enum=proto.Type" json:"type"`
	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) GetConstructionState

func (m *MiniBlockHeader) GetConstructionState() int32

GetConstructionState returns the construction state of the miniBlock

func (*MiniBlockHeader) GetHash

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

func (*MiniBlockHeader) GetIndexOfFirstTxProcessed

func (m *MiniBlockHeader) GetIndexOfFirstTxProcessed() int32

GetIndexOfFirstTxProcessed returns index of the first transaction processed in the miniBlock

func (*MiniBlockHeader) GetIndexOfLastTxProcessed

func (m *MiniBlockHeader) GetIndexOfLastTxProcessed() int32

GetIndexOfLastTxProcessed returns index of the last transaction processed in the miniBlock

func (*MiniBlockHeader) GetProcessingType

func (m *MiniBlockHeader) GetProcessingType() int32

GetProcessingType returns the miniBlock processing type as a int32

func (*MiniBlockHeader) GetReceiverShardID

func (m *MiniBlockHeader) GetReceiverShardID() uint32

func (*MiniBlockHeader) GetReserved

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) GetTypeInt32

func (m *MiniBlockHeader) GetTypeInt32() int32

GetTypeInt32 gets the miniBlock type

func (*MiniBlockHeader) GoString

func (this *MiniBlockHeader) GoString() string

func (*MiniBlockHeader) IsFinal

func (m *MiniBlockHeader) IsFinal() bool

IsFinal returns true if the miniBlock is final

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) SetConstructionState

func (m *MiniBlockHeader) SetConstructionState(state int32) error

SetConstructionState sets the construction state of the miniBlock

func (*MiniBlockHeader) SetHash

func (m *MiniBlockHeader) SetHash(hash []byte) error

SetHash sets the miniBlock hash

func (*MiniBlockHeader) SetIndexOfFirstTxProcessed

func (m *MiniBlockHeader) SetIndexOfFirstTxProcessed(indexOfFirstTxProcessed int32) error

SetIndexOfFirstTxProcessed sets index of the first transaction processed in the miniBlock

func (*MiniBlockHeader) SetIndexOfLastTxProcessed

func (m *MiniBlockHeader) SetIndexOfLastTxProcessed(indexOfLastTxProcessed int32) error

SetIndexOfLastTxProcessed sets index of the last transaction processed in the miniBlock

func (*MiniBlockHeader) SetProcessingType

func (m *MiniBlockHeader) SetProcessingType(procType int32) error

SetProcessingType sets the miniBlock processing type

func (*MiniBlockHeader) SetReceiverShardID

func (m *MiniBlockHeader) SetReceiverShardID(shardID uint32) error

SetReceiverShardID sets the miniBlock receiver ShardID

func (*MiniBlockHeader) SetReserved

func (m *MiniBlockHeader) SetReserved(reserved []byte) error

SetReserved sets the miniBlock reserved field

func (*MiniBlockHeader) SetSenderShardID

func (m *MiniBlockHeader) SetSenderShardID(shardID uint32) error

SetSenderShardID sets the miniBlock sender shardID

func (*MiniBlockHeader) SetTxCount

func (m *MiniBlockHeader) SetTxCount(count uint32) error

SetTxCount sets the miniBlock txs count

func (*MiniBlockHeader) SetTypeInt32

func (m *MiniBlockHeader) SetTypeInt32(t int32) error

SetTypeInt32 sets the miniBlock type

func (*MiniBlockHeader) ShallowClone

func (m *MiniBlockHeader) ShallowClone() data.MiniBlockHeaderHandler

ShallowClone returns the miniBlockHeader swallow clone

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 MiniBlockHeaderReserved

type MiniBlockHeaderReserved struct {
	ExecutionType           ProcessingType `protobuf:"varint,1,opt,name=ExecutionType,proto3,enum=proto.ProcessingType" json:"executionType"`
	State                   MiniBlockState `protobuf:"varint,2,opt,name=State,proto3,enum=proto.MiniBlockState" json:"state"`
	IndexOfFirstTxProcessed int32          `protobuf:"varint,3,opt,name=IndexOfFirstTxProcessed,proto3" json:"indexOfFirstTxProcessed"`
	IndexOfLastTxProcessed  int32          `protobuf:"varint,4,opt,name=IndexOfLastTxProcessed,proto3" json:"indexOfLastTxProcessed"`
}

func (*MiniBlockHeaderReserved) Descriptor

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

func (*MiniBlockHeaderReserved) Equal

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

func (*MiniBlockHeaderReserved) GetExecutionType

func (m *MiniBlockHeaderReserved) GetExecutionType() ProcessingType

func (*MiniBlockHeaderReserved) GetIndexOfFirstTxProcessed

func (m *MiniBlockHeaderReserved) GetIndexOfFirstTxProcessed() int32

func (*MiniBlockHeaderReserved) GetIndexOfLastTxProcessed

func (m *MiniBlockHeaderReserved) GetIndexOfLastTxProcessed() int32

func (*MiniBlockHeaderReserved) GetState

func (*MiniBlockHeaderReserved) GoString

func (this *MiniBlockHeaderReserved) GoString() string

func (*MiniBlockHeaderReserved) Marshal

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

func (*MiniBlockHeaderReserved) MarshalTo

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

func (*MiniBlockHeaderReserved) MarshalToSizedBuffer

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

func (*MiniBlockHeaderReserved) ProtoMessage

func (*MiniBlockHeaderReserved) ProtoMessage()

func (*MiniBlockHeaderReserved) Reset

func (m *MiniBlockHeaderReserved) Reset()

func (*MiniBlockHeaderReserved) Size

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

func (*MiniBlockHeaderReserved) String

func (this *MiniBlockHeaderReserved) String() string

func (*MiniBlockHeaderReserved) Unmarshal

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

func (*MiniBlockHeaderReserved) XXX_DiscardUnknown

func (m *MiniBlockHeaderReserved) XXX_DiscardUnknown()

func (*MiniBlockHeaderReserved) XXX_Marshal

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

func (*MiniBlockHeaderReserved) XXX_Merge

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

func (*MiniBlockHeaderReserved) XXX_Size

func (m *MiniBlockHeaderReserved) XXX_Size() int

func (*MiniBlockHeaderReserved) XXX_Unmarshal

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

type MiniBlockReserved

type MiniBlockReserved struct {
	ExecutionType    ProcessingType `protobuf:"varint,1,opt,name=ExecutionType,proto3,enum=proto.ProcessingType" json:"executionType"`
	TransactionsType []byte         `protobuf:"bytes,2,opt,name=TransactionsType,proto3" json:"transactionsType"`
}

func (*MiniBlockReserved) Descriptor

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

func (*MiniBlockReserved) Equal

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

func (*MiniBlockReserved) GetExecutionType

func (m *MiniBlockReserved) GetExecutionType() ProcessingType

func (*MiniBlockReserved) GetTransactionsType

func (m *MiniBlockReserved) GetTransactionsType() []byte

func (*MiniBlockReserved) GoString

func (this *MiniBlockReserved) GoString() string

func (*MiniBlockReserved) Marshal

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

func (*MiniBlockReserved) MarshalTo

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

func (*MiniBlockReserved) MarshalToSizedBuffer

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

func (*MiniBlockReserved) ProtoMessage

func (*MiniBlockReserved) ProtoMessage()

func (*MiniBlockReserved) Reset

func (m *MiniBlockReserved) Reset()

func (*MiniBlockReserved) Size

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

func (*MiniBlockReserved) String

func (this *MiniBlockReserved) String() string

func (*MiniBlockReserved) Unmarshal

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

func (*MiniBlockReserved) XXX_DiscardUnknown

func (m *MiniBlockReserved) XXX_DiscardUnknown()

func (*MiniBlockReserved) XXX_Marshal

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

func (*MiniBlockReserved) XXX_Merge

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

func (*MiniBlockReserved) XXX_Size

func (m *MiniBlockReserved) XXX_Size() int

func (*MiniBlockReserved) XXX_Unmarshal

func (m *MiniBlockReserved) 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 MiniBlockState

type MiniBlockState int32
const (
	Final           MiniBlockState = 0
	Proposed        MiniBlockState = 1
	PartialExecuted MiniBlockState = 2
)

func (MiniBlockState) EnumDescriptor

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

func (MiniBlockState) String

func (x MiniBlockState) String() string

type MiniblockAndHash

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"`
}

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) SetPubKey

func (pc *PeerChange) SetPubKey(pubKey []byte) error

SetPubKey - setter for public key

func (*PeerChange) SetShardIdDest

func (pc *PeerChange) SetShardIdDest(shardID uint32) error

SetShardIdDest - setter for destination shardID

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"`
	TimeStamp   uint64        `protobuf:"varint,4,opt,name=TimeStamp,proto3" json:"timeStamp,omitempty"`
	ValueChange *math_big.Int `` /* 157-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 ProcessingType

type ProcessingType int32
const (
	Normal    ProcessingType = 0
	Scheduled ProcessingType = 1
	Processed ProcessingType = 2
)

func (ProcessingType) EnumDescriptor

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

func (ProcessingType) String

func (x ProcessingType) String() string

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"`
	PrevHash              []byte            `protobuf:"bytes,9,opt,name=PrevHash,proto3" json:"prevHash,omitempty"`
	Nonce                 uint64            `protobuf:"varint,10,opt,name=Nonce,proto3" json:"nonce"`
	AccumulatedFees       *math_big.Int     `` /* 166-byte string literal not displayed */
	DeveloperFees         *math_big.Int     `` /* 162-byte string literal not displayed */
	NumPendingMiniBlocks  uint32            `protobuf:"varint,11,opt,name=NumPendingMiniBlocks,proto3" json:"numPendingMiniBlocks"`
	LastIncludedMetaNonce uint64            `protobuf:"varint,13,opt,name=LastIncludedMetaNonce,proto3" json:"lastIncludedMetaNonce"`
	ShardID               uint32            `protobuf:"varint,1,opt,name=ShardID,proto3" json:"shardID"`
	TxCount               uint32            `protobuf:"varint,7,opt,name=TxCount,proto3" json:"txCount"`
}

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

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

func (*ShardData) GetHeaderHash

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

func (*ShardData) GetLastIncludedMetaNonce

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) GetShardMiniBlockHeaderHandlers

func (sd *ShardData) GetShardMiniBlockHeaderHandlers() []data.MiniBlockHeaderHandler

GetShardMiniBlockHeaderHandlers returns the shard miniBlockHeaders as MiniBlockHeaderHandlers

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) SetAccumulatedFees

func (sd *ShardData) SetAccumulatedFees(fees *big.Int) error

SetAccumulatedFees sets the accumulatedFees

func (*ShardData) SetDeveloperFees

func (sd *ShardData) SetDeveloperFees(fees *big.Int) error

SetDeveloperFees sets the developerFees

func (*ShardData) SetHeaderHash

func (sd *ShardData) SetHeaderHash(hash []byte) error

SetHeaderHash sets the header hash

func (*ShardData) SetLastIncludedMetaNonce

func (sd *ShardData) SetLastIncludedMetaNonce(nonce uint64) error

SetLastIncludedMetaNonce sets the last included metaBlock nonce

func (*ShardData) SetNonce

func (sd *ShardData) SetNonce(nonce uint64) error

SetNonce sets the nonce

func (*ShardData) SetNumPendingMiniBlocks

func (sd *ShardData) SetNumPendingMiniBlocks(num uint32) error

SetNumPendingMiniBlocks sets the number of pending miniBlocks

func (*ShardData) SetPrevHash

func (sd *ShardData) SetPrevHash(prevHash []byte) error

SetPrevHash sets the prevHash

func (*ShardData) SetPrevRandSeed

func (sd *ShardData) SetPrevRandSeed(prevRandSeed []byte) error

SetPrevRandSeed sets the prevRandSeed

func (*ShardData) SetPubKeysBitmap

func (sd *ShardData) SetPubKeysBitmap(pubKeysBitmap []byte) error

SetPubKeysBitmap sets the pubKeysBitmap

func (*ShardData) SetRound

func (sd *ShardData) SetRound(round uint64) error

SetRound sets the round

func (*ShardData) SetShardID

func (sd *ShardData) SetShardID(shardID uint32) error

SetShardID sets the shardID

func (*ShardData) SetShardMiniBlockHeaderHandlers

func (sd *ShardData) SetShardMiniBlockHeaderHandlers(mbHeaderHandlers []data.MiniBlockHeaderHandler) error

SetShardMiniBlockHeaderHandlers sets the miniBlockHeaders from a list of MiniBlockHeaderHandler

func (*ShardData) SetSignature

func (sd *ShardData) SetSignature(signature []byte) error

SetSignature sets the signature

func (*ShardData) SetTxCount

func (sd *ShardData) SetTxCount(txCount uint32) error

SetTxCount sets the transaction count

func (*ShardData) ShallowClone

func (sd *ShardData) ShallowClone() data.ShardDataHandler

ShallowClone creates and returns a shallow clone of shardData

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 ShardTriggerRegistry

type ShardTriggerRegistry struct {
	IsEpochStart                bool    `protobuf:"varint,1,opt,name=IsEpochStart,proto3" json:"IsEpochStart,omitempty"`
	NewEpochHeaderReceived      bool    `protobuf:"varint,2,opt,name=NewEpochHeaderReceived,proto3" json:"NewEpochHeaderReceived,omitempty"`
	Epoch                       uint32  `protobuf:"varint,3,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	MetaEpoch                   uint32  `protobuf:"varint,4,opt,name=MetaEpoch,proto3" json:"MetaEpoch,omitempty"`
	CurrentRoundIndex           int64   `protobuf:"varint,5,opt,name=CurrentRoundIndex,proto3" json:"CurrentRoundIndex,omitempty"`
	EpochStartRound             uint64  `protobuf:"varint,6,opt,name=EpochStartRound,proto3" json:"EpochStartRound,omitempty"`
	EpochFinalityAttestingRound uint64  `protobuf:"varint,7,opt,name=EpochFinalityAttestingRound,proto3" json:"EpochFinalityAttestingRound,omitempty"`
	EpochMetaBlockHash          []byte  `protobuf:"bytes,8,opt,name=EpochMetaBlockHash,proto3" json:"EpochMetaBlockHash,omitempty"`
	EpochStartShardHeader       *Header `protobuf:"bytes,9,opt,name=EpochStartShardHeader,proto3" json:"EpochStartShardHeader,omitempty"`
}

func (*ShardTriggerRegistry) Descriptor

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

func (*ShardTriggerRegistry) Equal

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

func (*ShardTriggerRegistry) GetCurrentRoundIndex

func (m *ShardTriggerRegistry) GetCurrentRoundIndex() int64

func (*ShardTriggerRegistry) GetEpoch

func (m *ShardTriggerRegistry) GetEpoch() uint32

func (*ShardTriggerRegistry) GetEpochFinalityAttestingRound

func (m *ShardTriggerRegistry) GetEpochFinalityAttestingRound() uint64

func (*ShardTriggerRegistry) GetEpochMetaBlockHash

func (m *ShardTriggerRegistry) GetEpochMetaBlockHash() []byte

func (*ShardTriggerRegistry) GetEpochStartHeaderHandler

func (str *ShardTriggerRegistry) GetEpochStartHeaderHandler() data.HeaderHandler

GetEpochStartHeaderHandler returns the epoch start headerHandler

func (*ShardTriggerRegistry) GetEpochStartRound

func (m *ShardTriggerRegistry) GetEpochStartRound() uint64

func (*ShardTriggerRegistry) GetEpochStartShardHeader

func (m *ShardTriggerRegistry) GetEpochStartShardHeader() *Header

func (*ShardTriggerRegistry) GetIsEpochStart

func (m *ShardTriggerRegistry) GetIsEpochStart() bool

func (*ShardTriggerRegistry) GetMetaEpoch

func (m *ShardTriggerRegistry) GetMetaEpoch() uint32

func (*ShardTriggerRegistry) GetNewEpochHeaderReceived

func (m *ShardTriggerRegistry) GetNewEpochHeaderReceived() bool

func (*ShardTriggerRegistry) GoString

func (this *ShardTriggerRegistry) GoString() string

func (*ShardTriggerRegistry) Marshal

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

func (*ShardTriggerRegistry) MarshalTo

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

func (*ShardTriggerRegistry) MarshalToSizedBuffer

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

func (*ShardTriggerRegistry) ProtoMessage

func (*ShardTriggerRegistry) ProtoMessage()

func (*ShardTriggerRegistry) Reset

func (m *ShardTriggerRegistry) Reset()

func (*ShardTriggerRegistry) SetCurrentRoundIndex

func (str *ShardTriggerRegistry) SetCurrentRoundIndex(roundIndex int64) error

SetCurrentRoundIndex sets the current round index

func (*ShardTriggerRegistry) SetEpoch

func (str *ShardTriggerRegistry) SetEpoch(epoch uint32) error

SetEpoch sets the epoch

func (*ShardTriggerRegistry) SetEpochFinalityAttestingRound

func (str *ShardTriggerRegistry) SetEpochFinalityAttestingRound(finalityAttestingRound uint64) error

SetEpochFinalityAttestingRound sets the epoch finality attesting round

func (*ShardTriggerRegistry) SetEpochMetaBlockHash

func (str *ShardTriggerRegistry) SetEpochMetaBlockHash(epochMetaBlockHash []byte) error

SetEpochMetaBlockHash sets the epoch metaChain block hash

func (*ShardTriggerRegistry) SetEpochStartHeaderHandler

func (str *ShardTriggerRegistry) SetEpochStartHeaderHandler(epochStartHeaderHandler data.HeaderHandler) error

SetEpochStartHeaderHandler sets the epoch start header

func (*ShardTriggerRegistry) SetEpochStartRound

func (str *ShardTriggerRegistry) SetEpochStartRound(startRound uint64) error

SetEpochStartRound sets the epoch start round

func (*ShardTriggerRegistry) SetIsEpochStart

func (str *ShardTriggerRegistry) SetIsEpochStart(isEpochStart bool) error

SetIsEpochStart sets the isEpochStart flag

func (*ShardTriggerRegistry) SetMetaEpoch

func (str *ShardTriggerRegistry) SetMetaEpoch(metaEpoch uint32) error

SetMetaEpoch Sets the metaChain epoch

func (*ShardTriggerRegistry) SetNewEpochHeaderReceived

func (str *ShardTriggerRegistry) SetNewEpochHeaderReceived(newEpochHeaderReceived bool) error

SetNewEpochHeaderReceived sets the newEpochHeaderReceived flag

func (*ShardTriggerRegistry) Size

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

func (*ShardTriggerRegistry) String

func (this *ShardTriggerRegistry) String() string

func (*ShardTriggerRegistry) Unmarshal

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

func (*ShardTriggerRegistry) XXX_DiscardUnknown

func (m *ShardTriggerRegistry) XXX_DiscardUnknown()

func (*ShardTriggerRegistry) XXX_Marshal

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

func (*ShardTriggerRegistry) XXX_Merge

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

func (*ShardTriggerRegistry) XXX_Size

func (m *ShardTriggerRegistry) XXX_Size() int

func (*ShardTriggerRegistry) XXX_Unmarshal

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

type ShardTriggerRegistryV2

type ShardTriggerRegistryV2 struct {
	EpochStartShardHeader       *HeaderV2 `protobuf:"bytes,1,opt,name=EpochStartShardHeader,proto3" json:"EpochStartShardHeader,omitempty"`
	IsEpochStart                bool      `protobuf:"varint,2,opt,name=IsEpochStart,proto3" json:"IsEpochStart,omitempty"`
	NewEpochHeaderReceived      bool      `protobuf:"varint,3,opt,name=NewEpochHeaderReceived,proto3" json:"NewEpochHeaderReceived,omitempty"`
	Epoch                       uint32    `protobuf:"varint,4,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	MetaEpoch                   uint32    `protobuf:"varint,5,opt,name=MetaEpoch,proto3" json:"MetaEpoch,omitempty"`
	CurrentRoundIndex           int64     `protobuf:"varint,6,opt,name=CurrentRoundIndex,proto3" json:"CurrentRoundIndex,omitempty"`
	EpochStartRound             uint64    `protobuf:"varint,7,opt,name=EpochStartRound,proto3" json:"EpochStartRound,omitempty"`
	EpochFinalityAttestingRound uint64    `protobuf:"varint,8,opt,name=EpochFinalityAttestingRound,proto3" json:"EpochFinalityAttestingRound,omitempty"`
	EpochMetaBlockHash          []byte    `protobuf:"bytes,9,opt,name=EpochMetaBlockHash,proto3" json:"EpochMetaBlockHash,omitempty"`
}

func (*ShardTriggerRegistryV2) Descriptor

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

func (*ShardTriggerRegistryV2) Equal

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

func (*ShardTriggerRegistryV2) GetCurrentRoundIndex

func (m *ShardTriggerRegistryV2) GetCurrentRoundIndex() int64

func (*ShardTriggerRegistryV2) GetEpoch

func (m *ShardTriggerRegistryV2) GetEpoch() uint32

func (*ShardTriggerRegistryV2) GetEpochFinalityAttestingRound

func (m *ShardTriggerRegistryV2) GetEpochFinalityAttestingRound() uint64

func (*ShardTriggerRegistryV2) GetEpochMetaBlockHash

func (m *ShardTriggerRegistryV2) GetEpochMetaBlockHash() []byte

func (*ShardTriggerRegistryV2) GetEpochStartHeaderHandler

func (strV2 *ShardTriggerRegistryV2) GetEpochStartHeaderHandler() data.HeaderHandler

GetEpochStartHeaderHandler returns the epoch start headerHandler

func (*ShardTriggerRegistryV2) GetEpochStartRound

func (m *ShardTriggerRegistryV2) GetEpochStartRound() uint64

func (*ShardTriggerRegistryV2) GetEpochStartShardHeader

func (m *ShardTriggerRegistryV2) GetEpochStartShardHeader() *HeaderV2

func (*ShardTriggerRegistryV2) GetIsEpochStart

func (m *ShardTriggerRegistryV2) GetIsEpochStart() bool

func (*ShardTriggerRegistryV2) GetMetaEpoch

func (m *ShardTriggerRegistryV2) GetMetaEpoch() uint32

func (*ShardTriggerRegistryV2) GetNewEpochHeaderReceived

func (m *ShardTriggerRegistryV2) GetNewEpochHeaderReceived() bool

func (*ShardTriggerRegistryV2) GoString

func (this *ShardTriggerRegistryV2) GoString() string

func (*ShardTriggerRegistryV2) Marshal

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

func (*ShardTriggerRegistryV2) MarshalTo

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

func (*ShardTriggerRegistryV2) MarshalToSizedBuffer

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

func (*ShardTriggerRegistryV2) ProtoMessage

func (*ShardTriggerRegistryV2) ProtoMessage()

func (*ShardTriggerRegistryV2) Reset

func (m *ShardTriggerRegistryV2) Reset()

func (*ShardTriggerRegistryV2) SetCurrentRoundIndex

func (strV2 *ShardTriggerRegistryV2) SetCurrentRoundIndex(roundIndex int64) error

SetCurrentRoundIndex sets the current round index

func (*ShardTriggerRegistryV2) SetEpoch

func (strV2 *ShardTriggerRegistryV2) SetEpoch(epoch uint32) error

SetEpoch sets the epoch

func (*ShardTriggerRegistryV2) SetEpochFinalityAttestingRound

func (strV2 *ShardTriggerRegistryV2) SetEpochFinalityAttestingRound(finalityAttestingRound uint64) error

SetEpochFinalityAttestingRound sets the epoch finality attesting round

func (*ShardTriggerRegistryV2) SetEpochMetaBlockHash

func (strV2 *ShardTriggerRegistryV2) SetEpochMetaBlockHash(epochMetaBlockHash []byte) error

SetEpochMetaBlockHash sets the epoch metaChain block hash

func (*ShardTriggerRegistryV2) SetEpochStartHeaderHandler

func (strV2 *ShardTriggerRegistryV2) SetEpochStartHeaderHandler(epochStartHeaderHandler data.HeaderHandler) error

SetEpochStartHeaderHandler sets the epoch start header

func (*ShardTriggerRegistryV2) SetEpochStartRound

func (strV2 *ShardTriggerRegistryV2) SetEpochStartRound(startRound uint64) error

SetEpochStartRound sets the epoch start round

func (*ShardTriggerRegistryV2) SetIsEpochStart

func (strV2 *ShardTriggerRegistryV2) SetIsEpochStart(isEpochStart bool) error

SetIsEpochStart sets the isEpochStart flag

func (*ShardTriggerRegistryV2) SetMetaEpoch

func (strV2 *ShardTriggerRegistryV2) SetMetaEpoch(metaEpoch uint32) error

SetMetaEpoch sets the metaChain epoch

func (*ShardTriggerRegistryV2) SetNewEpochHeaderReceived

func (strV2 *ShardTriggerRegistryV2) SetNewEpochHeaderReceived(newEpochHeaderReceived bool) error

SetNewEpochHeaderReceived sets the neeEpochHeaderReceived flag

func (*ShardTriggerRegistryV2) Size

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

func (*ShardTriggerRegistryV2) String

func (this *ShardTriggerRegistryV2) String() string

func (*ShardTriggerRegistryV2) Unmarshal

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

func (*ShardTriggerRegistryV2) XXX_DiscardUnknown

func (m *ShardTriggerRegistryV2) XXX_DiscardUnknown()

func (*ShardTriggerRegistryV2) XXX_Marshal

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

func (*ShardTriggerRegistryV2) XXX_Merge

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

func (*ShardTriggerRegistryV2) XXX_Size

func (m *ShardTriggerRegistryV2) XXX_Size() int

func (*ShardTriggerRegistryV2) XXX_Unmarshal

func (m *ShardTriggerRegistryV2) 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