Documentation
¶
Index ¶
- Variables
- func LookupWorldOp(ctx context.Context, opTypeID string) (world.Operation, error)
- type Transaction
- type Tx
- func (t *Tx) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (t *Tx) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *Tx) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Tx) CloneVT() *Tx
- func (this *Tx) EqualMessageVT(thatMsg any) bool
- func (this *Tx) EqualVT(that *Tx) bool
- func (t *Tx) GetOperationTypeId() string
- func (x *Tx) GetTxAppendLog() *TxAppendLog
- func (x *Tx) GetTxComplete() *TxComplete
- func (x *Tx) GetTxSetOutputs() *TxSetOutputs
- func (x *Tx) GetTxStart() *TxStart
- func (x *Tx) GetTxType() TxType
- func (t *Tx) LocateTx() (Transaction, error)
- func (t *Tx) MarshalBlock() ([]byte, error)
- func (x *Tx) MarshalJSON() ([]byte, error)
- func (x *Tx) MarshalProtoJSON(s *json.MarshalState)
- func (x *Tx) MarshalProtoText() string
- func (m *Tx) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Tx) MarshalToVT(dAtA []byte) (int, error)
- func (m *Tx) MarshalVT() (dAtA []byte, err error)
- func (*Tx) ProtoMessage()
- func (x *Tx) Reset()
- func (m *Tx) SizeVT() (n int)
- func (x *Tx) String() string
- func (t *Tx) UnmarshalBlock(data []byte) error
- func (x *Tx) UnmarshalJSON(b []byte) error
- func (x *Tx) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Tx) UnmarshalVT(dAtA []byte) error
- func (t *Tx) Validate() error
- type TxAppendLog
- func (m *TxAppendLog) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxAppendLog) CloneVT() *TxAppendLog
- func (this *TxAppendLog) EqualMessageVT(thatMsg any) bool
- func (this *TxAppendLog) EqualVT(that *TxAppendLog) bool
- func (t *TxAppendLog) ExecuteTx(ctx context.Context, sender peer.ID, exCursor *block.Cursor, ...) error
- func (x *TxAppendLog) GetEntries() []*execution.LogEntry
- func (t *TxAppendLog) GetTxType() TxType
- func (x *TxAppendLog) MarshalJSON() ([]byte, error)
- func (x *TxAppendLog) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxAppendLog) MarshalProtoText() string
- func (m *TxAppendLog) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxAppendLog) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxAppendLog) MarshalVT() (dAtA []byte, err error)
- func (*TxAppendLog) ProtoMessage()
- func (x *TxAppendLog) Reset()
- func (m *TxAppendLog) SizeVT() (n int)
- func (x *TxAppendLog) String() string
- func (x *TxAppendLog) UnmarshalJSON(b []byte) error
- func (x *TxAppendLog) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxAppendLog) UnmarshalVT(dAtA []byte) error
- func (t *TxAppendLog) Validate() error
- type TxComplete
- func (m *TxComplete) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxComplete) CloneVT() *TxComplete
- func (this *TxComplete) EqualMessageVT(thatMsg any) bool
- func (this *TxComplete) EqualVT(that *TxComplete) bool
- func (t *TxComplete) ExecuteTx(ctx context.Context, sender peer.ID, exCursor *block.Cursor, ...) error
- func (x *TxComplete) GetResult() *value.Result
- func (t *TxComplete) GetTxType() TxType
- func (x *TxComplete) MarshalJSON() ([]byte, error)
- func (x *TxComplete) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxComplete) MarshalProtoText() string
- func (m *TxComplete) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxComplete) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxComplete) MarshalVT() (dAtA []byte, err error)
- func (*TxComplete) ProtoMessage()
- func (x *TxComplete) Reset()
- func (m *TxComplete) SizeVT() (n int)
- func (x *TxComplete) String() string
- func (x *TxComplete) UnmarshalJSON(b []byte) error
- func (x *TxComplete) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxComplete) UnmarshalVT(dAtA []byte) error
- func (t *TxComplete) Validate() error
- type TxSetOutputs
- func (m *TxSetOutputs) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxSetOutputs) CloneVT() *TxSetOutputs
- func (this *TxSetOutputs) EqualMessageVT(thatMsg any) bool
- func (this *TxSetOutputs) EqualVT(that *TxSetOutputs) bool
- func (t *TxSetOutputs) ExecuteTx(ctx context.Context, sender peer.ID, exCursor *block.Cursor, ...) error
- func (x *TxSetOutputs) GetClearOld() bool
- func (x *TxSetOutputs) GetOutputs() []*value.Value
- func (t *TxSetOutputs) GetTxType() TxType
- func (x *TxSetOutputs) MarshalJSON() ([]byte, error)
- func (x *TxSetOutputs) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxSetOutputs) MarshalProtoText() string
- func (m *TxSetOutputs) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxSetOutputs) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxSetOutputs) MarshalVT() (dAtA []byte, err error)
- func (*TxSetOutputs) ProtoMessage()
- func (x *TxSetOutputs) Reset()
- func (m *TxSetOutputs) SizeVT() (n int)
- func (x *TxSetOutputs) String() string
- func (x *TxSetOutputs) UnmarshalJSON(b []byte) error
- func (x *TxSetOutputs) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxSetOutputs) UnmarshalVT(dAtA []byte) error
- func (t *TxSetOutputs) Validate() error
- type TxStart
- func (m *TxStart) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxStart) CloneVT() *TxStart
- func (this *TxStart) EqualMessageVT(thatMsg any) bool
- func (this *TxStart) EqualVT(that *TxStart) bool
- func (t *TxStart) ExecuteTx(ctx context.Context, sender peer.ID, exCursor *block.Cursor, ...) error
- func (x *TxStart) GetPeerId() string
- func (t *TxStart) GetTxType() TxType
- func (x *TxStart) MarshalJSON() ([]byte, error)
- func (x *TxStart) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxStart) MarshalProtoText() string
- func (m *TxStart) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxStart) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxStart) MarshalVT() (dAtA []byte, err error)
- func (t *TxStart) ParsePeerID() (peer.ID, error)
- func (*TxStart) ProtoMessage()
- func (x *TxStart) Reset()
- func (m *TxStart) SizeVT() (n int)
- func (x *TxStart) String() string
- func (x *TxStart) UnmarshalJSON(b []byte) error
- func (x *TxStart) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxStart) UnmarshalVT(dAtA []byte) error
- func (t *TxStart) Validate() error
- type TxType
- func (x TxType) Enum() *TxType
- func (x TxType) MarshalJSON() ([]byte, error)
- func (x TxType) MarshalProtoJSON(s *json.MarshalState)
- func (x TxType) MarshalProtoText() string
- func (x TxType) MarshalText() ([]byte, error)
- func (x TxType) String() string
- func (x *TxType) UnmarshalJSON(b []byte) error
- func (x *TxType) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *TxType) UnmarshalText(b []byte) error
- func (t TxType) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ( TxType_name = map[int32]string{ 0: "TxType_INVALID", 1: "TxType_START", 2: "TxType_SET_OUTPUTS", 3: "TxType_COMPLETE", 4: "TxType_APPEND_LOG", } TxType_value = map[string]int32{ "TxType_INVALID": 0, "TxType_START": 1, "TxType_SET_OUTPUTS": 2, "TxType_COMPLETE": 3, "TxType_APPEND_LOG": 4, } )
Enum value maps for TxType.
var ObjectOperationTypeID = "forge/execution/tx"
ObjectOperationTypeID is the transaction object operation type id.
Functions ¶
Types ¶
type Transaction ¶
type Transaction interface {
// MarshalVT marshals to binary.
MarshalVT() ([]byte, error)
// UnmarshalVT unmarshals from binary.
UnmarshalVT(data []byte) error
// GetTxType returns the type of transaction this is.
GetTxType() TxType
// Validate performs a cursory check of the transaction.
// Note: this should not fetch network data.
Validate() error
// ExecuteTx executes the transaction against the execution instance.
// exCursor should be located at the execution state root.
// The result is written into exCursor.
ExecuteTx(
ctx context.Context,
sender peer.ID,
exCursor *block.Cursor,
root *forge_execution.Execution,
) error
}
Transaction is an instance of a transaction object.
func NewTxCompleteTxn ¶
func NewTxCompleteTxn() Transaction
NewTxCompleteTxn constructs the COMPLETE transaction.
func NewTxSetOutputsTxn ¶
func NewTxSetOutputsTxn() Transaction
NewTxSetOutputsTxn constructs a new SET_OUTPUTS transaction.
func NewTxStartTxn ¶
func NewTxStartTxn() Transaction
NewTxStartTxn constructs a new START transaction.
type Tx ¶
type Tx struct {
// TxType is the kind of transaction this is.
TxType TxType `protobuf:"varint,1,opt,name=tx_type,json=txType,proto3" json:"txType,omitempty"`
// TxStart contains the start transaction tx.
// TxType_INVALID
TxStart *TxStart `protobuf:"bytes,2,opt,name=tx_start,json=txStart,proto3" json:"txStart,omitempty"`
// TxSetOutputs contains the set outputs tx.
// TxType_SET_OUTPUTS
TxSetOutputs *TxSetOutputs `protobuf:"bytes,3,opt,name=tx_set_outputs,json=txSetOutputs,proto3" json:"txSetOutputs,omitempty"`
// TxComplete contains the complete tx.
// TxType_COMPLETE
TxComplete *TxComplete `protobuf:"bytes,4,opt,name=tx_complete,json=txComplete,proto3" json:"txComplete,omitempty"`
// TxAppendLog contains the append log tx.
// TxType_APPEND_LOG
TxAppendLog *TxAppendLog `protobuf:"bytes,5,opt,name=tx_append_log,json=txAppendLog,proto3" json:"txAppendLog,omitempty"`
// contains filtered or unexported fields
}
Tx is the on-the-wire representation of a transaction.
func ByteSliceToTx ¶
ByteSliceToTx converts a byte slice block a Tx. If blk is nil, returns nil, nil If the blk is already parsed to a MockWorldOp, returns the MockWorldOp.
func NewTxAppendLog ¶
func NewTxAppendLog(entries []*forge_execution.LogEntry) (*Tx, error)
NewTxAppendLog constructs an APPEND_LOG transaction. Clones the entries when building the Tx object.
func NewTxComplete ¶
func NewTxComplete(result *forge_value.Result) *Tx
NewTxComplete constructs the COMPLETE transaction.
func NewTxSetOutputs ¶
func NewTxSetOutputs(outputs forge_value.ValueSlice, clearOld bool) (*Tx, error)
NewTxSetOutputs constructs a new SET_OUTPUTS transaction. clones the ValueSet when building the Tx object.
func NewTxStart ¶
NewTxStart constructs a new START transaction.
func (*Tx) ApplyWorldObjectOp ¶
func (t *Tx) ApplyWorldObjectOp( ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, sender peer.ID, ) (sysErr bool, err error)
ApplyWorldObjectOp applies the operation to a world object handle.
func (*Tx) ApplyWorldOp ¶
func (t *Tx) ApplyWorldOp( ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, sender peer.ID, ) (sysErr bool, err error)
ApplyWorldOp applies the operation as a world operation. returns false, ErrUnhandledOp if the operation cannot handle a world op
func (*Tx) CloneMessageVT ¶
func (m *Tx) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Tx) EqualMessageVT ¶
func (*Tx) GetOperationTypeId ¶
GetOperationTypeId returns the operation type identifier.
func (*Tx) GetTxAppendLog ¶
func (x *Tx) GetTxAppendLog() *TxAppendLog
func (*Tx) GetTxComplete ¶
func (x *Tx) GetTxComplete() *TxComplete
func (*Tx) GetTxSetOutputs ¶
func (x *Tx) GetTxSetOutputs() *TxSetOutputs
func (*Tx) GetTxStart ¶
func (*Tx) LocateTx ¶
func (t *Tx) LocateTx() (Transaction, error)
LocateTx returns the sub-block for the transaction.
func (*Tx) MarshalBlock ¶
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*Tx) MarshalJSON ¶
MarshalJSON marshals the Tx to JSON.
func (*Tx) MarshalProtoJSON ¶
func (x *Tx) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Tx message to JSON.
func (*Tx) MarshalProtoText ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) UnmarshalBlock ¶
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*Tx) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Tx from JSON.
func (*Tx) UnmarshalProtoJSON ¶
func (x *Tx) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Tx message from JSON.
func (*Tx) UnmarshalVT ¶
type TxAppendLog ¶
type TxAppendLog struct {
// Entries is the set of log entries to append.
Entries []*execution.LogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
// contains filtered or unexported fields
}
TxAppendLog appends log entries to the execution. Execution must be in the RUNNING state. Sender must be the peer_id specified on the Execution. TxType: TxType_APPEND_LOG
func (*TxAppendLog) CloneMessageVT ¶
func (m *TxAppendLog) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxAppendLog) CloneVT ¶
func (m *TxAppendLog) CloneVT() *TxAppendLog
func (*TxAppendLog) EqualMessageVT ¶
func (this *TxAppendLog) EqualMessageVT(thatMsg any) bool
func (*TxAppendLog) EqualVT ¶
func (this *TxAppendLog) EqualVT(that *TxAppendLog) bool
func (*TxAppendLog) ExecuteTx ¶
func (t *TxAppendLog) ExecuteTx( ctx context.Context, sender peer.ID, exCursor *block.Cursor, root *forge_execution.Execution, ) error
ExecuteTx executes the transaction against the execution instance.
func (*TxAppendLog) GetEntries ¶
func (x *TxAppendLog) GetEntries() []*execution.LogEntry
func (*TxAppendLog) GetTxType ¶
func (t *TxAppendLog) GetTxType() TxType
GetTxType returns the type of transaction this is.
func (*TxAppendLog) MarshalJSON ¶
func (x *TxAppendLog) MarshalJSON() ([]byte, error)
MarshalJSON marshals the TxAppendLog to JSON.
func (*TxAppendLog) MarshalProtoJSON ¶
func (x *TxAppendLog) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxAppendLog message to JSON.
func (*TxAppendLog) MarshalProtoText ¶
func (x *TxAppendLog) MarshalProtoText() string
func (*TxAppendLog) MarshalToSizedBufferVT ¶
func (m *TxAppendLog) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TxAppendLog) MarshalToVT ¶
func (m *TxAppendLog) MarshalToVT(dAtA []byte) (int, error)
func (*TxAppendLog) MarshalVT ¶
func (m *TxAppendLog) MarshalVT() (dAtA []byte, err error)
func (*TxAppendLog) ProtoMessage ¶
func (*TxAppendLog) ProtoMessage()
func (*TxAppendLog) Reset ¶
func (x *TxAppendLog) Reset()
func (*TxAppendLog) SizeVT ¶
func (m *TxAppendLog) SizeVT() (n int)
func (*TxAppendLog) String ¶
func (x *TxAppendLog) String() string
func (*TxAppendLog) UnmarshalJSON ¶
func (x *TxAppendLog) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the TxAppendLog from JSON.
func (*TxAppendLog) UnmarshalProtoJSON ¶
func (x *TxAppendLog) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxAppendLog message from JSON.
func (*TxAppendLog) UnmarshalVT ¶
func (m *TxAppendLog) UnmarshalVT(dAtA []byte) error
func (*TxAppendLog) Validate ¶
func (t *TxAppendLog) Validate() error
Validate performs a cursory check of the transaction.
type TxComplete ¶
type TxComplete struct {
// Result is information about the outcome of a completed execution.
Result *value.Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
TxComplete completes the execution by setting the result. Execution must be in the RUNNING state. Sender must be the peer_id specified on the Execution. TxType: TxType_COMPLETE
func (*TxComplete) CloneMessageVT ¶
func (m *TxComplete) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxComplete) CloneVT ¶
func (m *TxComplete) CloneVT() *TxComplete
func (*TxComplete) EqualMessageVT ¶
func (this *TxComplete) EqualMessageVT(thatMsg any) bool
func (*TxComplete) EqualVT ¶
func (this *TxComplete) EqualVT(that *TxComplete) bool
func (*TxComplete) ExecuteTx ¶
func (t *TxComplete) ExecuteTx( ctx context.Context, sender peer.ID, exCursor *block.Cursor, root *forge_execution.Execution, ) error
ExecuteTx executes the transaction against the execution instance.
func (*TxComplete) GetResult ¶
func (x *TxComplete) GetResult() *value.Result
func (*TxComplete) GetTxType ¶
func (t *TxComplete) GetTxType() TxType
GetTxType returns the type of transaction this is.
func (*TxComplete) MarshalJSON ¶
func (x *TxComplete) MarshalJSON() ([]byte, error)
MarshalJSON marshals the TxComplete to JSON.
func (*TxComplete) MarshalProtoJSON ¶
func (x *TxComplete) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxComplete message to JSON.
func (*TxComplete) MarshalProtoText ¶
func (x *TxComplete) MarshalProtoText() string
func (*TxComplete) MarshalToSizedBufferVT ¶
func (m *TxComplete) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TxComplete) MarshalToVT ¶
func (m *TxComplete) MarshalToVT(dAtA []byte) (int, error)
func (*TxComplete) MarshalVT ¶
func (m *TxComplete) MarshalVT() (dAtA []byte, err error)
func (*TxComplete) ProtoMessage ¶
func (*TxComplete) ProtoMessage()
func (*TxComplete) Reset ¶
func (x *TxComplete) Reset()
func (*TxComplete) SizeVT ¶
func (m *TxComplete) SizeVT() (n int)
func (*TxComplete) String ¶
func (x *TxComplete) String() string
func (*TxComplete) UnmarshalJSON ¶
func (x *TxComplete) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the TxComplete from JSON.
func (*TxComplete) UnmarshalProtoJSON ¶
func (x *TxComplete) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxComplete message from JSON.
func (*TxComplete) UnmarshalVT ¶
func (m *TxComplete) UnmarshalVT(dAtA []byte) error
func (*TxComplete) Validate ¶
func (t *TxComplete) Validate() error
Validate performs a cursory check of the transaction. Note: this should not fetch network data.
type TxSetOutputs ¶
type TxSetOutputs struct {
// Outputs is the set of values to set.
Outputs []*value.Value `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"`
// ClearOld indicates to clear all old output values before setting.
ClearOld bool `protobuf:"varint,2,opt,name=clear_old,json=clearOld,proto3" json:"clearOld,omitempty"`
// contains filtered or unexported fields
}
TxSetOutputs updates the value of one or more execution outputs. Execution must be in the RUNNING state. Sender must be the peer_id specified on the Execution. TxType: TxType_SET_OUTPUTS
func (*TxSetOutputs) CloneMessageVT ¶
func (m *TxSetOutputs) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxSetOutputs) CloneVT ¶
func (m *TxSetOutputs) CloneVT() *TxSetOutputs
func (*TxSetOutputs) EqualMessageVT ¶
func (this *TxSetOutputs) EqualMessageVT(thatMsg any) bool
func (*TxSetOutputs) EqualVT ¶
func (this *TxSetOutputs) EqualVT(that *TxSetOutputs) bool
func (*TxSetOutputs) ExecuteTx ¶
func (t *TxSetOutputs) ExecuteTx( ctx context.Context, sender peer.ID, exCursor *block.Cursor, root *forge_execution.Execution, ) error
ExecuteTx executes the transaction against the execution instance.
func (*TxSetOutputs) GetClearOld ¶
func (x *TxSetOutputs) GetClearOld() bool
func (*TxSetOutputs) GetOutputs ¶
func (x *TxSetOutputs) GetOutputs() []*value.Value
func (*TxSetOutputs) GetTxType ¶
func (t *TxSetOutputs) GetTxType() TxType
GetTxType returns the type of transaction this is.
func (*TxSetOutputs) MarshalJSON ¶
func (x *TxSetOutputs) MarshalJSON() ([]byte, error)
MarshalJSON marshals the TxSetOutputs to JSON.
func (*TxSetOutputs) MarshalProtoJSON ¶
func (x *TxSetOutputs) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxSetOutputs message to JSON.
func (*TxSetOutputs) MarshalProtoText ¶
func (x *TxSetOutputs) MarshalProtoText() string
func (*TxSetOutputs) MarshalToSizedBufferVT ¶
func (m *TxSetOutputs) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TxSetOutputs) MarshalToVT ¶
func (m *TxSetOutputs) MarshalToVT(dAtA []byte) (int, error)
func (*TxSetOutputs) MarshalVT ¶
func (m *TxSetOutputs) MarshalVT() (dAtA []byte, err error)
func (*TxSetOutputs) ProtoMessage ¶
func (*TxSetOutputs) ProtoMessage()
func (*TxSetOutputs) Reset ¶
func (x *TxSetOutputs) Reset()
func (*TxSetOutputs) SizeVT ¶
func (m *TxSetOutputs) SizeVT() (n int)
func (*TxSetOutputs) String ¶
func (x *TxSetOutputs) String() string
func (*TxSetOutputs) UnmarshalJSON ¶
func (x *TxSetOutputs) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the TxSetOutputs from JSON.
func (*TxSetOutputs) UnmarshalProtoJSON ¶
func (x *TxSetOutputs) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxSetOutputs message from JSON.
func (*TxSetOutputs) UnmarshalVT ¶
func (m *TxSetOutputs) UnmarshalVT(dAtA []byte) error
func (*TxSetOutputs) Validate ¶
func (t *TxSetOutputs) Validate() error
Validate performs a cursory check of the transaction. Note: this should not fetch network data.
type TxStart ¶
type TxStart struct {
// PeerId is the peer identifier to set as the executor.
// Must be the same as the sender of the transaction.
// Must match peer_id on the Execution if it's not empty.
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// contains filtered or unexported fields
}
TxStart starts the execution with a peer id. Execution must be in the PENDING state. TxType: TxType_START
func (*TxStart) CloneMessageVT ¶
func (m *TxStart) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxStart) EqualMessageVT ¶
func (*TxStart) ExecuteTx ¶
func (t *TxStart) ExecuteTx( ctx context.Context, sender peer.ID, exCursor *block.Cursor, root *forge_execution.Execution, ) error
ExecuteTx executes the transaction against the execution instance.
func (*TxStart) MarshalJSON ¶
MarshalJSON marshals the TxStart to JSON.
func (*TxStart) MarshalProtoJSON ¶
func (x *TxStart) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxStart message to JSON.
func (*TxStart) MarshalProtoText ¶
func (*TxStart) MarshalToSizedBufferVT ¶
func (*TxStart) ParsePeerID ¶
ParsePeerID parses the peer ID field.
func (*TxStart) ProtoMessage ¶
func (*TxStart) ProtoMessage()
func (*TxStart) UnmarshalJSON ¶
UnmarshalJSON unmarshals the TxStart from JSON.
func (*TxStart) UnmarshalProtoJSON ¶
func (x *TxStart) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxStart message from JSON.
func (*TxStart) UnmarshalVT ¶
type TxType ¶
type TxType int32
TxType indicates the kind of transaction.
const ( TxType_TxType_INVALID TxType = 0 // TxType_START starts execution of the transaction. TxType_TxType_START TxType = 1 // TxType_SET_OUTPUTS changes the value of an output. TxType_TxType_SET_OUTPUTS TxType = 2 // TxType_COMPLETE sets the result of the execution. TxType_TxType_COMPLETE TxType = 3 // TxType_APPEND_LOG appends log entries to the execution. TxType_TxType_APPEND_LOG TxType = 4 )
func (TxType) MarshalJSON ¶
MarshalJSON marshals the TxType to JSON.
func (TxType) MarshalProtoJSON ¶
func (x TxType) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxType to JSON.
func (TxType) MarshalProtoText ¶
func (TxType) MarshalText ¶
MarshalText marshals the TxType to text.
func (*TxType) UnmarshalJSON ¶
UnmarshalJSON unmarshals the TxType from JSON.
func (*TxType) UnmarshalProtoJSON ¶
func (x *TxType) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxType from JSON.
func (*TxType) UnmarshalText ¶
UnmarshalText unmarshals the TxType from text.