chainobserver

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_chainobserver_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ChainObserver

type ChainObserver struct {
	sync.RWMutex
	NodeGraph *nodegraph.StakedNodeGraph

	Inbox          *structures.Inbox
	KnownValidNode *structures.Node
	// contains filtered or unexported fields
}

func NewChainObserver

func NewChainObserver(
	ctx context.Context,
	rollupAddr common.Address,
	updateOpinion bool,
	clnt arbbridge.ChainTimeGetter,
	watcher arbbridge.ArbRollupWatcher,
	checkpointer checkpointing.RollupCheckpointer,
	assumedValidDepth int64,
) (*ChainObserver, error)

func (*ChainObserver) AddListener

func (chain *ChainObserver) AddListener(
	ctx context.Context,
	listener chainlistener.ChainListener,
)

func (*ChainObserver) ContractAddress

func (chain *ChainObserver) ContractAddress() common.Address

func (*ChainObserver) CurrentEventId

func (chain *ChainObserver) CurrentEventId() arbbridge.ChainInfo

func (*ChainObserver) DebugString

func (chain *ChainObserver) DebugString(prefix string) string

func (*ChainObserver) GetChainParams

func (chain *ChainObserver) GetChainParams() valprotocol.ChainParams

func (*ChainObserver) HandleNotification

func (chain *ChainObserver) HandleNotification(ctx context.Context, event arbbridge.Event) error

func (*ChainObserver) IsAtHead

func (chain *ChainObserver) IsAtHead() bool

func (*ChainObserver) NotifyNewBlock

func (chain *ChainObserver) NotifyNewBlock(blockId *common.BlockId)

func (*ChainObserver) NotifyNextEvent added in v0.7.3

func (chain *ChainObserver) NotifyNextEvent(blockId *common.BlockId)

func (*ChainObserver) NowAtHead

func (chain *ChainObserver) NowAtHead()

func (*ChainObserver) RestartFromLatestValid

func (chain *ChainObserver) RestartFromLatestValid(ctx context.Context)

func (*ChainObserver) Start

func (chain *ChainObserver) Start(ctx context.Context)

func (*ChainObserver) UpdateAssumedValidBlock

func (chain *ChainObserver) UpdateAssumedValidBlock(ctx context.Context, clnt arbbridge.ChainTimeGetter, assumedValidDepth int64) error

type ChainObserverBuf

type ChainObserverBuf struct {
	StakedNodeGraph     *nodegraph.StakedNodeGraphBuf `protobuf:"bytes,1,opt,name=stakedNodeGraph,proto3" json:"stakedNodeGraph,omitempty"`
	ContractAddress     *common.AddressBuf            `protobuf:"bytes,2,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"`
	Inbox               *structures.InboxBuf          `protobuf:"bytes,3,opt,name=inbox,proto3" json:"inbox,omitempty"`
	KnownValidNode      *common.HashBuf               `protobuf:"bytes,4,opt,name=knownValidNode,proto3" json:"knownValidNode,omitempty"`
	CalculatedValidNode *common.HashBuf               `protobuf:"bytes,5,opt,name=calculatedValidNode,proto3" json:"calculatedValidNode,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainObserverBuf) Descriptor deprecated

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

Deprecated: Use ChainObserverBuf.ProtoReflect.Descriptor instead.

func (*ChainObserverBuf) GetCalculatedValidNode

func (x *ChainObserverBuf) GetCalculatedValidNode() *common.HashBuf

func (*ChainObserverBuf) GetContractAddress

func (x *ChainObserverBuf) GetContractAddress() *common.AddressBuf

func (*ChainObserverBuf) GetInbox

func (x *ChainObserverBuf) GetInbox() *structures.InboxBuf

func (*ChainObserverBuf) GetKnownValidNode

func (x *ChainObserverBuf) GetKnownValidNode() *common.HashBuf

func (*ChainObserverBuf) GetStakedNodeGraph

func (x *ChainObserverBuf) GetStakedNodeGraph() *nodegraph.StakedNodeGraphBuf

func (*ChainObserverBuf) ProtoMessage

func (*ChainObserverBuf) ProtoMessage()

func (*ChainObserverBuf) ProtoReflect

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

func (*ChainObserverBuf) Reset

func (x *ChainObserverBuf) Reset()

func (*ChainObserverBuf) String

func (x *ChainObserverBuf) String() string

type DummyCheckpointer

type DummyCheckpointer struct {
	// contains filtered or unexported fields
}

func NewDummyCheckpointer

func NewDummyCheckpointer() *DummyCheckpointer

func (*DummyCheckpointer) AsyncSaveCheckpoint

func (dcp *DummyCheckpointer) AsyncSaveCheckpoint(_ *common.BlockId, _ []byte, _ *ckptcontext.CheckpointContext) <-chan error

func (*DummyCheckpointer) GetInitialMachine

func (dcp *DummyCheckpointer) GetInitialMachine(valueCache machine.ValueCache) (machine.Machine, error)

func (*DummyCheckpointer) HasCheckpointedState

func (dcp *DummyCheckpointer) HasCheckpointedState() bool

func (*DummyCheckpointer) Initialize

func (dcp *DummyCheckpointer) Initialize(arbitrumCodefilePath string) error

func (*DummyCheckpointer) Initialized

func (dcp *DummyCheckpointer) Initialized() bool

func (DummyCheckpointer) MaxReorgHeight

func (dcp DummyCheckpointer) MaxReorgHeight() *big.Int

func (*DummyCheckpointer) RestoreLatestState

Jump to

Keyboard shortcuts

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