cmachine

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: 16 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArbCore added in v0.8.0

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

func NewArbCore added in v0.8.0

func NewArbCore(c unsafe.Pointer, storage *ArbStorage) *ArbCore

func (*ArbCore) AdvanceExecutionCursor added in v0.8.0

func (ac *ArbCore) AdvanceExecutionCursor(executionCursor core.ExecutionCursor, maxGas *big.Int, goOverGas bool) error

func (*ArbCore) DeliverMessages added in v0.8.0

func (ac *ArbCore) DeliverMessages(messages []inbox.InboxMessage, previousInboxAcc common.Hash, lastBlockComplete bool, reorgMessageCount *big.Int) bool

func (*ArbCore) GetExecutionCursor added in v0.8.0

func (ac *ArbCore) GetExecutionCursor(totalGasUsed *big.Int) (core.ExecutionCursor, error)

func (*ArbCore) GetInboxAcc added in v0.8.0

func (ac *ArbCore) GetInboxAcc(index *big.Int) (ret common.Hash, err error)

func (*ArbCore) GetInboxAccPair added in v0.8.0

func (ac *ArbCore) GetInboxAccPair(index1 *big.Int, index2 *big.Int) (ret1 common.Hash, ret2 common.Hash, err error)

func (*ArbCore) GetLogCount added in v0.8.0

func (ac *ArbCore) GetLogCount() (*big.Int, error)

func (*ArbCore) GetLogs added in v0.8.0

func (ac *ArbCore) GetLogs(startIndex *big.Int, count *big.Int) ([]value.Value, error)

func (*ArbCore) GetMachineForSideload added in v0.8.0

func (ac *ArbCore) GetMachineForSideload(blockNumber uint64) (machine.Machine, error)

func (*ArbCore) GetMessageCount added in v0.8.0

func (ac *ArbCore) GetMessageCount() (*big.Int, error)

func (*ArbCore) GetMessages added in v0.8.0

func (ac *ArbCore) GetMessages(startIndex *big.Int, count *big.Int) ([]inbox.InboxMessage, error)

func (*ArbCore) GetSendCount added in v0.8.0

func (ac *ArbCore) GetSendCount() (*big.Int, error)

func (*ArbCore) GetSends added in v0.8.0

func (ac *ArbCore) GetSends(startIndex *big.Int, count *big.Int) ([][]byte, error)

func (*ArbCore) LogsCursorCheckError added in v0.8.0

func (ac *ArbCore) LogsCursorCheckError(cursorIndex *big.Int) error

func (*ArbCore) LogsCursorConfirmReceived added in v0.8.0

func (ac *ArbCore) LogsCursorConfirmReceived(cursorIndex *big.Int) (bool, error)

func (*ArbCore) LogsCursorGetLogs added in v0.8.0

func (ac *ArbCore) LogsCursorGetLogs(cursorIndex *big.Int) (*big.Int, []value.Value, []value.Value, error)

func (*ArbCore) LogsCursorPosition added in v0.8.0

func (ac *ArbCore) LogsCursorPosition(cursorIndex *big.Int) (*big.Int, error)

func (*ArbCore) LogsCursorRequest added in v0.8.0

func (ac *ArbCore) LogsCursorRequest(cursorIndex *big.Int, count *big.Int) error

func (*ArbCore) MachineIdle added in v0.8.0

func (ac *ArbCore) MachineIdle() bool

func (*ArbCore) MachineMessagesRead added in v0.8.0

func (ac *ArbCore) MachineMessagesRead() *big.Int

func (*ArbCore) MessagesStatus added in v0.8.0

func (ac *ArbCore) MessagesStatus() (core.MessageStatus, error)

func (*ArbCore) StartThread added in v0.8.0

func (ac *ArbCore) StartThread() bool

func (*ArbCore) StopThread added in v0.8.0

func (ac *ArbCore) StopThread()

func (*ArbCore) TakeMachine added in v0.8.0

func (ac *ArbCore) TakeMachine(executionCursor core.ExecutionCursor) (machine.Machine, error)

type ArbStorage added in v0.8.0

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

func NewArbStorage added in v0.8.0

func NewArbStorage(dbPath string) (*ArbStorage, error)

func (*ArbStorage) CloseArbStorage added in v0.8.0

func (s *ArbStorage) CloseArbStorage() bool

func (*ArbStorage) GetArbCore added in v0.8.0

func (s *ArbStorage) GetArbCore() core.ArbCore

func (*ArbStorage) GetNodeStore added in v0.8.0

func (s *ArbStorage) GetNodeStore() machine.NodeStore

func (*ArbStorage) Initialize added in v0.8.0

func (s *ArbStorage) Initialize(contractPath string) error

func (*ArbStorage) Initialized added in v0.8.0

func (s *ArbStorage) Initialized() bool

type ExecutionCursor added in v0.8.0

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

func NewExecutionCursor added in v0.8.0

func NewExecutionCursor(c unsafe.Pointer) (*ExecutionCursor, error)

func (*ExecutionCursor) Clone added in v0.8.0

func (ec *ExecutionCursor) Clone() core.ExecutionCursor

func (*ExecutionCursor) InboxAcc added in v0.8.0

func (ec *ExecutionCursor) InboxAcc() common.Hash

func (*ExecutionCursor) LogAcc added in v0.8.0

func (ec *ExecutionCursor) LogAcc() common.Hash

func (*ExecutionCursor) MachineHash added in v0.8.0

func (ec *ExecutionCursor) MachineHash() (common.Hash, error)

func (*ExecutionCursor) SendAcc added in v0.8.0

func (ec *ExecutionCursor) SendAcc() common.Hash

func (*ExecutionCursor) TotalGasConsumed added in v0.8.0

func (ec *ExecutionCursor) TotalGasConsumed() *big.Int

func (*ExecutionCursor) TotalLogCount added in v0.8.0

func (ec *ExecutionCursor) TotalLogCount() *big.Int

func (*ExecutionCursor) TotalMessagesRead added in v0.8.0

func (ec *ExecutionCursor) TotalMessagesRead() *big.Int

func (*ExecutionCursor) TotalSendCount added in v0.8.0

func (ec *ExecutionCursor) TotalSendCount() *big.Int

func (*ExecutionCursor) TotalSteps added in v0.8.0

func (ec *ExecutionCursor) TotalSteps() *big.Int

type Machine

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

func New

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

func WrapCMachine added in v0.8.0

func WrapCMachine(cMachine unsafe.Pointer) *Machine

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(
	maxGas uint64,
	goOverGas bool,
	messages []inbox.InboxMessage,
	finalMessageOfBlock bool,
) (*protocol.ExecutionAssertion, []value.Value, uint64)

func (*Machine) ExecuteAssertionAdvanced added in v0.8.0

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

func (*Machine) Hash

func (m *Machine) Hash() (ret common.Hash, err error)

func (*Machine) IsBlocked added in v0.4.0

func (m *Machine) IsBlocked(newMessages bool) machine.BlockReason

func (*Machine) MarshalForProof

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

func (*Machine) MarshalState added in v0.7.0

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

func (*Machine) String added in v0.8.0

func (m *Machine) String() string

type NodeStore added in v0.6.0

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

func NewNodeStore added in v0.6.0

func NewNodeStore(c unsafe.Pointer) *NodeStore

func (*NodeStore) BlockCount added in v0.8.0

func (as *NodeStore) BlockCount() (uint64, error)

func (*NodeStore) CurrentLogCount added in v0.8.0

func (as *NodeStore) CurrentLogCount() (*big.Int, error)

func (*NodeStore) GetBlockInfo added in v0.8.0

func (as *NodeStore) GetBlockInfo(height uint64) (*machine.BlockInfo, error)

func (*NodeStore) GetMessageBatch added in v0.8.0

func (as *NodeStore) GetMessageBatch(batchNum *big.Int) *uint64

func (*NodeStore) GetPossibleBlock added in v0.8.0

func (as *NodeStore) GetPossibleBlock(blockHash common.Hash) *uint64

func (*NodeStore) GetPossibleRequestInfo added in v0.8.0

func (as *NodeStore) GetPossibleRequestInfo(requestId common.Hash) *uint64

func (*NodeStore) Reorg added in v0.8.0

func (as *NodeStore) Reorg(height uint64) error

func (*NodeStore) SaveBlock added in v0.8.0

func (as *NodeStore) SaveBlock(header *types.Header, logIndex uint64, logCount uint64, requests []machine.EVMRequestInfo) error

func (*NodeStore) SaveMessageBatch added in v0.8.0

func (as *NodeStore) SaveMessageBatch(batchNum *big.Int, logIndex uint64) error

func (*NodeStore) UpdateCurrentLogCount added in v0.8.0

func (as *NodeStore) UpdateCurrentLogCount(count *big.Int) error

Jump to

Keyboard shortcuts

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