cmachine

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 15 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorStore added in v0.7.0

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

func NewAggregatorStore added in v0.7.0

func NewAggregatorStore(c unsafe.Pointer) *AggregatorStore

func (*AggregatorStore) GetBlock added in v0.7.0

func (as *AggregatorStore) GetBlock(height uint64) (*machine.BlockInfo, error)

func (*AggregatorStore) GetLog added in v0.7.0

func (as *AggregatorStore) GetLog(index uint64) (value.Value, error)

func (*AggregatorStore) GetMessage added in v0.7.0

func (as *AggregatorStore) GetMessage(index uint64) (value.Value, error)

func (*AggregatorStore) GetPossibleRequestInfo added in v0.7.0

func (as *AggregatorStore) GetPossibleRequestInfo(requestId common.Hash) (uint64, error)

func (*AggregatorStore) LatestBlock added in v0.7.0

func (as *AggregatorStore) LatestBlock() (*common.BlockId, error)

func (*AggregatorStore) LogCount added in v0.7.0

func (as *AggregatorStore) LogCount() (uint64, error)

func (*AggregatorStore) MessageCount added in v0.7.0

func (as *AggregatorStore) MessageCount() (uint64, error)

func (*AggregatorStore) Reorg added in v0.7.0

func (as *AggregatorStore) Reorg(height uint64, messageCount uint64, logCount uint64) error

func (*AggregatorStore) SaveBlock added in v0.7.0

func (as *AggregatorStore) SaveBlock(id *common.BlockId, logIndex uint64, logBloom types.Bloom) error

func (*AggregatorStore) SaveLog added in v0.7.0

func (as *AggregatorStore) SaveLog(val value.Value) error

func (*AggregatorStore) SaveMessage added in v0.7.0

func (as *AggregatorStore) SaveMessage(val value.Value) error

func (*AggregatorStore) SaveRequest added in v0.7.0

func (as *AggregatorStore) SaveRequest(requestId common.Hash, logIndex uint64) error

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) (*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) GetAggregatorStore added in v0.7.0

func (checkpoint *CheckpointStorage) GetAggregatorStore() *AggregatorStore

func (*CheckpointStorage) GetBlockStore added in v0.6.0

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

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) Initialize added in v0.7.0

func (checkpoint *CheckpointStorage) Initialize(contractPath string) error

func (*CheckpointStorage) Initialized added in v0.7.0

func (checkpoint *CheckpointStorage) Initialized() bool

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 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,
	inboxMessages []inbox.InboxMessage,
	maxWallTime time.Duration,
) (*protocol.ExecutionAssertion, uint64)

func (*Machine) ExecuteCallServerAssertion added in v0.7.0

func (m *Machine) ExecuteCallServerAssertion(
	maxSteps uint64,
	inboxMessages []inbox.InboxMessage,
	fakeInboxPeekValue value.Value,
	maxWallTime time.Duration,
) (*protocol.ExecutionAssertion, uint64)

func (*Machine) ExecuteSideloadedAssertion added in v0.7.0

func (m *Machine) ExecuteSideloadedAssertion(
	maxSteps uint64,
	inboxMessages []inbox.InboxMessage,
	sideloadValue 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(newMessages bool) machine.BlockReason

func (*Machine) MarshalForProof

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

func (*Machine) MarshalState added in v0.7.0

func (m *Machine) MarshalState() ([]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