Documentation ¶
Index ¶
- Constants
- Variables
- func IsContractResponse(message MessageHandler) bool
- func IsCriticalError(err error) bool
- func IsDiagnose(message MessageHandler) bool
- func IsGasScheduleChangeResponse(message MessageHandler) bool
- func IsHookCall(message MessageHandler) bool
- func IsStopRequest(message MessageHandler) bool
- func IsVersionResponse(message MessageHandler) bool
- func SendArwenArguments(pipe *os.File, pipeArguments ArwenArguments) error
- type Account
- func (a *Account) AccountDataHandler() vmcommon.AccountDataHandler
- func (a *Account) AddToBalance(_ *big.Int) error
- func (a *Account) AddressBytes() []byte
- func (a *Account) ChangeOwnerAddress(_ []byte, _ []byte) error
- func (a *Account) ClaimDeveloperRewards(_ []byte) (*big.Int, error)
- func (a *Account) GetBalance() *big.Int
- func (a *Account) GetCodeHash() []byte
- func (a *Account) GetCodeMetadata() []byte
- func (a *Account) GetDeveloperReward() *big.Int
- func (a *Account) GetNonce() uint64
- func (a *Account) GetOwnerAddress() []byte
- func (a *Account) GetRootHash() []byte
- func (a *Account) GetUserName() []byte
- func (a *Account) IncreaseNonce(_ uint64)
- func (a *Account) IsInterfaceNil() bool
- func (a *Account) SetOwnerAddress(_ []byte)
- func (a *Account) SetUserName(_ []byte)
- type ArwenArguments
- type CriticalError
- type Message
- func (message *Message) DebugString() string
- func (message *Message) GetError() error
- func (message *Message) GetKind() MessageKind
- func (message *Message) GetKindName() string
- func (message *Message) GetNonce() uint32
- func (message *Message) SetError(err error)
- func (message *Message) SetKind(kind MessageKind)
- func (message *Message) SetNonce(nonce uint32)
- type MessageBlockchainCurrentEpochRequest
- type MessageBlockchainCurrentEpochResponse
- type MessageBlockchainCurrentNonceRequest
- type MessageBlockchainCurrentNonceResponse
- type MessageBlockchainCurrentRandomSeedRequest
- type MessageBlockchainCurrentRandomSeedResponse
- type MessageBlockchainCurrentRoundRequest
- type MessageBlockchainCurrentRoundResponse
- type MessageBlockchainCurrentTimeStampRequest
- type MessageBlockchainCurrentTimeStampResponse
- type MessageBlockchainGetAllStateRequest
- type MessageBlockchainGetAllStateResponse
- type MessageBlockchainGetBlockhashRequest
- type MessageBlockchainGetBlockhashResponse
- type MessageBlockchainGetBuiltinFunctionNamesRequest
- type MessageBlockchainGetBuiltinFunctionNamesResponse
- type MessageBlockchainGetCodeRequest
- type MessageBlockchainGetCodeResponse
- type MessageBlockchainGetCompiledCodeRequest
- type MessageBlockchainGetCompiledCodeResponse
- type MessageBlockchainGetESDTTokenRequest
- type MessageBlockchainGetESDTTokenResponse
- type MessageBlockchainGetShardOfAddressRequest
- type MessageBlockchainGetShardOfAddressResponse
- type MessageBlockchainGetStateRootHashRequest
- type MessageBlockchainGetStateRootHashResponse
- type MessageBlockchainGetStorageDataRequest
- type MessageBlockchainGetStorageDataResponse
- type MessageBlockchainGetUserAccountRequest
- type MessageBlockchainGetUserAccountResponse
- type MessageBlockchainIsPayableRequest
- type MessageBlockchainIsPayableResponse
- type MessageBlockchainIsSmartContractRequest
- type MessageBlockchainIsSmartContractResponse
- type MessageBlockchainLastEpochRequest
- type MessageBlockchainLastEpochResponse
- type MessageBlockchainLastNonceRequest
- type MessageBlockchainLastNonceResponse
- type MessageBlockchainLastRandomSeedRequest
- type MessageBlockchainLastRandomSeedResponse
- type MessageBlockchainLastRoundRequest
- type MessageBlockchainLastRoundResponse
- type MessageBlockchainLastTimeStampRequest
- type MessageBlockchainLastTimeStampResponse
- type MessageBlockchainNewAddressRequest
- type MessageBlockchainNewAddressResponse
- type MessageBlockchainProcessBuiltinFunctionRequest
- type MessageBlockchainProcessBuiltinFunctionResponse
- type MessageBlockchainSaveCompiledCodeRequest
- type MessageBlockchainSaveCompiledCodeResponse
- type MessageContractCallRequest
- type MessageContractDeployRequest
- type MessageContractResponse
- type MessageDiagnoseWaitRequest
- type MessageDiagnoseWaitResponse
- type MessageGasScheduleChangeRequest
- type MessageHandler
- type MessageInitialize
- type MessageKind
- type MessageReplier
- type MessageStop
- type MessageVersionRequest
- type MessageVersionResponse
- type Messenger
- type Receiver
- type Sender
- type SerializableMapStringBytes
- type SerializableOutputAccount
- type SerializableOutputTransfer
- type SerializableVMOutput
- type UndefinedMessage
Constants ¶
const ( // ErrCodeSuccess signals success ErrCodeSuccess = iota // ErrCodeCannotCreateFile signals a critical error ErrCodeCannotCreateFile // ErrCodeInit signals a critical error ErrCodeInit // ErrCodeTerminated signals a critical error ErrCodeTerminated )
const EnvVarArwenPath = "ARWEN_PATH"
EnvVarArwenPath is an environment variable
Variables ¶
var ErrArwenClosed = &CriticalError{InnerErr: fmt.Errorf("arwen closed")}
ErrArwenClosed signals a critical error
var ErrArwenNotFound = &CriticalError{InnerErr: fmt.Errorf("arwen binary not found")}
ErrArwenNotFound signals a critical error
var ErrArwenTimeExpired = &CriticalError{InnerErr: fmt.Errorf("arwen time expired")}
ErrArwenTimeExpired signals a critical error
var ErrBadArwenArguments = &CriticalError{InnerErr: fmt.Errorf("bad arguments passed to arwen")}
ErrBadArwenArguments signals a critical error
var ErrBadHookResponseFromNode = &CriticalError{InnerErr: fmt.Errorf("bad hook response from node")}
ErrBadHookResponseFromNode signals a critical error
var ErrBadMessageFromArwen = &CriticalError{InnerErr: fmt.Errorf("bad message from arwen")}
ErrBadMessageFromArwen signals a critical error
var ErrBadRequestFromNode = &CriticalError{InnerErr: fmt.Errorf("bad message from node")}
ErrBadRequestFromNode signals a critical error
var ErrCannotReceiveHookCallResponse = &CriticalError{InnerErr: fmt.Errorf("cannot receive hook call response")}
ErrCannotReceiveHookCallResponse signals a critical error
var ErrCannotSendContractRequest = &CriticalError{InnerErr: fmt.Errorf("cannot send contract request")}
ErrCannotSendContractRequest signals a critical error
var ErrCannotSendHookCallRequest = &CriticalError{InnerErr: fmt.Errorf("cannot send hook call request")}
ErrCannotSendHookCallRequest signals a critical error
var ErrCannotSendHookCallResponse = &CriticalError{InnerErr: fmt.Errorf("cannot send hook call response")}
ErrCannotSendHookCallResponse signals a critical error
var ErrInvalidMessageNonce = &CriticalError{InnerErr: fmt.Errorf("invalid dialogue nonce")}
ErrInvalidMessageNonce signals a critical error
var ErrStopPerNodeRequest = &CriticalError{InnerErr: fmt.Errorf("arwen will stop, as requested")}
ErrStopPerNodeRequest signals a critical error
Functions ¶
func IsContractResponse ¶
func IsContractResponse(message MessageHandler) bool
IsContractResponse returns whether a message is a contract response
func IsCriticalError ¶
IsCriticalError returns whether the error is critical
func IsDiagnose ¶
func IsDiagnose(message MessageHandler) bool
IsDiagnose returns whether a message is a diagnose request
func IsGasScheduleChangeResponse ¶
func IsGasScheduleChangeResponse(message MessageHandler) bool
IsGasScheduleChangeResponse returns a message with gas schedule response
func IsHookCall ¶
func IsHookCall(message MessageHandler) bool
IsHookCall returns whether a message is a hook call
func IsStopRequest ¶
func IsStopRequest(message MessageHandler) bool
IsStopRequest returns whether a message is a stop request
func IsVersionResponse ¶
func IsVersionResponse(message MessageHandler) bool
IsVersionResponse returns version response
func SendArwenArguments ¶
func SendArwenArguments(pipe *os.File, pipeArguments ArwenArguments) error
SendArwenArguments sends initialization arguments through a pipe
Types ¶
type Account ¶
type Account struct { Nonce uint64 Balance *big.Int CodeHash []byte RootHash []byte Address []byte DeveloperReward *big.Int OwnerAddress []byte UserName []byte CodeMetadata []byte }
Account holds the account info (is a substructure of an IPC message)
func (*Account) AccountDataHandler ¶
func (a *Account) AccountDataHandler() vmcommon.AccountDataHandler
DataTrieTracker -
func (*Account) AddressBytes ¶
AddressBytes gets the address
func (*Account) ChangeOwnerAddress ¶
ChangeOwnerAddress -
func (*Account) ClaimDeveloperRewards ¶
ClaimDeveloperRewards -
func (*Account) GetCodeMetadata ¶
GetCodeMetadata gets the code metadata
func (*Account) GetDeveloperReward ¶
GetDeveloperReward gets the developer reward
func (*Account) GetOwnerAddress ¶
GetOwnerAddress gets the owner's address
func (*Account) GetUserName ¶
GetOwnerAddress gets the username
func (*Account) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type ArwenArguments ¶
type ArwenArguments struct { arwen.VMHostParameters LogsMarshalizer marshaling.MarshalizerKind MessagesMarshalizer marshaling.MarshalizerKind }
ArwenArguments represents the initialization arguments required by Arwen, passed through the initialization pipe
func GetArwenArguments ¶
func GetArwenArguments(pipe *os.File) (*ArwenArguments, error)
GetArwenArguments reads initialization arguments from the pipe
type CriticalError ¶
type CriticalError struct {
InnerErr error
}
CriticalError signals a critical error
func WrapCriticalError ¶
func WrapCriticalError(err error) *CriticalError
WrapCriticalError wraps an error
func (*CriticalError) Error ¶
func (err *CriticalError) Error() string
func (*CriticalError) Unwrap ¶
func (err *CriticalError) Unwrap() error
Unwrap unwraps the inner error
type Message ¶
type Message struct { DialogueNonce uint32 Kind MessageKind ErrorMessage string }
Message is the implementation of the abstraction
func NewGasScheduleChangeResponse ¶
func NewGasScheduleChangeResponse() *Message
NewGasScheduleChangeResponse creates a message to respond
func (*Message) DebugString ¶
DebugString is a debug representation of the message
func (*Message) GetKind ¶
func (message *Message) GetKind() MessageKind
GetKind gets the message kind
func (*Message) GetKindName ¶
GetKindName gets the kind name
func (*Message) SetKind ¶
func (message *Message) SetKind(kind MessageKind)
SetKind sets the message kind
type MessageBlockchainCurrentEpochRequest ¶
type MessageBlockchainCurrentEpochRequest struct {
Message
}
MessageBlockchainCurrentEpochRequest represents a request message
func NewMessageBlockchainCurrentEpochRequest ¶
func NewMessageBlockchainCurrentEpochRequest() *MessageBlockchainCurrentEpochRequest
NewMessageBlockchainCurrentEpochRequest creates a request message
type MessageBlockchainCurrentEpochResponse ¶
MessageBlockchainCurrentEpochResponse represents a response message
func NewMessageBlockchainCurrentEpochResponse ¶
func NewMessageBlockchainCurrentEpochResponse(result uint32) *MessageBlockchainCurrentEpochResponse
NewMessageBlockchainCurrentEpochResponse creates a response message
type MessageBlockchainCurrentNonceRequest ¶
type MessageBlockchainCurrentNonceRequest struct {
Message
}
MessageBlockchainCurrentNonceRequest represents a request message
func NewMessageBlockchainCurrentNonceRequest ¶
func NewMessageBlockchainCurrentNonceRequest() *MessageBlockchainCurrentNonceRequest
NewMessageBlockchainCurrentNonceRequest creates a request message
type MessageBlockchainCurrentNonceResponse ¶
MessageBlockchainCurrentNonceResponse represents a response message
func NewMessageBlockchainCurrentNonceResponse ¶
func NewMessageBlockchainCurrentNonceResponse(result uint64) *MessageBlockchainCurrentNonceResponse
NewMessageBlockchainCurrentNonceResponse creates a response message
type MessageBlockchainCurrentRandomSeedRequest ¶
type MessageBlockchainCurrentRandomSeedRequest struct {
Message
}
MessageBlockchainCurrentRandomSeedRequest represents a request message
func NewMessageBlockchainCurrentRandomSeedRequest ¶
func NewMessageBlockchainCurrentRandomSeedRequest() *MessageBlockchainCurrentRandomSeedRequest
NewMessageBlockchainCurrentRandomSeedRequest creates a request message
type MessageBlockchainCurrentRandomSeedResponse ¶
MessageBlockchainCurrentRandomSeedResponse represents a response message
func NewMessageBlockchainCurrentRandomSeedResponse ¶
func NewMessageBlockchainCurrentRandomSeedResponse(result []byte) *MessageBlockchainCurrentRandomSeedResponse
NewMessageBlockchainCurrentRandomSeedResponse creates a response message
type MessageBlockchainCurrentRoundRequest ¶
type MessageBlockchainCurrentRoundRequest struct {
Message
}
MessageBlockchainCurrentRoundRequest represents a request message
func NewMessageBlockchainCurrentRoundRequest ¶
func NewMessageBlockchainCurrentRoundRequest() *MessageBlockchainCurrentRoundRequest
NewMessageBlockchainCurrentRoundRequest creates a request message
type MessageBlockchainCurrentRoundResponse ¶
MessageBlockchainCurrentRoundResponse represents a response message
func NewMessageBlockchainCurrentRoundResponse ¶
func NewMessageBlockchainCurrentRoundResponse(result uint64) *MessageBlockchainCurrentRoundResponse
NewMessageBlockchainCurrentRoundResponse creates a response message
type MessageBlockchainCurrentTimeStampRequest ¶
type MessageBlockchainCurrentTimeStampRequest struct {
Message
}
MessageBlockchainCurrentTimeStampRequest represents a request message
func NewMessageBlockchainCurrentTimeStampRequest ¶
func NewMessageBlockchainCurrentTimeStampRequest() *MessageBlockchainCurrentTimeStampRequest
NewMessageBlockchainCurrentTimeStampRequest creates a request message
type MessageBlockchainCurrentTimeStampResponse ¶
MessageBlockchainCurrentTimeStampResponse represents a response message
func NewMessageBlockchainCurrentTimeStampResponse ¶
func NewMessageBlockchainCurrentTimeStampResponse(result uint64) *MessageBlockchainCurrentTimeStampResponse
NewMessageBlockchainCurrentTimeStampResponse creates a response message
type MessageBlockchainGetAllStateRequest ¶
MessageBlockchainGetAllStateRequest represents a request message
func NewMessageBlockchainGetAllStateRequest ¶
func NewMessageBlockchainGetAllStateRequest(address []byte) *MessageBlockchainGetAllStateRequest
NewMessageBlockchainGetAllStateRequest creates a request message
type MessageBlockchainGetAllStateResponse ¶
type MessageBlockchainGetAllStateResponse struct { Message SerializableAllState *SerializableMapStringBytes }
MessageBlockchainGetAllStateResponse represents a response message
func NewMessageBlockchainGetAllStateResponse ¶
func NewMessageBlockchainGetAllStateResponse(state map[string][]byte, err error) *MessageBlockchainGetAllStateResponse
NewMessageBlockchainGetAllStateResponse creates a response message
type MessageBlockchainGetBlockhashRequest ¶
MessageBlockchainGetBlockhashRequest represents a request message
func NewMessageBlockchainGetBlockhashRequest ¶
func NewMessageBlockchainGetBlockhashRequest(nonce uint64) *MessageBlockchainGetBlockhashRequest
NewMessageBlockchainGetBlockhashRequest creates a request message
type MessageBlockchainGetBlockhashResponse ¶
MessageBlockchainGetBlockhashResponse represents a response message
func NewMessageBlockchainGetBlockhashResponse ¶
func NewMessageBlockchainGetBlockhashResponse(result []byte, err error) *MessageBlockchainGetBlockhashResponse
NewMessageBlockchainGetBlockhashResponse creates a response message
type MessageBlockchainGetBuiltinFunctionNamesRequest ¶
type MessageBlockchainGetBuiltinFunctionNamesRequest struct {
Message
}
MessageBlockchainGetBuiltinFunctionNamesRequest represents a request message
func NewMessageBlockchainGetBuiltinFunctionNamesRequest ¶
func NewMessageBlockchainGetBuiltinFunctionNamesRequest() *MessageBlockchainGetBuiltinFunctionNamesRequest
NewMessageBlockchainGetBuiltinFunctionNamesRequest creates a request message
type MessageBlockchainGetBuiltinFunctionNamesResponse ¶
type MessageBlockchainGetBuiltinFunctionNamesResponse struct { Message FunctionNames vmcommon.FunctionNames }
MessageBlockchainGetBuiltinFunctionNamesResponse represents a response message
func NewMessageBlockchainGetBuiltinFunctionNamesResponse ¶
func NewMessageBlockchainGetBuiltinFunctionNamesResponse(functionNames vmcommon.FunctionNames) *MessageBlockchainGetBuiltinFunctionNamesResponse
NewMessageBlockchainGetBuiltinFunctionNamesResponse creates a response message
type MessageBlockchainGetCodeRequest ¶
NewMessageBlockchainGetCodeRequest represents a request message
func NewMessageBlockchainGetCodeRequest ¶
func NewMessageBlockchainGetCodeRequest(account *Account) *MessageBlockchainGetCodeRequest
NewMessageBlockchainGetCodeRequest creates a request message
type MessageBlockchainGetCodeResponse ¶
MessageBlockchainGetCodeResponse represents a response message
func NewMessageBlockchainGetCodeResponse ¶
func NewMessageBlockchainGetCodeResponse(code []byte) *MessageBlockchainGetCodeResponse
NewMessageBlockchainGetCodeResponse creates a response message
type MessageBlockchainGetCompiledCodeRequest ¶
MessageBlockchainGetCompiledCodeRequest represents a request message
func NewMessageBlockchainGetCompiledCodeRequest ¶
func NewMessageBlockchainGetCompiledCodeRequest(codeHash []byte) *MessageBlockchainGetCompiledCodeRequest
NewMessageBlockchainGetCompiledCodeRequest creates a request message
type MessageBlockchainGetCompiledCodeResponse ¶
MessageBlockchainGetCompiledCodeResponse represents a response message
func NewMessageBlockchainGetCompiledCodeResponse ¶
func NewMessageBlockchainGetCompiledCodeResponse(result bool, code []byte) *MessageBlockchainGetCompiledCodeResponse
NewMessageBlockchainGetCompiledCodeResponse creates a response message
type MessageBlockchainGetESDTTokenRequest ¶
type MessageBlockchainGetESDTTokenRequest struct { Message Address []byte TokenID []byte Nonce uint64 }
MessageBlockchainGetESDTTokenRequest represents a request message
func NewMessageBlockchainGetESDTTokenRequest ¶
func NewMessageBlockchainGetESDTTokenRequest(address []byte, tokenID []byte, nonce uint64) *MessageBlockchainGetESDTTokenRequest
NewMessageBlockchainGetESDTTokenRequest creates a request message
type MessageBlockchainGetESDTTokenResponse ¶
type MessageBlockchainGetESDTTokenResponse struct { Message ESDTData *esdt.ESDigitalToken }
MessageBlockchainGetESDTTokenResponse represents a response message
func NewMessageBlockchainGetESDTTokenResponse ¶
func NewMessageBlockchainGetESDTTokenResponse(esdtData *esdt.ESDigitalToken, err error) *MessageBlockchainGetESDTTokenResponse
NewMessageBlockchainGetESDTTokenResponse creates a response message
type MessageBlockchainGetShardOfAddressRequest ¶
MessageBlockchainGetShardOfAddressRequest represents a request message
func NewMessageBlockchainGetShardOfAddressRequest ¶
func NewMessageBlockchainGetShardOfAddressRequest(address []byte) *MessageBlockchainGetShardOfAddressRequest
NewMessageBlockchainGetShardOfAddressRequest creates a request message
type MessageBlockchainGetShardOfAddressResponse ¶
MessageBlockchainGetShardOfAddressResponse represents a response message
func NewMessageBlockchainGetShardOfAddressResponse ¶
func NewMessageBlockchainGetShardOfAddressResponse(shard uint32) *MessageBlockchainGetShardOfAddressResponse
NewMessageBlockchainGetShardOfAddressResponse creates a response message
type MessageBlockchainGetStateRootHashRequest ¶
type MessageBlockchainGetStateRootHashRequest struct {
Message
}
MessageBlockchainGetStateRootHashRequest represents a request message
func NewMessageBlockchainGetStateRootHashRequest ¶
func NewMessageBlockchainGetStateRootHashRequest() *MessageBlockchainGetStateRootHashRequest
NewMessageBlockchainGetStateRootHashRequest creates a request message
type MessageBlockchainGetStateRootHashResponse ¶
MessageBlockchainGetStateRootHashResponse represents a response message
func NewMessageBlockchainGetStateRootHashResponse ¶
func NewMessageBlockchainGetStateRootHashResponse(result []byte) *MessageBlockchainGetStateRootHashResponse
NewMessageBlockchainGetStateRootHashResponse creates a response message
type MessageBlockchainGetStorageDataRequest ¶
MessageBlockchainGetStorageDataRequest represents a request message
func NewMessageBlockchainGetStorageDataRequest ¶
func NewMessageBlockchainGetStorageDataRequest(address []byte, index []byte) *MessageBlockchainGetStorageDataRequest
NewMessageBlockchainGetStorageDataRequest creates a request message
type MessageBlockchainGetStorageDataResponse ¶
MessageBlockchainGetStorageDataResponse represents a response message
func NewMessageBlockchainGetStorageDataResponse ¶
func NewMessageBlockchainGetStorageDataResponse(data []byte, err error) *MessageBlockchainGetStorageDataResponse
NewMessageBlockchainGetStorageDataResponse creates a response message
type MessageBlockchainGetUserAccountRequest ¶
MessageBlockchainGetUserAccountRequest represents a request message
func NewMessageBlockchainGetUserAccountRequest ¶
func NewMessageBlockchainGetUserAccountRequest(address []byte) *MessageBlockchainGetUserAccountRequest
NewMessageBlockchainGetUserAccountRequest creates a request message
type MessageBlockchainGetUserAccountResponse ¶
MessageBlockchainGetUserAccountResponse represents a response message
func NewMessageBlockchainGetUserAccountResponse ¶
func NewMessageBlockchainGetUserAccountResponse(account *Account, err error) *MessageBlockchainGetUserAccountResponse
NewMessageBlockchainGetUserAccountResponse creates a response message
type MessageBlockchainIsPayableRequest ¶
MessageBlockchainIsPayableRequest represents a request message
func NewMessageBlockchainIsPayableRequest ¶
func NewMessageBlockchainIsPayableRequest(address []byte) *MessageBlockchainIsPayableRequest
NewMessageBlockchainIsPayableRequest creates a request message
type MessageBlockchainIsPayableResponse ¶
MessageBlockchainIsPayableResponse represents a response message
func NewMessageBlockchainIsPayableResponse ¶
func NewMessageBlockchainIsPayableResponse(result bool, err error) *MessageBlockchainIsPayableResponse
NewMessageBlockchainIsPayableResponse creates a response message
type MessageBlockchainIsSmartContractRequest ¶
MessageBlockchainIsSmartContractRequest represents a request message
func NewMessageBlockchainIsSmartContractRequest ¶
func NewMessageBlockchainIsSmartContractRequest(address []byte) *MessageBlockchainIsSmartContractRequest
NewMessageBlockchainIsSmartContractRequest creates a request message
type MessageBlockchainIsSmartContractResponse ¶
MessageBlockchainIsSmartContractResponse represents a response message
func NewMessageBlockchainIsSmartContractResponse ¶
func NewMessageBlockchainIsSmartContractResponse(result bool) *MessageBlockchainIsSmartContractResponse
NewMessageBlockchainIsSmartContractResponse creates a response message
type MessageBlockchainLastEpochRequest ¶
type MessageBlockchainLastEpochRequest struct {
Message
}
MessageBlockchainLastEpochRequest represents a request message
func NewMessageBlockchainLastEpochRequest ¶
func NewMessageBlockchainLastEpochRequest() *MessageBlockchainLastEpochRequest
NewMessageBlockchainLastEpochRequest creates a request message
type MessageBlockchainLastEpochResponse ¶
MessageBlockchainLastEpochResponse represents a response message
func NewMessageBlockchainLastEpochResponse ¶
func NewMessageBlockchainLastEpochResponse(result uint32) *MessageBlockchainLastEpochResponse
NewMessageBlockchainLastEpochResponse creates a response message
type MessageBlockchainLastNonceRequest ¶
type MessageBlockchainLastNonceRequest struct {
Message
}
MessageBlockchainLastNonceRequest represents a request message
func NewMessageBlockchainLastNonceRequest ¶
func NewMessageBlockchainLastNonceRequest() *MessageBlockchainLastNonceRequest
NewMessageBlockchainLastNonceRequest creates a request message
type MessageBlockchainLastNonceResponse ¶
MessageBlockchainLastNonceResponse represents a response message
func NewMessageBlockchainLastNonceResponse ¶
func NewMessageBlockchainLastNonceResponse(result uint64) *MessageBlockchainLastNonceResponse
NewMessageBlockchainLastNonceResponse creates a response message
type MessageBlockchainLastRandomSeedRequest ¶
type MessageBlockchainLastRandomSeedRequest struct {
Message
}
MessageBlockchainLastRandomSeedRequest represents a request message
func NewMessageBlockchainLastRandomSeedRequest ¶
func NewMessageBlockchainLastRandomSeedRequest() *MessageBlockchainLastRandomSeedRequest
NewMessageBlockchainLastRandomSeedRequest creates a request message
type MessageBlockchainLastRandomSeedResponse ¶
MessageBlockchainLastRandomSeedResponse represents a response message
func NewMessageBlockchainLastRandomSeedResponse ¶
func NewMessageBlockchainLastRandomSeedResponse(result []byte) *MessageBlockchainLastRandomSeedResponse
NewMessageBlockchainLastRandomSeedResponse creates a response message
type MessageBlockchainLastRoundRequest ¶
type MessageBlockchainLastRoundRequest struct {
Message
}
MessageBlockchainLastRoundRequest represents a request message
func NewMessageBlockchainLastRoundRequest ¶
func NewMessageBlockchainLastRoundRequest() *MessageBlockchainLastRoundRequest
NewMessageBlockchainLastRoundRequest creates a request message
type MessageBlockchainLastRoundResponse ¶
MessageBlockchainLastRoundResponse represents a response message
func NewMessageBlockchainLastRoundResponse ¶
func NewMessageBlockchainLastRoundResponse(result uint64) *MessageBlockchainLastRoundResponse
NewMessageBlockchainLastRoundResponse creates a response message
type MessageBlockchainLastTimeStampRequest ¶
type MessageBlockchainLastTimeStampRequest struct {
Message
}
MessageBlockchainLastTimeStampRequest represents a request message
func NewMessageBlockchainLastTimeStampRequest ¶
func NewMessageBlockchainLastTimeStampRequest() *MessageBlockchainLastTimeStampRequest
NewMessageBlockchainLastTimeStampRequest creates a request message
type MessageBlockchainLastTimeStampResponse ¶
MessageBlockchainLastTimeStampResponse represents a response message
func NewMessageBlockchainLastTimeStampResponse ¶
func NewMessageBlockchainLastTimeStampResponse(result uint64) *MessageBlockchainLastTimeStampResponse
NewMessageBlockchainLastTimeStampResponse creates a response message
type MessageBlockchainNewAddressRequest ¶
type MessageBlockchainNewAddressRequest struct { Message CreatorAddress []byte CreatorNonce uint64 VMType []byte }
MessageBlockchainNewAddressRequest represents a request message
func NewMessageBlockchainNewAddressRequest ¶
func NewMessageBlockchainNewAddressRequest(creatorAddress []byte, creatorNonce uint64, vmType []byte) *MessageBlockchainNewAddressRequest
NewMessageBlockchainNewAddressRequest creates a request message
type MessageBlockchainNewAddressResponse ¶
MessageBlockchainNewAddressResponse represents a response message
func NewMessageBlockchainNewAddressResponse ¶
func NewMessageBlockchainNewAddressResponse(result []byte, err error) *MessageBlockchainNewAddressResponse
NewMessageBlockchainNewAddressResponse creates a response message
type MessageBlockchainProcessBuiltinFunctionRequest ¶
type MessageBlockchainProcessBuiltinFunctionRequest struct { Message CallInput vmcommon.ContractCallInput }
MessageBlockchainProcessBuiltinFunctionRequest represents a request message
func NewMessageBlockchainProcessBuiltinFunctionRequest ¶
func NewMessageBlockchainProcessBuiltinFunctionRequest(callInput vmcommon.ContractCallInput) *MessageBlockchainProcessBuiltinFunctionRequest
NewMessageBlockchainProcessBuiltinFunctionRequest creates a request message
type MessageBlockchainProcessBuiltinFunctionResponse ¶
type MessageBlockchainProcessBuiltinFunctionResponse struct { Message SerializableVMOutput *SerializableVMOutput }
MessageBlockchainProcessBuiltinFunctionResponse represents a response message
func NewMessageBlockchainProcessBuiltinFunctionResponse ¶
func NewMessageBlockchainProcessBuiltinFunctionResponse(vmOutput *vmcommon.VMOutput, err error) *MessageBlockchainProcessBuiltinFunctionResponse
NewMessageBlockchainProcessBuiltinFunctionResponse creates a response message
type MessageBlockchainSaveCompiledCodeRequest ¶
MessageBlockchainSaveCompiledCodeRequest represents a request message
func NewMessageBlockchainSaveCompiledCodeRequest ¶
func NewMessageBlockchainSaveCompiledCodeRequest(codeHash []byte, code []byte) *MessageBlockchainSaveCompiledCodeRequest
NewMessageBlockchainSaveCompiledCodeRequest creates a request message
type MessageBlockchainSaveCompiledCodeResponse ¶
type MessageBlockchainSaveCompiledCodeResponse struct {
Message
}
MessageBlockchainSaveCompiledCodeResponse represents a response message
func NewMessageBlockchainSaveCompiledCodeResponse ¶
func NewMessageBlockchainSaveCompiledCodeResponse() *MessageBlockchainSaveCompiledCodeResponse
NewMessageBlockchainSaveCompiledCodeResponse creates a response message
type MessageContractCallRequest ¶
type MessageContractCallRequest struct { Message CallInput *vmcommon.ContractCallInput }
MessageContractCallRequest is a call request message (from the Node)
func NewMessageContractCallRequest ¶
func NewMessageContractCallRequest(input *vmcommon.ContractCallInput) *MessageContractCallRequest
NewMessageContractCallRequest creates a MessageContractCallRequest
type MessageContractDeployRequest ¶
type MessageContractDeployRequest struct { Message CreateInput *vmcommon.ContractCreateInput }
MessageContractDeployRequest is a deploy request message (from the Node)
func NewMessageContractDeployRequest ¶
func NewMessageContractDeployRequest(input *vmcommon.ContractCreateInput) *MessageContractDeployRequest
NewMessageContractDeployRequest creates a MessageContractDeployRequest
type MessageContractResponse ¶
type MessageContractResponse struct { Message SerializableVMOutput *SerializableVMOutput }
MessageContractResponse is a contract response message (from Arwen)
func NewMessageContractResponse ¶
func NewMessageContractResponse(vmOutput *vmcommon.VMOutput, err error) *MessageContractResponse
NewMessageContractResponse creates a MessageContractResponse
type MessageDiagnoseWaitRequest ¶
MessageDiagnoseWaitRequest is a diagnose request message (from Node)
func NewMessageDiagnoseWaitRequest ¶
func NewMessageDiagnoseWaitRequest(milliseconds uint32) *MessageDiagnoseWaitRequest
NewMessageDiagnoseWaitRequest creates a message
type MessageDiagnoseWaitResponse ¶
type MessageDiagnoseWaitResponse struct {
Message
}
MessageDiagnoseWaitResponse is a diagnose response message (from Arwen)
func NewMessageDiagnoseWaitResponse ¶
func NewMessageDiagnoseWaitResponse() *MessageDiagnoseWaitResponse
NewMessageDiagnoseWaitResponse creates a message
type MessageGasScheduleChangeRequest ¶
MessageGasScheduleChangeRequest is a deploy request message (from the Node)
func NewMessageGasScheduleChangeRequest ¶
func NewMessageGasScheduleChangeRequest(gasSchedule map[string]map[string]uint64) *MessageGasScheduleChangeRequest
NewMessageGasScheduleChangeRequest creates a MessageGasScheduleChangeRequest
type MessageHandler ¶
type MessageHandler interface { GetNonce() uint32 SetNonce(nonce uint32) GetKind() MessageKind SetKind(kind MessageKind) GetError() error SetError(err error) GetKindName() string DebugString() string }
MessageHandler is a message abstraction
func CreateMessage ¶
func CreateMessage(kind MessageKind) MessageHandler
CreateMessage creates a message given its kind
type MessageInitialize ¶
type MessageInitialize struct { Message Arguments ArwenArguments }
MessageInitialize is a message sent by Node to initialize Arwen
func NewMessageInitialize ¶
func NewMessageInitialize(arguments ArwenArguments) *MessageInitialize
NewMessageInitialize creates a new message
type MessageKind ¶
type MessageKind uint32
MessageKind is the kind of a message (that is passed between the Node and Arwen)
const ( FirstKind MessageKind = iota Initialize Stop ContractDeployRequest ContractCallRequest ContractResponse GasScheduleChangeRequest GasScheduleChangeResponse BlockchainNewAddressRequest BlockchainNewAddressResponse BlockchainGetStorageDataRequest BlockchainGetStorageDataResponse BlockchainGetBlockhashRequest BlockchainGetBlockhashResponse BlockchainLastNonceRequest BlockchainLastNonceResponse BlockchainLastRoundRequest BlockchainLastRoundResponse BlockchainLastTimeStampRequest BlockchainLastTimeStampResponse BlockchainLastRandomSeedRequest BlockchainLastRandomSeedResponse BlockchainLastEpochRequest BlockchainLastEpochResponse BlockchainGetStateRootHashRequest BlockchainGetStateRootHashResponse BlockchainCurrentNonceRequest BlockchainCurrentNonceResponse BlockchainCurrentRoundRequest BlockchainCurrentRoundResponse BlockchainCurrentTimeStampRequest BlockchainCurrentTimeStampResponse BlockchainCurrentRandomSeedRequest BlockchainCurrentRandomSeedResponse BlockchainCurrentEpochRequest BlockchainCurrentEpochResponse BlockchainProcessBuiltinFunctionRequest BlockchainProcessBuiltinFunctionResponse BlockchainGetESDTTokenRequest BlockchainGetESDTTokenResponse BlockchainGetBuiltinFunctionNamesRequest BlockchainGetBuiltinFunctionNamesResponse BlockchainGetAllStateRequest BlockchainGetAllStateResponse BlockchainGetUserAccountRequest BlockchainGetUserAccountResponse BlockchainGetCodeRequest BlockchainGetCodeResponse BlockchainGetShardOfAddressRequest BlockchainGetShardOfAddressResponse BlockchainIsPayableRequest BlockchainIsPayableResponse BlockchainIsSmartContractRequest BlockchainIsSmartContractResponse BlockchainSaveCompiledCodeRequest BlockchainSaveCompiledCodeResponse BlockchainGetCompiledCodeRequest BlockchainGetCompiledCodeResponse DiagnoseWaitRequest DiagnoseWaitResponse VersionRequest VersionResponse UndefinedRequestOrResponse LastKind )
type MessageReplier ¶
type MessageReplier func(MessageHandler) MessageHandler
MessageReplier is a callback signature
func CreateReplySlots ¶
func CreateReplySlots(noopReplier MessageReplier) []MessageReplier
CreateReplySlots creates a slice of no-operation repliers, to be substituted with actual repliers (by message listeners)
type MessageStop ¶
type MessageStop struct {
Message
}
MessageStop is a message sent by Node to stop Arwen
type MessageVersionRequest ¶
type MessageVersionRequest struct {
Message
}
MessageVersionRequest is a version request message (from the Node)
func NewMessageVersionRequest ¶
func NewMessageVersionRequest() *MessageVersionRequest
NewMessageVersionRequest creates a MessageVersionRequest
type MessageVersionResponse ¶
MessageVersionResponse is a version response message (from Arwen)
func NewMessageVersionResponse ¶
func NewMessageVersionResponse(version string) *MessageVersionResponse
NewMessageVersionResponse creates a MessageVersionResponse
type Messenger ¶
Messenger intermediates communication (message exchange) via pipes
func NewMessenger ¶
NewMessenger creates a new messenger
func NewMessengerPipes ¶
func NewMessengerPipes(name string, reader *os.File, writer *os.File, marshalizer marshaling.Marshalizer) *Messenger
NewMessengerPipes creates a new messenger from pipes
func (*Messenger) Receive ¶
func (messenger *Messenger) Receive(timeout int) (MessageHandler, error)
Receive receives a message, reads it from the pipe
func (*Messenger) ResetDialogue ¶
func (messenger *Messenger) ResetDialogue()
ResetDialogue resets the dialogue nonce
func (*Messenger) Send ¶
func (messenger *Messenger) Send(message MessageHandler) error
Send sends a message over the pipe
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver intermediates communication (message receiving) via pipes
func NewReceiver ¶
func NewReceiver(reader *os.File, marshalizer marshaling.Marshalizer) *Receiver
NewReceiver creates a new receiver
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender intermediates communication (message sending) via pipes
func NewSender ¶
func NewSender(writer *os.File, marshalizer marshaling.Marshalizer) *Sender
NewSender creates a new sender
type SerializableMapStringBytes ¶
func NewSerializableMapStringBytes ¶
func NewSerializableMapStringBytes(data map[string][]byte) *SerializableMapStringBytes
func (*SerializableMapStringBytes) ConvertToMap ¶
func (s *SerializableMapStringBytes) ConvertToMap() map[string][]byte
type SerializableOutputAccount ¶
type SerializableOutputAccount struct { Address []byte Nonce uint64 Balance *big.Int BalanceDelta *big.Int StorageUpdates []*vmcommon.StorageUpdate Code []byte CodeMetadata []byte GasUsed uint64 Transfers []SerializableOutputTransfer CodeDeployerAddress []byte }
func NewSerializableOutputAccount ¶
func NewSerializableOutputAccount(account *vmcommon.OutputAccount) *SerializableOutputAccount
func (*SerializableOutputAccount) ConvertToOutputAccount ¶
func (a *SerializableOutputAccount) ConvertToOutputAccount() *vmcommon.OutputAccount
type SerializableVMOutput ¶
type SerializableVMOutput struct { ReturnData [][]byte ReturnCode vmcommon.ReturnCode ReturnMessage string GasRemaining uint64 GasRefund *big.Int CorrectedOutputAccounts []*SerializableOutputAccount DeletedAccounts [][]byte TouchedAccounts [][]byte Logs []*vmcommon.LogEntry }
func NewSerializableVMOutput ¶
func NewSerializableVMOutput(vmOutput *vmcommon.VMOutput) *SerializableVMOutput
func (*SerializableVMOutput) ConvertToVMOutput ¶
func (o *SerializableVMOutput) ConvertToVMOutput() *vmcommon.VMOutput
type UndefinedMessage ¶
type UndefinedMessage struct {
Message
}
UndefinedMessage is an undefined message
func NewUndefinedMessage ¶
func NewUndefinedMessage() *UndefinedMessage
NewUndefinedMessage creates an undefined message