cmachine

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStore added in v0.6.0

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

func NewBlockStore added in v0.6.0

func NewBlockStore(c unsafe.Pointer) *BlockStore

func (*BlockStore) BlocksAtHeight added in v0.6.0

func (bs *BlockStore) BlocksAtHeight(height *common.TimeBlocks) []*common.BlockId

func (*BlockStore) DeleteBlock added in v0.6.0

func (bs *BlockStore) DeleteBlock(id *common.BlockId) error

func (*BlockStore) GetBlock added in v0.6.0

func (bs *BlockStore) GetBlock(id *common.BlockId) ([]byte, error)

func (*BlockStore) IsBlockStoreEmpty added in v0.6.0

func (bs *BlockStore) IsBlockStoreEmpty() bool

func (*BlockStore) MaxBlockStoreHeight added in v0.6.0

func (bs *BlockStore) MaxBlockStoreHeight() *common.TimeBlocks

func (*BlockStore) MinBlockStoreHeight added in v0.6.0

func (bs *BlockStore) MinBlockStoreHeight() *common.TimeBlocks

func (*BlockStore) PutBlock added in v0.6.0

func (bs *BlockStore) PutBlock(id *common.BlockId, data []byte) error

type CheckpointStorage added in v0.4.0

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

func NewCheckpoint added in v0.4.0

func NewCheckpoint(dbPath string, contractPath string) (*CheckpointStorage, error)

func (*CheckpointStorage) CloseCheckpointStorage added in v0.4.0

func (checkpoint *CheckpointStorage) CloseCheckpointStorage() bool

func (*CheckpointStorage) DeleteCheckpoint added in v0.4.0

func (checkpoint *CheckpointStorage) DeleteCheckpoint(machineHash common.Hash) bool

func (*CheckpointStorage) DeleteData added in v0.4.0

func (checkpoint *CheckpointStorage) DeleteData(key []byte) bool

func (*CheckpointStorage) DeleteValue added in v0.4.0

func (checkpoint *CheckpointStorage) DeleteValue(hashValue common.Hash) bool

func (*CheckpointStorage) GetBlockStore added in v0.6.0

func (checkpoint *CheckpointStorage) GetBlockStore() machine.BlockStore

func (*CheckpointStorage) GetConfirmedNodeStore added in v0.6.5

func (checkpoint *CheckpointStorage) GetConfirmedNodeStore() machine.ConfirmedNodeStore

func (*CheckpointStorage) GetData added in v0.4.0

func (checkpoint *CheckpointStorage) GetData(key []byte) []byte

func (*CheckpointStorage) GetInitialMachine added in v0.4.0

func (checkpoint *CheckpointStorage) GetInitialMachine() (machine.Machine, error)

func (*CheckpointStorage) GetMachine added in v0.4.3

func (checkpoint *CheckpointStorage) GetMachine(machineHash common.Hash) (machine.Machine, error)

func (*CheckpointStorage) GetValue added in v0.4.0

func (checkpoint *CheckpointStorage) GetValue(hashValue common.Hash) value.Value

func (*CheckpointStorage) SaveData added in v0.4.0

func (checkpoint *CheckpointStorage) SaveData(key []byte, data []byte) bool

func (*CheckpointStorage) SaveValue added in v0.4.0

func (checkpoint *CheckpointStorage) SaveValue(val value.Value) bool

type ConfirmedNodeStore added in v0.6.5

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

func NewConfirmedNodeStore added in v0.6.5

func NewConfirmedNodeStore(c unsafe.Pointer) *ConfirmedNodeStore

func (*ConfirmedNodeStore) Empty added in v0.6.5

func (ns *ConfirmedNodeStore) Empty() bool

func (*ConfirmedNodeStore) GetNode added in v0.6.5

func (ns *ConfirmedNodeStore) GetNode(height uint64, hash common.Hash) ([]byte, error)

func (*ConfirmedNodeStore) GetNodeHash added in v0.6.5

func (ns *ConfirmedNodeStore) GetNodeHash(height uint64) (common.Hash, error)

func (*ConfirmedNodeStore) GetNodeHeight added in v0.6.5

func (ns *ConfirmedNodeStore) GetNodeHeight(hash common.Hash) (uint64, error)

func (*ConfirmedNodeStore) MaxHeight added in v0.6.5

func (ns *ConfirmedNodeStore) MaxHeight() uint64

func (*ConfirmedNodeStore) PutNode added in v0.6.5

func (ns *ConfirmedNodeStore) PutNode(height uint64, hash common.Hash, data []byte) error

type Machine

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

func New

func New(codeFile string) (*Machine, error)

func (*Machine) Checkpoint added in v0.4.0

func (m *Machine) Checkpoint(storage machine.CheckpointStorage) bool

func (*Machine) Clone

func (m *Machine) Clone() machine.Machine

func (*Machine) CurrentStatus

func (m *Machine) CurrentStatus() machine.Status

func (*Machine) ExecuteAssertion

func (m *Machine) ExecuteAssertion(
	maxSteps uint64,
	timeBounds *protocol.TimeBounds,
	inbox value.TupleValue,
	maxWallTime time.Duration,
) (*protocol.ExecutionAssertion, uint64)

func (*Machine) Hash

func (m *Machine) Hash() (ret common.Hash)

func (*Machine) IsBlocked added in v0.4.0

func (m *Machine) IsBlocked(currentTime *common.TimeBlocks, newMessages bool) machine.BlockReason

func (*Machine) MarshalForProof

func (m *Machine) MarshalForProof() ([]byte, error)

func (*Machine) PrintState added in v0.4.0

func (m *Machine) PrintState()

Jump to

Keyboard shortcuts

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