Documentation ¶
Index ¶
- type Config
- type NodeMessenger
- func (messenger *NodeMessenger) ReceiveHookCallRequestOrContractResponse(timeout int) (common.MessageHandler, int, error)
- func (messenger *NodeMessenger) SendContractRequest(request common.MessageHandler) error
- func (messenger *NodeMessenger) SendHookCallResponse(response common.MessageHandler) error
- type NodePart
- type ParentLogsPart
- type VMDriver
- func (driver *VMDriver) Close() error
- func (driver *VMDriver) DiagnoseWait(milliseconds uint32) error
- func (driver *VMDriver) GasScheduleChange(newGasSchedule map[string]map[string]uint64)
- func (driver *VMDriver) GetVersion() string
- func (driver *VMDriver) IsClosed() bool
- func (driver *VMDriver) IsInterfaceNil() bool
- func (driver *VMDriver) RestartVMIfNecessary() error
- func (driver *VMDriver) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (driver *VMDriver) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MaxLoopTime int
}
Config is the configuration for the driver and for Node's part
type NodeMessenger ¶
NodeMessenger is the messenger on Node's part of the pipe
func NewNodeMessenger ¶
func NewNodeMessenger(reader *os.File, writer *os.File, marshalizer marshaling.Marshalizer) *NodeMessenger
NewNodeMessenger creates a new messenger
func (*NodeMessenger) ReceiveHookCallRequestOrContractResponse ¶
func (messenger *NodeMessenger) ReceiveHookCallRequestOrContractResponse(timeout int) (common.MessageHandler, int, error)
ReceiveHookCallRequestOrContractResponse waits for any message that could arrive from VM
func (*NodeMessenger) SendContractRequest ¶
func (messenger *NodeMessenger) SendContractRequest(request common.MessageHandler) error
SendContractRequest sends a request to VM
func (*NodeMessenger) SendHookCallResponse ¶
func (messenger *NodeMessenger) SendHookCallResponse(response common.MessageHandler) error
SendHookCallResponse sends a hook response to VM
type NodePart ¶
type NodePart struct { Messenger *NodeMessenger Repliers []common.MessageReplier // contains filtered or unexported fields }
NodePart is the endpoint that implements the message loop on Node's side
func NewNodePart ¶
func NewNodePart( input *os.File, output *os.File, blockchain vmcommon.BlockchainHook, config Config, marshalizer marshaling.Marshalizer, ) (*NodePart, error)
NewNodePart creates the Node part
func (*NodePart) SendStopSignal ¶
SendStopSignal sends a stop signal to VM Should only be used for tests!
func (*NodePart) StartLoop ¶
func (part *NodePart) StartLoop(request common.MessageHandler) (common.MessageHandler, error)
StartLoop runs the main loop
type ParentLogsPart ¶
type ParentLogsPart interface { StartLoop(childStdout io.Reader, childStderr io.Reader) error StopLoop() }
ParentLogsPart defines the interface for the Node's part of the logging dialogue
type VMDriver ¶ added in v1.2.50
type VMDriver struct {
// contains filtered or unexported fields
}
VMDriver manages the execution of the VM process
func NewVMDriver ¶ added in v1.2.50
func NewVMDriver( blockchainHook vmcommon.BlockchainHook, vmArguments common.VMArguments, config Config, ) (*VMDriver, error)
NewVMDriver creates a new driver
func (*VMDriver) DiagnoseWait ¶ added in v1.2.50
DiagnoseWait sends a diagnose message to VM
func (*VMDriver) GasScheduleChange ¶ added in v1.2.50
GasScheduleChange sends a "gas change" request to VM and waits for the output
func (*VMDriver) GetVersion ¶ added in v1.2.50
GetVersion gets the VM version
func (*VMDriver) IsInterfaceNil ¶ added in v1.2.50
IsInterfaceNil returns true if there is no value under the interface
func (*VMDriver) RestartVMIfNecessary ¶ added in v1.2.50
RestartVMIfNecessary restarts VM if the process is closed
func (*VMDriver) RunSmartContractCall ¶ added in v1.2.50
func (driver *VMDriver) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall sends an execution request to VM and waits for the output
func (*VMDriver) RunSmartContractCreate ¶ added in v1.2.50
func (driver *VMDriver) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate sends a deploy request to VM and waits for the output