Documentation
¶
Index ¶
- Variables
- func LookupWorldOp(ctx context.Context, opTypeID string) (world.Operation, error)
- type ClaimHeldError
- type StaleClaimEpochError
- type Transaction
- type Tx
- func ByteSliceToTx(blk block.Block) (*Tx, error)
- func NewTxAppendLog(entries []*forge_execution.LogEntry, claims ...*forge_execution.Claim) (*Tx, error)
- func NewTxCancel() *Tx
- func NewTxComplete(result *forge_value.Result, claims ...*forge_execution.Claim) *Tx
- func NewTxReclaim(peerID peer.ID, claimID string, expectedClaimEpoch uint64) *Tx
- func NewTxSetOutputs(outputs forge_value.ValueSlice, clearOld bool, ...) (*Tx, error)
- func NewTxStart(peerID peer.ID, claimIDs ...string) *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) GetTxCancel() *TxCancel
- func (x *Tx) GetTxComplete() *TxComplete
- func (x *Tx) GetTxReclaim() *TxReclaim
- 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) GetClaimEpoch() uint64
- func (x *TxAppendLog) GetClaimId() string
- 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 TxCancel
- func (m *TxCancel) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxCancel) CloneVT() *TxCancel
- func (this *TxCancel) EqualMessageVT(thatMsg any) bool
- func (this *TxCancel) EqualVT(that *TxCancel) bool
- func (t *TxCancel) ExecuteTx(ctx context.Context, sender peer.ID, exCursor *block.Cursor, ...) error
- func (t *TxCancel) GetTxType() TxType
- func (x *TxCancel) MarshalJSON() ([]byte, error)
- func (x *TxCancel) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxCancel) MarshalProtoText() string
- func (m *TxCancel) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxCancel) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxCancel) MarshalVT() (dAtA []byte, err error)
- func (*TxCancel) ProtoMessage()
- func (x *TxCancel) Reset()
- func (m *TxCancel) SizeVT() (n int)
- func (x *TxCancel) String() string
- func (x *TxCancel) UnmarshalJSON(b []byte) error
- func (x *TxCancel) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxCancel) UnmarshalVT(dAtA []byte) error
- func (t *TxCancel) 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) GetClaimEpoch() uint64
- func (x *TxComplete) GetClaimId() string
- 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 TxReclaim
- func (m *TxReclaim) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxReclaim) CloneVT() *TxReclaim
- func (this *TxReclaim) EqualMessageVT(thatMsg any) bool
- func (this *TxReclaim) EqualVT(that *TxReclaim) bool
- func (t *TxReclaim) ExecuteTx(ctx context.Context, sender peer.ID, exCursor *block.Cursor, ...) error
- func (x *TxReclaim) GetClaimId() string
- func (x *TxReclaim) GetExpectedClaimEpoch() uint64
- func (x *TxReclaim) GetPeerId() string
- func (t *TxReclaim) GetTxType() TxType
- func (x *TxReclaim) MarshalJSON() ([]byte, error)
- func (x *TxReclaim) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxReclaim) MarshalProtoText() string
- func (m *TxReclaim) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxReclaim) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxReclaim) MarshalVT() (dAtA []byte, err error)
- func (t *TxReclaim) ParsePeerID() (peer.ID, error)
- func (*TxReclaim) ProtoMessage()
- func (x *TxReclaim) Reset()
- func (m *TxReclaim) SizeVT() (n int)
- func (x *TxReclaim) String() string
- func (x *TxReclaim) UnmarshalJSON(b []byte) error
- func (x *TxReclaim) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxReclaim) UnmarshalVT(dAtA []byte) error
- func (t *TxReclaim) 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) GetClaimEpoch() uint64
- func (x *TxSetOutputs) GetClaimId() string
- 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) GetClaimId() string
- 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", 5: "TxType_CANCEL", 6: "TxType_RECLAIM", } TxType_value = map[string]int32{ "TxType_INVALID": 0, "TxType_START": 1, "TxType_SET_OUTPUTS": 2, "TxType_COMPLETE": 3, "TxType_APPEND_LOG": 4, "TxType_CANCEL": 5, "TxType_RECLAIM": 6, } )
Enum value maps for TxType.
var ObjectOperationTypeID = "forge/execution/tx"
ObjectOperationTypeID is the transaction object operation type id.
Functions ¶
Types ¶
type ClaimHeldError ¶ added in v0.57.0
ClaimHeldError reports that another controller owns the live execution claim.
func (*ClaimHeldError) Error ¶ added in v0.57.0
func (e *ClaimHeldError) Error() string
Error returns the claim ownership conflict.
type StaleClaimEpochError ¶ added in v0.57.0
StaleClaimEpochError reports a write carrying a non-authoritative claim epoch.
func (*StaleClaimEpochError) Error ¶ added in v0.57.0
func (e *StaleClaimEpochError) Error() string
Error returns the stale claim epoch conflict.
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 NewTxCancelTxn ¶ added in v0.57.0
func NewTxCancelTxn() Transaction
NewTxCancelTxn constructs a cancellation transaction payload.
func NewTxCompleteTxn ¶
func NewTxCompleteTxn() Transaction
NewTxCompleteTxn constructs the COMPLETE transaction.
func NewTxReclaimTxn ¶ added in v0.57.0
func NewTxReclaimTxn() Transaction
NewTxReclaimTxn constructs a new RECLAIM 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_START
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"`
// TxCancel contains the cancel tx.
// TxType_CANCEL
TxCancel *TxCancel `protobuf:"bytes,6,opt,name=tx_cancel,json=txCancel,proto3" json:"txCancel,omitempty"`
// TxReclaim transfers a running execution after owner liveness is resolved.
// TxType_RECLAIM
TxReclaim *TxReclaim `protobuf:"bytes,7,opt,name=tx_reclaim,json=txReclaim,proto3" json:"txReclaim,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, claims ...*forge_execution.Claim, ) (*Tx, error)
NewTxAppendLog constructs an APPEND_LOG transaction. Clones the entries when building the Tx object.
func NewTxCancel ¶ added in v0.57.0
func NewTxCancel() *Tx
NewTxCancel constructs a cancellation transaction.
func NewTxComplete ¶
func NewTxComplete(result *forge_value.Result, claims ...*forge_execution.Claim) *Tx
NewTxComplete constructs the COMPLETE transaction.
func NewTxReclaim ¶ added in v0.57.0
NewTxReclaim constructs a RECLAIM transaction.
func NewTxSetOutputs ¶
func NewTxSetOutputs( outputs forge_value.ValueSlice, clearOld bool, claims ...*forge_execution.Claim, ) (*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) GetTxCancel ¶ added in v0.57.0
func (*Tx) GetTxComplete ¶
func (x *Tx) GetTxComplete() *TxComplete
func (*Tx) GetTxReclaim ¶ added in v0.57.0
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"`
// ClaimEpoch is the fencing token authorizing this write.
ClaimEpoch uint64 `protobuf:"varint,2,opt,name=claim_epoch,json=claimEpoch,proto3" json:"claimEpoch,omitempty"`
// ClaimId identifies the controller instance carrying the epoch.
ClaimId string `protobuf:"bytes,3,opt,name=claim_id,json=claimId,proto3" json:"claimId,omitempty"`
// contains filtered or unexported fields
}
TxAppendLog appends log entries to the execution. Execution must be RUNNING or CANCELING. 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) GetClaimEpoch ¶ added in v0.57.0
func (x *TxAppendLog) GetClaimEpoch() uint64
func (*TxAppendLog) GetClaimId ¶ added in v0.57.0
func (x *TxAppendLog) GetClaimId() string
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 TxCancel ¶ added in v0.57.0
type TxCancel struct {
// contains filtered or unexported fields
}
TxCancel requests cancellation of a running execution. TxType: TxType_CANCEL
func (*TxCancel) CloneMessageVT ¶ added in v0.57.0
func (m *TxCancel) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxCancel) EqualMessageVT ¶ added in v0.57.0
func (*TxCancel) ExecuteTx ¶ added in v0.57.0
func (t *TxCancel) ExecuteTx( ctx context.Context, sender peer.ID, exCursor *block.Cursor, root *forge_execution.Execution, ) error
ExecuteTx records a durable cancellation request.
func (*TxCancel) MarshalJSON ¶ added in v0.57.0
MarshalJSON marshals the TxCancel to JSON.
func (*TxCancel) MarshalProtoJSON ¶ added in v0.57.0
func (x *TxCancel) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxCancel message to JSON.
func (*TxCancel) MarshalProtoText ¶ added in v0.57.0
func (*TxCancel) MarshalToSizedBufferVT ¶ added in v0.57.0
func (*TxCancel) MarshalToVT ¶ added in v0.57.0
func (*TxCancel) ProtoMessage ¶ added in v0.57.0
func (*TxCancel) ProtoMessage()
func (*TxCancel) UnmarshalJSON ¶ added in v0.57.0
UnmarshalJSON unmarshals the TxCancel from JSON.
func (*TxCancel) UnmarshalProtoJSON ¶ added in v0.57.0
func (x *TxCancel) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxCancel message from JSON.
func (*TxCancel) UnmarshalVT ¶ added in v0.57.0
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"`
// ClaimEpoch is the fencing token authorizing this completion.
ClaimEpoch uint64 `protobuf:"varint,2,opt,name=claim_epoch,json=claimEpoch,proto3" json:"claimEpoch,omitempty"`
// ClaimId identifies the controller instance carrying the epoch.
ClaimId string `protobuf:"bytes,3,opt,name=claim_id,json=claimId,proto3" json:"claimId,omitempty"`
// contains filtered or unexported fields
}
TxComplete completes the execution by setting the result. Execution must be RUNNING, CANCELING with a canceled result, or COMPLETE with the same claim. 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) GetClaimEpoch ¶ added in v0.57.0
func (x *TxComplete) GetClaimEpoch() uint64
func (*TxComplete) GetClaimId ¶ added in v0.57.0
func (x *TxComplete) GetClaimId() string
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 TxReclaim ¶ added in v0.57.0
type TxReclaim struct {
// PeerId is the peer identifier to set as the executor.
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// ClaimId is the opaque identifier of the new controller instance.
ClaimId string `protobuf:"bytes,2,opt,name=claim_id,json=claimId,proto3" json:"claimId,omitempty"`
// ExpectedClaimEpoch prevents racing transfers from both succeeding.
ExpectedClaimEpoch uint64 `protobuf:"varint,3,opt,name=expected_claim_epoch,json=expectedClaimEpoch,proto3" json:"expectedClaimEpoch,omitempty"`
// contains filtered or unexported fields
}
TxReclaim transfers a RUNNING execution to a new controller instance. The current owner must already be known unavailable by the caller. TxType: TxType_RECLAIM
func (*TxReclaim) CloneMessageVT ¶ added in v0.57.0
func (m *TxReclaim) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxReclaim) EqualMessageVT ¶ added in v0.57.0
func (*TxReclaim) ExecuteTx ¶ added in v0.57.0
func (t *TxReclaim) ExecuteTx( ctx context.Context, sender peer.ID, exCursor *block.Cursor, root *forge_execution.Execution, ) error
ExecuteTx executes the transaction against the execution instance.
func (*TxReclaim) GetClaimId ¶ added in v0.57.0
func (*TxReclaim) GetExpectedClaimEpoch ¶ added in v0.57.0
func (*TxReclaim) MarshalJSON ¶ added in v0.57.0
MarshalJSON marshals the TxReclaim to JSON.
func (*TxReclaim) MarshalProtoJSON ¶ added in v0.57.0
func (x *TxReclaim) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxReclaim message to JSON.
func (*TxReclaim) MarshalProtoText ¶ added in v0.57.0
func (*TxReclaim) MarshalToSizedBufferVT ¶ added in v0.57.0
func (*TxReclaim) MarshalToVT ¶ added in v0.57.0
func (*TxReclaim) ParsePeerID ¶ added in v0.57.0
ParsePeerID parses the peer ID field.
func (*TxReclaim) ProtoMessage ¶ added in v0.57.0
func (*TxReclaim) ProtoMessage()
func (*TxReclaim) UnmarshalJSON ¶ added in v0.57.0
UnmarshalJSON unmarshals the TxReclaim from JSON.
func (*TxReclaim) UnmarshalProtoJSON ¶ added in v0.57.0
func (x *TxReclaim) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxReclaim message from JSON.
func (*TxReclaim) UnmarshalVT ¶ added in v0.57.0
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"`
// ClaimEpoch is the fencing token authorizing this write.
ClaimEpoch uint64 `protobuf:"varint,3,opt,name=claim_epoch,json=claimEpoch,proto3" json:"claimEpoch,omitempty"`
// ClaimId identifies the controller instance carrying the epoch.
ClaimId string `protobuf:"bytes,4,opt,name=claim_id,json=claimId,proto3" json:"claimId,omitempty"`
// contains filtered or unexported fields
}
TxSetOutputs updates the value of one or more execution outputs. Execution must be RUNNING or CANCELING. 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) GetClaimEpoch ¶ added in v0.57.0
func (x *TxSetOutputs) GetClaimEpoch() uint64
func (*TxSetOutputs) GetClaimId ¶ added in v0.57.0
func (x *TxSetOutputs) GetClaimId() string
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"`
// ClaimId is the opaque identifier of the claiming controller instance.
ClaimId string `protobuf:"bytes,2,opt,name=claim_id,json=claimId,proto3" json:"claimId,omitempty"`
// contains filtered or unexported fields
}
TxStart starts the execution with a peer id. Execution must be PENDING, or active with the same claim. 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) GetClaimId ¶ added in v0.57.0
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 // TxType_CANCEL requests cancellation and custody drain. TxType_TxType_CANCEL TxType = 5 // TxType_RECLAIM transfers a running execution to a new claim owner. TxType_TxType_RECLAIM TxType = 6 )
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.