bootstrapStorage

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBootstrapData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBootstrapData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBootstrapData = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ErrNilBootStorer = errors.New("nil boot storer")

ErrNilBootStorer signals that an operation has been attempted to or with a nil storer implementation

View Source
var ErrNilMarshalizer = errors.New("nil Marshalizer")

ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation

Functions

func NewBootstrapStorer

func NewBootstrapStorer(
	marshalizer marshal.Marshalizer,
	store storage.Storer,
) (*bootstrapStorer, error)

NewBootstrapStorer will return an instance of bootstrap storer

Types

type BootstrapData

type BootstrapData struct {
	LastHeader                 BootstrapHeaderInfo     `protobuf:"bytes,1,opt,name=LastHeader,proto3" json:"LastHeader"`
	LastCrossNotarizedHeaders  []BootstrapHeaderInfo   `protobuf:"bytes,2,rep,name=LastCrossNotarizedHeaders,proto3" json:"LastCrossNotarizedHeaders"`
	LastSelfNotarizedHeaders   []BootstrapHeaderInfo   `protobuf:"bytes,7,rep,name=LastSelfNotarizedHeaders,proto3" json:"LastSelfNotarizedHeaders"`
	ProcessedMiniBlocks        []MiniBlocksInMeta      `protobuf:"bytes,4,rep,name=ProcessedMiniBlocks,proto3" json:"ProcessedMiniBlocks"`
	PendingMiniBlocks          []PendingMiniBlocksInfo `protobuf:"bytes,8,rep,name=PendingMiniBlocks,proto3" json:"PendingMiniBlocks"`
	NodesCoordinatorConfigKey  []byte                  `protobuf:"bytes,9,opt,name=NodesCoordinatorConfigKey,proto3" json:"NodesCoordinatorConfigKey,omitempty"`
	EpochStartTriggerConfigKey []byte                  `protobuf:"bytes,10,opt,name=EpochStartTriggerConfigKey,proto3" json:"EpochStartTriggerConfigKey,omitempty"`
	HighestFinalBlockNonce     uint64                  `protobuf:"varint,5,opt,name=HighestFinalBlockNonce,proto3" json:"HighestFinalBlockNonce,omitempty"`
	LastRound                  int64                   `protobuf:"varint,6,opt,name=LastRound,proto3" json:"LastRound,omitempty"`
}

BootstrapData is used to store information that are needed for bootstrap

func (*BootstrapData) Descriptor

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

func (*BootstrapData) Equal

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

func (*BootstrapData) GetEpochStartTriggerConfigKey

func (m *BootstrapData) GetEpochStartTriggerConfigKey() []byte

func (*BootstrapData) GetHighestFinalBlockNonce

func (m *BootstrapData) GetHighestFinalBlockNonce() uint64

func (*BootstrapData) GetLastCrossNotarizedHeaders

func (m *BootstrapData) GetLastCrossNotarizedHeaders() []BootstrapHeaderInfo

func (*BootstrapData) GetLastHeader

func (m *BootstrapData) GetLastHeader() BootstrapHeaderInfo

func (*BootstrapData) GetLastRound

func (m *BootstrapData) GetLastRound() int64

func (*BootstrapData) GetLastSelfNotarizedHeaders

func (m *BootstrapData) GetLastSelfNotarizedHeaders() []BootstrapHeaderInfo

func (*BootstrapData) GetNodesCoordinatorConfigKey

func (m *BootstrapData) GetNodesCoordinatorConfigKey() []byte

func (*BootstrapData) GetPendingMiniBlocks

func (m *BootstrapData) GetPendingMiniBlocks() []PendingMiniBlocksInfo

func (*BootstrapData) GetProcessedMiniBlocks

func (m *BootstrapData) GetProcessedMiniBlocks() []MiniBlocksInMeta

func (*BootstrapData) GoString

func (this *BootstrapData) GoString() string

func (*BootstrapData) Marshal

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

func (*BootstrapData) MarshalTo

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

func (*BootstrapData) MarshalToSizedBuffer

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

func (*BootstrapData) ProtoMessage

func (*BootstrapData) ProtoMessage()

func (*BootstrapData) Reset

func (m *BootstrapData) Reset()

func (*BootstrapData) Size

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

func (*BootstrapData) String

func (this *BootstrapData) String() string

func (*BootstrapData) Unmarshal

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

func (*BootstrapData) XXX_DiscardUnknown

func (m *BootstrapData) XXX_DiscardUnknown()

func (*BootstrapData) XXX_Marshal

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

func (*BootstrapData) XXX_Merge

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

func (*BootstrapData) XXX_Size

func (m *BootstrapData) XXX_Size() int

func (*BootstrapData) XXX_Unmarshal

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

type BootstrapHeaderInfo

type BootstrapHeaderInfo struct {
	ShardId uint32 `protobuf:"varint,1,opt,name=ShardId,proto3" json:"ShardId,omitempty"`
	Epoch   uint32 `protobuf:"varint,2,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	Nonce   uint64 `protobuf:"varint,3,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	Hash    []byte `protobuf:"bytes,4,opt,name=Hash,proto3" json:"Hash,omitempty"`
}

BootstrapHeaderInfo is used to store information about a header

func (*BootstrapHeaderInfo) Descriptor

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

func (*BootstrapHeaderInfo) Equal

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

func (*BootstrapHeaderInfo) GetEpoch

func (m *BootstrapHeaderInfo) GetEpoch() uint32

func (*BootstrapHeaderInfo) GetHash

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

func (*BootstrapHeaderInfo) GetNonce

func (m *BootstrapHeaderInfo) GetNonce() uint64

func (*BootstrapHeaderInfo) GetShardId

func (m *BootstrapHeaderInfo) GetShardId() uint32

func (*BootstrapHeaderInfo) GoString

func (this *BootstrapHeaderInfo) GoString() string

func (*BootstrapHeaderInfo) Marshal

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

func (*BootstrapHeaderInfo) MarshalTo

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

func (*BootstrapHeaderInfo) MarshalToSizedBuffer

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

func (*BootstrapHeaderInfo) ProtoMessage

func (*BootstrapHeaderInfo) ProtoMessage()

func (*BootstrapHeaderInfo) Reset

func (m *BootstrapHeaderInfo) Reset()

func (*BootstrapHeaderInfo) Size

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

func (*BootstrapHeaderInfo) String

func (this *BootstrapHeaderInfo) String() string

func (*BootstrapHeaderInfo) Unmarshal

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

func (*BootstrapHeaderInfo) XXX_DiscardUnknown

func (m *BootstrapHeaderInfo) XXX_DiscardUnknown()

func (*BootstrapHeaderInfo) XXX_Marshal

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

func (*BootstrapHeaderInfo) XXX_Merge

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

func (*BootstrapHeaderInfo) XXX_Size

func (m *BootstrapHeaderInfo) XXX_Size() int

func (*BootstrapHeaderInfo) XXX_Unmarshal

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

type MiniBlocksInMeta

type MiniBlocksInMeta struct {
	MetaHash               []byte   `protobuf:"bytes,1,opt,name=MetaHash,proto3" json:"MetaHash,omitempty"`
	MiniBlocksHashes       [][]byte `protobuf:"bytes,2,rep,name=MiniBlocksHashes,proto3" json:"MiniBlocksHashes,omitempty"`
	FullyProcessed         []bool   `protobuf:"varint,3,rep,packed,name=FullyProcessed,proto3" json:"FullyProcessed,omitempty"`
	IndexOfLastTxProcessed []int32  `protobuf:"varint,4,rep,packed,name=IndexOfLastTxProcessed,proto3" json:"IndexOfLastTxProcessed,omitempty"`
}

MiniBlocksInMeta is used to store all mini blocks hashes for a metablock hash

func (*MiniBlocksInMeta) Descriptor

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

func (*MiniBlocksInMeta) Equal

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

func (*MiniBlocksInMeta) GetFullyProcessed

func (m *MiniBlocksInMeta) GetFullyProcessed() []bool

func (*MiniBlocksInMeta) GetIndexOfLastTxProcessed

func (m *MiniBlocksInMeta) GetIndexOfLastTxProcessed() []int32

func (*MiniBlocksInMeta) GetIndexOfLastTxProcessedInMiniBlock

func (m *MiniBlocksInMeta) GetIndexOfLastTxProcessedInMiniBlock(index int) int32

GetIndexOfLastTxProcessedInMiniBlock returns index of the last transaction processed in the mini block with the given index

func (*MiniBlocksInMeta) GetMetaHash

func (m *MiniBlocksInMeta) GetMetaHash() []byte

func (*MiniBlocksInMeta) GetMiniBlocksHashes

func (m *MiniBlocksInMeta) GetMiniBlocksHashes() [][]byte

func (*MiniBlocksInMeta) GoString

func (this *MiniBlocksInMeta) GoString() string

func (*MiniBlocksInMeta) IsFullyProcessed

func (m *MiniBlocksInMeta) IsFullyProcessed(index int) bool

IsFullyProcessed returns if the mini block at the given index is fully processed or not

func (*MiniBlocksInMeta) Marshal

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

func (*MiniBlocksInMeta) MarshalTo

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

func (*MiniBlocksInMeta) MarshalToSizedBuffer

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

func (*MiniBlocksInMeta) ProtoMessage

func (*MiniBlocksInMeta) ProtoMessage()

func (*MiniBlocksInMeta) Reset

func (m *MiniBlocksInMeta) Reset()

func (*MiniBlocksInMeta) Size

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

func (*MiniBlocksInMeta) String

func (this *MiniBlocksInMeta) String() string

func (*MiniBlocksInMeta) Unmarshal

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

func (*MiniBlocksInMeta) XXX_DiscardUnknown

func (m *MiniBlocksInMeta) XXX_DiscardUnknown()

func (*MiniBlocksInMeta) XXX_Marshal

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

func (*MiniBlocksInMeta) XXX_Merge

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

func (*MiniBlocksInMeta) XXX_Size

func (m *MiniBlocksInMeta) XXX_Size() int

func (*MiniBlocksInMeta) XXX_Unmarshal

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

type PendingMiniBlocksInfo

type PendingMiniBlocksInfo struct {
	ShardID          uint32   `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	MiniBlocksHashes [][]byte `protobuf:"bytes,2,rep,name=MiniBlocksHashes,proto3" json:"MiniBlocksHashes,omitempty"`
}

PendingMiniBlocksInfo is used to store information about the number of pending miniblocks

func (*PendingMiniBlocksInfo) Descriptor

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

func (*PendingMiniBlocksInfo) Equal

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

func (*PendingMiniBlocksInfo) GetMiniBlocksHashes

func (m *PendingMiniBlocksInfo) GetMiniBlocksHashes() [][]byte

func (*PendingMiniBlocksInfo) GetShardID

func (m *PendingMiniBlocksInfo) GetShardID() uint32

func (*PendingMiniBlocksInfo) GoString

func (this *PendingMiniBlocksInfo) GoString() string

func (*PendingMiniBlocksInfo) Marshal

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

func (*PendingMiniBlocksInfo) MarshalTo

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

func (*PendingMiniBlocksInfo) MarshalToSizedBuffer

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

func (*PendingMiniBlocksInfo) ProtoMessage

func (*PendingMiniBlocksInfo) ProtoMessage()

func (*PendingMiniBlocksInfo) Reset

func (m *PendingMiniBlocksInfo) Reset()

func (*PendingMiniBlocksInfo) Size

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

func (*PendingMiniBlocksInfo) String

func (this *PendingMiniBlocksInfo) String() string

func (*PendingMiniBlocksInfo) Unmarshal

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

func (*PendingMiniBlocksInfo) XXX_DiscardUnknown

func (m *PendingMiniBlocksInfo) XXX_DiscardUnknown()

func (*PendingMiniBlocksInfo) XXX_Marshal

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

func (*PendingMiniBlocksInfo) XXX_Merge

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

func (*PendingMiniBlocksInfo) XXX_Size

func (m *PendingMiniBlocksInfo) XXX_Size() int

func (*PendingMiniBlocksInfo) XXX_Unmarshal

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

type RoundNum

type RoundNum struct {
	Num int64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"`
}

func (*RoundNum) Descriptor

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

func (*RoundNum) Equal

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

func (*RoundNum) GetNum

func (m *RoundNum) GetNum() int64

func (*RoundNum) GoString

func (this *RoundNum) GoString() string

func (*RoundNum) Marshal

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

func (*RoundNum) MarshalTo

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

func (*RoundNum) MarshalToSizedBuffer

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

func (*RoundNum) ProtoMessage

func (*RoundNum) ProtoMessage()

func (*RoundNum) Reset

func (m *RoundNum) Reset()

func (*RoundNum) Size

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

func (*RoundNum) String

func (this *RoundNum) String() string

func (*RoundNum) Unmarshal

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

func (*RoundNum) XXX_DiscardUnknown

func (m *RoundNum) XXX_DiscardUnknown()

func (*RoundNum) XXX_Marshal

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

func (*RoundNum) XXX_Merge

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

func (*RoundNum) XXX_Size

func (m *RoundNum) XXX_Size() int

func (*RoundNum) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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