checkpointing

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 18 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_checkpointing_proto protoreflect.FileDescriptor

Functions

func MakeCheckpointDatabasePath

func MakeCheckpointDatabasePath(rollupAddr common.Address) string

Types

type CheckpointLinks struct {
	Next *common.BlockIdBuf `protobuf:"bytes,1,opt,name=next,proto3" json:"next,omitempty"`
	Prev *common.BlockIdBuf `protobuf:"bytes,2,opt,name=prev,proto3" json:"prev,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckpointLinks) Descriptor deprecated

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

Deprecated: Use CheckpointLinks.ProtoReflect.Descriptor instead.

func (*CheckpointLinks) GetNext

func (x *CheckpointLinks) GetNext() *common.BlockIdBuf

func (*CheckpointLinks) GetPrev

func (x *CheckpointLinks) GetPrev() *common.BlockIdBuf

func (*CheckpointLinks) ProtoMessage

func (*CheckpointLinks) ProtoMessage()

func (*CheckpointLinks) ProtoReflect

func (x *CheckpointLinks) ProtoReflect() protoreflect.Message

func (*CheckpointLinks) Reset

func (x *CheckpointLinks) Reset()

func (*CheckpointLinks) String

func (x *CheckpointLinks) String() string

type CheckpointMetadata

type CheckpointMetadata struct {
	FormatVersion uint64             `protobuf:"varint,1,opt,name=formatVersion,proto3" json:"formatVersion,omitempty"`
	Oldest        *common.BlockIdBuf `protobuf:"bytes,2,opt,name=oldest,proto3" json:"oldest,omitempty"`
	Newest        *common.BlockIdBuf `protobuf:"bytes,3,opt,name=newest,proto3" json:"newest,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckpointMetadata) Descriptor deprecated

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

Deprecated: Use CheckpointMetadata.ProtoReflect.Descriptor instead.

func (*CheckpointMetadata) GetFormatVersion

func (x *CheckpointMetadata) GetFormatVersion() uint64

func (*CheckpointMetadata) GetNewest

func (x *CheckpointMetadata) GetNewest() *common.BlockIdBuf

func (*CheckpointMetadata) GetOldest

func (x *CheckpointMetadata) GetOldest() *common.BlockIdBuf

func (*CheckpointMetadata) ProtoMessage

func (*CheckpointMetadata) ProtoMessage()

func (*CheckpointMetadata) ProtoReflect

func (x *CheckpointMetadata) ProtoReflect() protoreflect.Message

func (*CheckpointMetadata) Reset

func (x *CheckpointMetadata) Reset()

func (*CheckpointMetadata) String

func (x *CheckpointMetadata) String() string

type CheckpointWithManifest

type CheckpointWithManifest struct {
	Contents []byte                          `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"`
	Manifest *ckptcontext.CheckpointManifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckpointWithManifest) Descriptor deprecated

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

Deprecated: Use CheckpointWithManifest.ProtoReflect.Descriptor instead.

func (*CheckpointWithManifest) GetContents

func (x *CheckpointWithManifest) GetContents() []byte

func (*CheckpointWithManifest) GetManifest

func (*CheckpointWithManifest) ProtoMessage

func (*CheckpointWithManifest) ProtoMessage()

func (*CheckpointWithManifest) ProtoReflect

func (x *CheckpointWithManifest) ProtoReflect() protoreflect.Message

func (*CheckpointWithManifest) Reset

func (x *CheckpointWithManifest) Reset()

func (*CheckpointWithManifest) String

func (x *CheckpointWithManifest) String() string

type HeightBoundsBuf

type HeightBoundsBuf struct {
	Lo *common.TimeBlocksBuf `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"`
	Hi *common.TimeBlocksBuf `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"`
	// contains filtered or unexported fields
}

func (*HeightBoundsBuf) Descriptor deprecated

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

Deprecated: Use HeightBoundsBuf.ProtoReflect.Descriptor instead.

func (*HeightBoundsBuf) GetHi

func (x *HeightBoundsBuf) GetHi() *common.TimeBlocksBuf

func (*HeightBoundsBuf) GetLo

func (x *HeightBoundsBuf) GetLo() *common.TimeBlocksBuf

func (*HeightBoundsBuf) ProtoMessage

func (*HeightBoundsBuf) ProtoMessage()

func (*HeightBoundsBuf) ProtoReflect

func (x *HeightBoundsBuf) ProtoReflect() protoreflect.Message

func (*HeightBoundsBuf) Reset

func (x *HeightBoundsBuf) Reset()

func (*HeightBoundsBuf) String

func (x *HeightBoundsBuf) String() string

type IndexedCheckpointer

type IndexedCheckpointer struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

func NewIndexedCheckpointer

func NewIndexedCheckpointer(
	rollupAddr common.Address,
	databasePath string,
	maxReorgHeight *big.Int,
	forceFreshStart bool,
) (*IndexedCheckpointer, error)

func (*IndexedCheckpointer) AsyncSaveCheckpoint

func (cp *IndexedCheckpointer) AsyncSaveCheckpoint(
	blockId *common.BlockId,
	contents []byte,
	cpCtx *ckptcontext.CheckpointContext,
) <-chan error

func (*IndexedCheckpointer) GetAggregatorStore

func (cp *IndexedCheckpointer) GetAggregatorStore() *cmachine.AggregatorStore

func (*IndexedCheckpointer) GetInitialMachine

func (cp *IndexedCheckpointer) GetInitialMachine(vc machine.ValueCache) (machine.Machine, error)

func (*IndexedCheckpointer) HasCheckpointedState

func (cp *IndexedCheckpointer) HasCheckpointedState() bool

HasCheckpointedState checks whether the block store is empty, which is the table which contains the checkpoints recorded by the IndexedCheckpointer

func (*IndexedCheckpointer) Initialize

func (cp *IndexedCheckpointer) Initialize(arbitrumCodeFilePath string) error

func (*IndexedCheckpointer) Initialized

func (cp *IndexedCheckpointer) Initialized() bool

func (*IndexedCheckpointer) MaxReorgHeight

func (cp *IndexedCheckpointer) MaxReorgHeight() *big.Int

func (*IndexedCheckpointer) RestoreLatestState

func (cp *IndexedCheckpointer) RestoreLatestState(ctx context.Context, clnt arbbridge.ChainTimeGetter, unmarshalFunc func([]byte, ckptcontext.RestoreContext, *common.BlockId) error) error

type RollupCheckpointer

type RollupCheckpointer interface {
	Initialize(arbitrumCodeFilePath string) error
	Initialized() bool
	HasCheckpointedState() bool
	RestoreLatestState(context.Context, arbbridge.ChainTimeGetter, func([]byte, ckptcontext.RestoreContext, *common.BlockId) error) error
	GetInitialMachine(valueCache machine.ValueCache) (machine.Machine, error)
	AsyncSaveCheckpoint(blockId *common.BlockId, contents []byte, cpCtx *ckptcontext.CheckpointContext) <-chan error

	MaxReorgHeight() *big.Int
}

Jump to

Keyboard shortcuts

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