pass_tx

package
v0.51.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TxType_name = map[int32]string{
		0: "TxType_INVALID",
		1: "TxType_START",
		2: "TxType_CREATE_EXEC_SPECS",
		3: "TxType_UPDATE_EXEC_STATES",
		4: "TxType_COMPLETE",
	}
	TxType_value = map[string]int32{
		"TxType_INVALID":            0,
		"TxType_START":              1,
		"TxType_CREATE_EXEC_SPECS":  2,
		"TxType_UPDATE_EXEC_STATES": 3,
		"TxType_COMPLETE":           4,
	}
)

Enum value maps for TxType.

View Source
var WorldOperationTypeID = "forge/pass/tx"

WorldOperationTypeID is the transaction object operation type id. Corresponds to a single *TransactionData object.

Functions

func LookupWorldOp

func LookupWorldOp(ctx context.Context, opTypeID string) (world.Operation, error)

LookupWorldOp performs the lookup operation for the pass op types.

func ValidateExecSpecs

func ValidateExecSpecs(execSpecs []*ExecSpec) error

ValidateExecSpecs validates an exec spec set.

Types

type ExecSpec

type ExecSpec struct {

	// PeerId is the identifier of the peer assigned to the execution.
	// Cannot be empty.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// contains filtered or unexported fields
}

ExecSpec contains a specification for creating an Execution.

func (*ExecSpec) CloneMessageVT

func (m *ExecSpec) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ExecSpec) CloneVT

func (m *ExecSpec) CloneVT() *ExecSpec

func (*ExecSpec) EqualMessageVT

func (this *ExecSpec) EqualMessageVT(thatMsg any) bool

func (*ExecSpec) EqualVT

func (this *ExecSpec) EqualVT(that *ExecSpec) bool

func (*ExecSpec) GetPeerId

func (x *ExecSpec) GetPeerId() string

func (*ExecSpec) MarshalJSON

func (x *ExecSpec) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ExecSpec to JSON.

func (*ExecSpec) MarshalProtoJSON

func (x *ExecSpec) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ExecSpec message to JSON.

func (*ExecSpec) MarshalProtoText

func (x *ExecSpec) MarshalProtoText() string

func (*ExecSpec) MarshalToSizedBufferVT

func (m *ExecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ExecSpec) MarshalToVT

func (m *ExecSpec) MarshalToVT(dAtA []byte) (int, error)

func (*ExecSpec) MarshalVT

func (m *ExecSpec) MarshalVT() (dAtA []byte, err error)

func (*ExecSpec) ParsePeerID

func (s *ExecSpec) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID field.

func (*ExecSpec) ProtoMessage

func (*ExecSpec) ProtoMessage()

func (*ExecSpec) Reset

func (x *ExecSpec) Reset()

func (*ExecSpec) SizeVT

func (m *ExecSpec) SizeVT() (n int)

func (*ExecSpec) String

func (x *ExecSpec) String() string

func (*ExecSpec) UnmarshalJSON

func (x *ExecSpec) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ExecSpec from JSON.

func (*ExecSpec) UnmarshalProtoJSON

func (x *ExecSpec) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ExecSpec message from JSON.

func (*ExecSpec) UnmarshalVT

func (m *ExecSpec) UnmarshalVT(dAtA []byte) error

func (*ExecSpec) Validate

func (s *ExecSpec) Validate() error

Validate validates the execution specification.

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 pass instance.
	// bcs is located at the pass state root.
	// note: bcs is sometimes not set, check to be sure.
	// The result is written into bcs.
	ExecuteTx(
		ctx context.Context,
		worldState world.WorldState,
		sender peer.ID,
		objKey string,
		bcs *block.Cursor,
		root *forge_pass.Pass,
	) error
}

Transaction is an instance of a transaction object.

func NewTxCompleteTxn

func NewTxCompleteTxn() Transaction

NewTxCompleteTxn constructs the COMPLETE transaction.

func NewTxCreateExecSpecsTxn

func NewTxCreateExecSpecsTxn() Transaction

NewTxCreateExecSpecsTxn constructs a new CREATE_EXEC_SPECS transaction.

func NewTxStartTxn

func NewTxStartTxn() Transaction

NewTxStartTxn constructs a new START transaction.

func NewTxUpdateExecStatesTxn

func NewTxUpdateExecStatesTxn() Transaction

NewTxUpdateExecStatesTxn constructs a new UPDATE_EXEC_STATES 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"`
	// PassObjectKey is the Pass object ID this is associated with.
	// The Pass object must already exist.
	PassObjectKey string `protobuf:"bytes,2,opt,name=pass_object_key,json=passObjectKey,proto3" json:"passObjectKey,omitempty"`
	// TxStart contains the start transaction tx.
	// TxType_START
	TxStart *TxStart `protobuf:"bytes,3,opt,name=tx_start,json=txStart,proto3" json:"txStart,omitempty"`
	// TxCreateExecSpecs contains the create exec specs tx.
	// TxType_CREATE_EXEC_SPECS
	TxCreateExecSpecs *TxCreateExecSpecs `protobuf:"bytes,4,opt,name=tx_create_exec_specs,json=txCreateExecSpecs,proto3" json:"txCreateExecSpecs,omitempty"`
	// TxUpdateExecStates contains the update exec states tx.
	// TxType_EXEC_COMPLETE
	TxUpdateExecStates *TxUpdateExecStates `protobuf:"bytes,5,opt,name=tx_update_exec_states,json=txUpdateExecStates,proto3" json:"txUpdateExecStates,omitempty"`
	// TxComplete contains the complete tx.
	// TxType_COMPLETE
	TxComplete *TxComplete `protobuf:"bytes,6,opt,name=tx_complete,json=txComplete,proto3" json:"txComplete,omitempty"`
	// contains filtered or unexported fields
}

Tx is the on-the-wire representation of a transaction.

func ByteSliceToTx

func ByteSliceToTx(blk block.Block) (*Tx, error)

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 NewTxComplete

func NewTxComplete(objKey string, result *forge_value.Result) *Tx

NewTxComplete constructs the COMPLETE transaction.

func NewTxCreateExecSpecs

func NewTxCreateExecSpecs(objKey string) *Tx

NewTxCreateExecSpecs constructs a new CREATE_EXEC_SPECS transaction.

func NewTxStart

func NewTxStart(objKey string, execSpecs []*ExecSpec, clearExisting bool) *Tx

NewTxStart constructs a new START transaction.

func NewTxUpdateExecStates

func NewTxUpdateExecStates(objKey string) *Tx

NewTxUpdateExecStates constructs a new UPDATE_EXEC_STATES 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.

func (*Tx) CloneMessageVT

func (m *Tx) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Tx) CloneVT

func (m *Tx) CloneVT() *Tx

func (*Tx) EqualMessageVT

func (this *Tx) EqualMessageVT(thatMsg any) bool

func (*Tx) EqualVT

func (this *Tx) EqualVT(that *Tx) bool

func (*Tx) GetOperationTypeId

func (t *Tx) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*Tx) GetPassObjectKey

func (x *Tx) GetPassObjectKey() string

func (*Tx) GetTxComplete

func (x *Tx) GetTxComplete() *TxComplete

func (*Tx) GetTxCreateExecSpecs

func (x *Tx) GetTxCreateExecSpecs() *TxCreateExecSpecs

func (*Tx) GetTxStart

func (x *Tx) GetTxStart() *TxStart

func (*Tx) GetTxType

func (x *Tx) GetTxType() TxType

func (*Tx) GetTxUpdateExecStates

func (x *Tx) GetTxUpdateExecStates() *TxUpdateExecStates

func (*Tx) LocateTx

func (t *Tx) LocateTx() (Transaction, error)

LocateTx returns the sub-block for the transaction.

func (*Tx) MarshalBlock

func (t *Tx) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*Tx) MarshalJSON

func (x *Tx) MarshalJSON() ([]byte, error)

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 (x *Tx) MarshalProtoText() string

func (*Tx) MarshalToSizedBufferVT

func (m *Tx) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Tx) MarshalToVT

func (m *Tx) MarshalToVT(dAtA []byte) (int, error)

func (*Tx) MarshalVT

func (m *Tx) MarshalVT() (dAtA []byte, err error)

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) Reset

func (x *Tx) Reset()

func (*Tx) SizeVT

func (m *Tx) SizeVT() (n int)

func (*Tx) String

func (x *Tx) String() string

func (*Tx) UnmarshalBlock

func (t *Tx) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*Tx) UnmarshalJSON

func (x *Tx) UnmarshalJSON(b []byte) error

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

func (m *Tx) UnmarshalVT(dAtA []byte) error

func (*Tx) Validate

func (t *Tx) Validate() error

Validate checks the transaction (cursory checks only)

type TxComplete

type TxComplete struct {

	// Result is information about the outcome of a completed pass.
	Result *value.Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// ValueSet is the set of outputs from the Pass.
	// Inputs must be empty.
	// Must match the outputs calculated from the Execution objects.
	// Must be empty if the result is not success.
	ValueSet *target.ValueSet `protobuf:"bytes,2,opt,name=value_set,json=valueSet,proto3" json:"valueSet,omitempty"`
	// contains filtered or unexported fields
}

TxComplete completes the execution by setting the result. If failed, may transition from any state. If success, must be in the CHECKING state. If success, all Exections must be in COMPLETE state and not failed. 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,
	worldState world.WorldState,
	sender peer.ID,
	objKey string,
	bcs *block.Cursor,
	root *forge_pass.Pass,
) error

ExecuteTx executes the transaction against the pass 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) GetValueSet

func (x *TxComplete) GetValueSet() *target.ValueSet

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 TxCreateExecSpecs

type TxCreateExecSpecs struct {

	// ExecSpecs contains specifications for execution objects to create.
	ExecSpecs []*ExecSpec `protobuf:"bytes,1,rep,name=exec_specs,json=execSpecs,proto3" json:"execSpecs,omitempty"`
	// ClearExisting deletes all already-existing associated exec states.
	// If set and len(exec_specs) == 0, clears all execution instances.
	ClearExisting bool `protobuf:"varint,2,opt,name=clear_existing,json=clearExisting,proto3" json:"clearExisting,omitempty"`
	// contains filtered or unexported fields
}

TxCreateExecSpecs creates a set of Execution objects from the specs. Overwrites any already-existing executions with matching peer ids. TxType: TxType_CREATE_EXEC_SPECS

func (*TxCreateExecSpecs) CloneMessageVT

func (m *TxCreateExecSpecs) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*TxCreateExecSpecs) CloneVT

func (m *TxCreateExecSpecs) CloneVT() *TxCreateExecSpecs

func (*TxCreateExecSpecs) EqualMessageVT

func (this *TxCreateExecSpecs) EqualMessageVT(thatMsg any) bool

func (*TxCreateExecSpecs) EqualVT

func (this *TxCreateExecSpecs) EqualVT(that *TxCreateExecSpecs) bool

func (*TxCreateExecSpecs) ExecuteTx

func (t *TxCreateExecSpecs) ExecuteTx(
	ctx context.Context,
	worldState world.WorldState,
	sender peer.ID,
	objKey string,
	bcs *block.Cursor,
	root *forge_pass.Pass,
) error

ExecuteTx executes the transaction against the pass instance.

func (*TxCreateExecSpecs) GetClearExisting

func (x *TxCreateExecSpecs) GetClearExisting() bool

func (*TxCreateExecSpecs) GetExecSpecs

func (x *TxCreateExecSpecs) GetExecSpecs() []*ExecSpec

func (*TxCreateExecSpecs) GetTxType

func (t *TxCreateExecSpecs) GetTxType() TxType

GetTxType returns the type of transaction this is.

func (*TxCreateExecSpecs) IsEmpty

func (t *TxCreateExecSpecs) IsEmpty() bool

IsEmpty checks if the transaction is empty.

func (*TxCreateExecSpecs) MarshalJSON

func (x *TxCreateExecSpecs) MarshalJSON() ([]byte, error)

MarshalJSON marshals the TxCreateExecSpecs to JSON.

func (*TxCreateExecSpecs) MarshalProtoJSON

func (x *TxCreateExecSpecs) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the TxCreateExecSpecs message to JSON.

func (*TxCreateExecSpecs) MarshalProtoText

func (x *TxCreateExecSpecs) MarshalProtoText() string

func (*TxCreateExecSpecs) MarshalToSizedBufferVT

func (m *TxCreateExecSpecs) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TxCreateExecSpecs) MarshalToVT

func (m *TxCreateExecSpecs) MarshalToVT(dAtA []byte) (int, error)

func (*TxCreateExecSpecs) MarshalVT

func (m *TxCreateExecSpecs) MarshalVT() (dAtA []byte, err error)

func (*TxCreateExecSpecs) ProtoMessage

func (*TxCreateExecSpecs) ProtoMessage()

func (*TxCreateExecSpecs) Reset

func (x *TxCreateExecSpecs) Reset()

func (*TxCreateExecSpecs) SizeVT

func (m *TxCreateExecSpecs) SizeVT() (n int)

func (*TxCreateExecSpecs) String

func (x *TxCreateExecSpecs) String() string

func (*TxCreateExecSpecs) UnmarshalJSON

func (x *TxCreateExecSpecs) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the TxCreateExecSpecs from JSON.

func (*TxCreateExecSpecs) UnmarshalProtoJSON

func (x *TxCreateExecSpecs) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the TxCreateExecSpecs message from JSON.

func (*TxCreateExecSpecs) UnmarshalVT

func (m *TxCreateExecSpecs) UnmarshalVT(dAtA []byte) error

func (*TxCreateExecSpecs) Validate

func (t *TxCreateExecSpecs) Validate() error

Validate performs a cursory check of the transaction. Note: this should not fetch network data.

type TxStart

type TxStart struct {

	// CreateExecSpecs is the nested create exec specs transaction.
	CreateExecSpecs *TxCreateExecSpecs `protobuf:"bytes,1,opt,name=create_exec_specs,json=createExecSpecs,proto3" json:"createExecSpecs,omitempty"`
	// contains filtered or unexported fields
}

TxStart starts the execution of the pass, optionally creating Executions.

Executes UpdateExecStates as a sub-transaction to scan for Execution objects. Executes CreateExecSpecs as a nested transaction to create initial state. TxType: TxType_START

func (*TxStart) CloneMessageVT

func (m *TxStart) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*TxStart) CloneVT

func (m *TxStart) CloneVT() *TxStart

func (*TxStart) EqualMessageVT

func (this *TxStart) EqualMessageVT(thatMsg any) bool

func (*TxStart) EqualVT

func (this *TxStart) EqualVT(that *TxStart) bool

func (*TxStart) ExecuteTx

func (t *TxStart) ExecuteTx(
	ctx context.Context,
	worldState world.WorldState,
	sender peer.ID,
	objKey string,
	bcs *block.Cursor,
	root *forge_pass.Pass,
) error

ExecuteTx executes the transaction against the pass instance.

func (*TxStart) GetCreateExecSpecs

func (x *TxStart) GetCreateExecSpecs() *TxCreateExecSpecs

func (*TxStart) GetTxType

func (t *TxStart) GetTxType() TxType

GetTxType returns the type of transaction this is.

func (*TxStart) MarshalJSON

func (x *TxStart) MarshalJSON() ([]byte, error)

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 (x *TxStart) MarshalProtoText() string

func (*TxStart) MarshalToSizedBufferVT

func (m *TxStart) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TxStart) MarshalToVT

func (m *TxStart) MarshalToVT(dAtA []byte) (int, error)

func (*TxStart) MarshalVT

func (m *TxStart) MarshalVT() (dAtA []byte, err error)

func (*TxStart) ProtoMessage

func (*TxStart) ProtoMessage()

func (*TxStart) Reset

func (x *TxStart) Reset()

func (*TxStart) SizeVT

func (m *TxStart) SizeVT() (n int)

func (*TxStart) String

func (x *TxStart) String() string

func (*TxStart) UnmarshalJSON

func (x *TxStart) UnmarshalJSON(b []byte) error

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

func (m *TxStart) UnmarshalVT(dAtA []byte) error

func (*TxStart) Validate

func (t *TxStart) Validate() error

Validate performs a cursory check of the transaction. Note: this should not fetch network data.

type TxType

type TxType int32

TxType indicates the kind of transaction.

const (
	TxType_TxType_INVALID TxType = 0
	// TxType_START marks the pass as running.
	// Transitions to state RUNNING from PENDING.
	TxType_TxType_START TxType = 1
	// TxType_CREATE_EXEC_SPECS creates execution objects with specs.
	// Overwrites any already-existing executions with matching peer ids.
	// Can optionally clear the list of executions before creating.
	// Used to add / reset execution instances.
	TxType_TxType_CREATE_EXEC_SPECS TxType = 2
	// TxType_UPDATE_EXEC_STATES updates the execution states.
	// Searches for valid Execution objects linked to the Pass.
	// Updates the list with the found objects.
	// Transitions to CHECKING if terminal conditions are found.
	// If any assigned executions fail, the Pass will also fail.
	TxType_TxType_UPDATE_EXEC_STATES TxType = 3
	// TxType_COMPLETE sets the result of the execution.
	// If failed, can transition from any state.
	// If success, must transition from CHECKING state.
	// If success, all Execution states must be Successful.
	TxType_TxType_COMPLETE TxType = 4
)

func (TxType) Enum

func (x TxType) Enum() *TxType

func (TxType) MarshalJSON

func (x TxType) MarshalJSON() ([]byte, error)

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 (x TxType) MarshalProtoText() string

func (TxType) MarshalText

func (x TxType) MarshalText() ([]byte, error)

MarshalText marshals the TxType to text.

func (TxType) String

func (x TxType) String() string

func (*TxType) UnmarshalJSON

func (x *TxType) UnmarshalJSON(b []byte) error

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

func (x *TxType) UnmarshalText(b []byte) error

UnmarshalText unmarshals the TxType from text.

func (TxType) Validate

func (t TxType) Validate() error

Validate checks the execution tx type is in range.

type TxUpdateExecStates

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

TxUpdateExecStates updates the list of execution states for the Pass. Updates the list with objects found via graph quad lookup. Transitions to CHECKING if terminal conditions are found. If any assigned executions fail, the Pass will also fail. TxType: TxType_UPDATE_EXEC_STATES

func (*TxUpdateExecStates) CloneMessageVT

func (m *TxUpdateExecStates) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*TxUpdateExecStates) CloneVT

func (m *TxUpdateExecStates) CloneVT() *TxUpdateExecStates

func (*TxUpdateExecStates) EqualMessageVT

func (this *TxUpdateExecStates) EqualMessageVT(thatMsg any) bool

func (*TxUpdateExecStates) EqualVT

func (this *TxUpdateExecStates) EqualVT(that *TxUpdateExecStates) bool

func (*TxUpdateExecStates) ExecuteTx

func (t *TxUpdateExecStates) ExecuteTx(
	ctx context.Context,
	worldState world.WorldState,
	sender peer.ID,
	objKey string,
	bcs *block.Cursor,
	root *forge_pass.Pass,
) error

ExecuteTx executes the transaction against the pass instance.

func (*TxUpdateExecStates) GetTxType

func (t *TxUpdateExecStates) GetTxType() TxType

GetTxType returns the type of transaction this is.

func (*TxUpdateExecStates) MarshalJSON

func (x *TxUpdateExecStates) MarshalJSON() ([]byte, error)

MarshalJSON marshals the TxUpdateExecStates to JSON.

func (*TxUpdateExecStates) MarshalProtoJSON

func (x *TxUpdateExecStates) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the TxUpdateExecStates message to JSON.

func (*TxUpdateExecStates) MarshalProtoText

func (x *TxUpdateExecStates) MarshalProtoText() string

func (*TxUpdateExecStates) MarshalToSizedBufferVT

func (m *TxUpdateExecStates) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TxUpdateExecStates) MarshalToVT

func (m *TxUpdateExecStates) MarshalToVT(dAtA []byte) (int, error)

func (*TxUpdateExecStates) MarshalVT

func (m *TxUpdateExecStates) MarshalVT() (dAtA []byte, err error)

func (*TxUpdateExecStates) ProtoMessage

func (*TxUpdateExecStates) ProtoMessage()

func (*TxUpdateExecStates) Reset

func (x *TxUpdateExecStates) Reset()

func (*TxUpdateExecStates) SizeVT

func (m *TxUpdateExecStates) SizeVT() (n int)

func (*TxUpdateExecStates) String

func (x *TxUpdateExecStates) String() string

func (*TxUpdateExecStates) UnmarshalJSON

func (x *TxUpdateExecStates) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the TxUpdateExecStates from JSON.

func (*TxUpdateExecStates) UnmarshalProtoJSON

func (x *TxUpdateExecStates) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the TxUpdateExecStates message from JSON.

func (*TxUpdateExecStates) UnmarshalVT

func (m *TxUpdateExecStates) UnmarshalVT(dAtA []byte) error

func (*TxUpdateExecStates) Validate

func (t *TxUpdateExecStates) Validate() error

Validate performs a cursory check of the transaction. Note: this should not fetch network data.

Jump to

Keyboard shortcuts

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