machine

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArbStorage added in v0.8.0

type ArbStorage interface {
	Initialize(contractPath string) error
	Initialized() bool
	CloseArbStorage() bool

	GetNodeStore() NodeStore
}

type BlockInfo added in v0.7.0

type BlockInfo struct {
	BlockLog uint64
	LogCount uint64
	Header   *types.Header
}

func (*BlockInfo) InitialLogIndex added in v0.8.0

func (b *BlockInfo) InitialLogIndex() uint64

type BlockReason

type BlockReason interface {
	IsBlocked(m Machine, newMessages bool) bool
	Equals(b BlockReason) bool
}

type BlockStore added in v0.6.0

type BlockStore interface {
	PutBlock(id *common.BlockId, data []byte) error
	DeleteBlock(id *common.BlockId) error
	GetBlock(id *common.BlockId) ([]byte, error)
	BlocksAtHeight(height *common.TimeBlocks) []*common.BlockId
	IsBlockStoreEmpty() bool
	MaxBlockStoreHeight() *common.TimeBlocks
	MinBlockStoreHeight() *common.TimeBlocks
}

type BreakpointBlocked

type BreakpointBlocked struct {
}

func (BreakpointBlocked) Equals

func (b BreakpointBlocked) Equals(a BlockReason) bool

func (BreakpointBlocked) IsBlocked

func (b BreakpointBlocked) IsBlocked(Machine, bool) bool

func (BreakpointBlocked) String added in v0.4.0

func (b BreakpointBlocked) String() string

type DataNotFoundError added in v0.7.3

type DataNotFoundError struct {
	Key []byte
}

func (*DataNotFoundError) Error added in v0.7.3

func (e *DataNotFoundError) Error() string

type EVMRequestInfo added in v0.8.0

type EVMRequestInfo struct {
	RequestId common.Hash
	LogIndex  uint64
}

type ErrorBlocked

type ErrorBlocked struct {
}

func (ErrorBlocked) Equals

func (b ErrorBlocked) Equals(a BlockReason) bool

func (ErrorBlocked) IsBlocked

func (b ErrorBlocked) IsBlocked(Machine, bool) bool

func (ErrorBlocked) String added in v0.4.0

func (b ErrorBlocked) String() string

type HaltBlocked

type HaltBlocked struct {
}

func (HaltBlocked) Equals

func (b HaltBlocked) Equals(a BlockReason) bool

func (HaltBlocked) IsBlocked

func (b HaltBlocked) IsBlocked(Machine, bool) bool

func (HaltBlocked) String added in v0.4.0

func (b HaltBlocked) String() string

type InboxBlocked

type InboxBlocked struct {
}

func (InboxBlocked) Equals

func (b InboxBlocked) Equals(a BlockReason) bool

func (InboxBlocked) IsBlocked

func (b InboxBlocked) IsBlocked(_ Machine, newMessages bool) bool

func (InboxBlocked) String added in v0.4.0

func (b InboxBlocked) String() string

type Machine

type Machine interface {
	Hash() (common.Hash, error)
	Clone() Machine

	CurrentStatus() Status
	IsBlocked(newMessages bool) BlockReason

	ExecuteAssertion(maxGas uint64, goOverGas bool, messages []inbox.InboxMessage, finalMessageOfBlock bool) (*protocol.ExecutionAssertion, []value.Value, uint64)
	ExecuteAssertionAdvanced(maxGas uint64, goOverGas bool, messages []inbox.InboxMessage, finalMessageOfBlock bool, sideloads []inbox.InboxMessage, stopOnSideload bool, beforeSendAcc common.Hash, beforeLogAcc common.Hash) (*protocol.ExecutionAssertion, []value.Value, uint64)

	MarshalForProof() ([]byte, []byte, error)

	MarshalState() ([]byte, error)
}

type MachineNotFoundError added in v0.7.3

type MachineNotFoundError struct {
	HashValue common.Hash
}

func (*MachineNotFoundError) Error added in v0.7.3

func (e *MachineNotFoundError) Error() string

type NodeStore added in v0.6.0

type NodeStore interface {
	GetPossibleRequestInfo(requestId common.Hash) *uint64
	GetPossibleBlock(blockHash common.Hash) *uint64
	GetBlockInfo(height uint64) (*BlockInfo, error)
	BlockCount() (uint64, error)

	SaveMessageBatch(batchNum *big.Int, logIndex uint64) error
	GetMessageBatch(batchNum *big.Int) *uint64
	SaveBlock(header *types.Header, logIndex, logCount uint64, requests []EVMRequestInfo) error
	Reorg(height uint64) error
}

type Status

type Status int
const (
	Extensive Status = iota
	ErrorStop
	Halt
)

type ValueCache added in v0.7.3

type ValueCache interface {
	Clear()
}

type ValueNotFoundError added in v0.7.3

type ValueNotFoundError struct {
	HashValue common.Hash
}

func (*ValueNotFoundError) Error added in v0.7.3

func (e *ValueNotFoundError) Error() string

Jump to

Keyboard shortcuts

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