Documentation
¶
Index ¶
- Variables
- type ENTransactionProvider
- func (e *ENTransactionProvider) SystemTransaction(ctx context.Context, block *flow.Block, txID flow.Identifier) (*flow.TransactionBody, error)
- func (e *ENTransactionProvider) SystemTransactionResult(ctx context.Context, block *flow.Block, txID flow.Identifier, ...) (*accessmodel.TransactionResult, error)
- func (e *ENTransactionProvider) TransactionResult(ctx context.Context, block *flow.Header, transactionID flow.Identifier, ...) (*accessmodel.TransactionResult, error)
- func (e *ENTransactionProvider) TransactionResultByIndex(ctx context.Context, block *flow.Block, index uint32, ...) (*accessmodel.TransactionResult, error)
- func (e *ENTransactionProvider) TransactionResultsByBlockID(ctx context.Context, block *flow.Block, ...) ([]*accessmodel.TransactionResult, error)
- func (e *ENTransactionProvider) TransactionsByBlockID(ctx context.Context, block *flow.Block) ([]*flow.TransactionBody, error)
- type FailoverTransactionProvider
- func (f *FailoverTransactionProvider) SystemTransaction(ctx context.Context, block *flow.Block, txID flow.Identifier) (*flow.TransactionBody, error)
- func (f *FailoverTransactionProvider) SystemTransactionResult(ctx context.Context, block *flow.Block, txID flow.Identifier, ...) (*accessmodel.TransactionResult, error)
- func (f *FailoverTransactionProvider) TransactionResult(ctx context.Context, header *flow.Header, txID flow.Identifier, ...) (*accessmodel.TransactionResult, error)
- func (f *FailoverTransactionProvider) TransactionResultByIndex(ctx context.Context, block *flow.Block, index uint32, ...) (*accessmodel.TransactionResult, error)
- func (f *FailoverTransactionProvider) TransactionResultsByBlockID(ctx context.Context, block *flow.Block, ...) ([]*accessmodel.TransactionResult, error)
- func (f *FailoverTransactionProvider) TransactionsByBlockID(ctx context.Context, block *flow.Block) ([]*flow.TransactionBody, error)
- type LocalTransactionProvider
- func (t *LocalTransactionProvider) SystemTransaction(ctx context.Context, block *flow.Block, txID flow.Identifier) (*flow.TransactionBody, error)
- func (t *LocalTransactionProvider) SystemTransactionResult(ctx context.Context, block *flow.Block, txID flow.Identifier, ...) (*accessmodel.TransactionResult, error)
- func (t *LocalTransactionProvider) TransactionResult(ctx context.Context, block *flow.Header, transactionID flow.Identifier, ...) (*accessmodel.TransactionResult, error)
- func (t *LocalTransactionProvider) TransactionResultByIndex(ctx context.Context, block *flow.Block, index uint32, ...) (*accessmodel.TransactionResult, error)
- func (t *LocalTransactionProvider) TransactionResultsByBlockID(ctx context.Context, block *flow.Block, ...) ([]*accessmodel.TransactionResult, error)
- func (t *LocalTransactionProvider) TransactionsByBlockID(ctx context.Context, block *flow.Block) ([]*flow.TransactionBody, error)
- type TransactionProvider
Constants ¶
This section is empty.
Variables ¶
var ErrTransactionNotInBlock = errors.New("transaction not in block")
ErrTransactionNotInBlock represents an error indicating that the transaction is not found in the block.
Functions ¶
This section is empty.
Types ¶
type ENTransactionProvider ¶
type ENTransactionProvider struct {
// contains filtered or unexported fields
}
func NewENTransactionProvider ¶
func NewENTransactionProvider( log zerolog.Logger, state protocol.State, collections storage.Collections, connFactory connection.ConnectionFactory, nodeCommunicator node_communicator.Communicator, execNodeIdentitiesProvider *rpc.ExecutionNodeIdentitiesProvider, txStatusDeriver *txstatus.TxStatusDeriver, systemTxID flow.Identifier, chainID flow.ChainID, scheduledCallbacksEnabled bool, ) *ENTransactionProvider
func (*ENTransactionProvider) SystemTransaction ¶
func (e *ENTransactionProvider) SystemTransaction( ctx context.Context, block *flow.Block, txID flow.Identifier, ) (*flow.TransactionBody, error)
func (*ENTransactionProvider) SystemTransactionResult ¶
func (e *ENTransactionProvider) SystemTransactionResult( ctx context.Context, block *flow.Block, txID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*ENTransactionProvider) TransactionResult ¶
func (e *ENTransactionProvider) TransactionResult( ctx context.Context, block *flow.Header, transactionID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*ENTransactionProvider) TransactionResultByIndex ¶
func (e *ENTransactionProvider) TransactionResultByIndex( ctx context.Context, block *flow.Block, index uint32, encodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*ENTransactionProvider) TransactionResultsByBlockID ¶
func (e *ENTransactionProvider) TransactionResultsByBlockID( ctx context.Context, block *flow.Block, requiredEventEncodingVersion entities.EventEncodingVersion, ) ([]*accessmodel.TransactionResult, error)
func (*ENTransactionProvider) TransactionsByBlockID ¶
func (e *ENTransactionProvider) TransactionsByBlockID( ctx context.Context, block *flow.Block, ) ([]*flow.TransactionBody, error)
type FailoverTransactionProvider ¶
type FailoverTransactionProvider struct {
// contains filtered or unexported fields
}
func NewFailoverTransactionProvider ¶
func NewFailoverTransactionProvider(local TransactionProvider, execNode TransactionProvider) *FailoverTransactionProvider
func (*FailoverTransactionProvider) SystemTransaction ¶
func (f *FailoverTransactionProvider) SystemTransaction( ctx context.Context, block *flow.Block, txID flow.Identifier, ) (*flow.TransactionBody, error)
func (*FailoverTransactionProvider) SystemTransactionResult ¶
func (f *FailoverTransactionProvider) SystemTransactionResult( ctx context.Context, block *flow.Block, txID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*FailoverTransactionProvider) TransactionResult ¶
func (f *FailoverTransactionProvider) TransactionResult( ctx context.Context, header *flow.Header, txID flow.Identifier, encodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*FailoverTransactionProvider) TransactionResultByIndex ¶
func (f *FailoverTransactionProvider) TransactionResultByIndex( ctx context.Context, block *flow.Block, index uint32, encodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*FailoverTransactionProvider) TransactionResultsByBlockID ¶
func (f *FailoverTransactionProvider) TransactionResultsByBlockID( ctx context.Context, block *flow.Block, encodingVersion entities.EventEncodingVersion, ) ([]*accessmodel.TransactionResult, error)
func (*FailoverTransactionProvider) TransactionsByBlockID ¶
func (f *FailoverTransactionProvider) TransactionsByBlockID( ctx context.Context, block *flow.Block, ) ([]*flow.TransactionBody, error)
type LocalTransactionProvider ¶
type LocalTransactionProvider struct {
// contains filtered or unexported fields
}
LocalTransactionProvider provides functionality for retrieving transaction results and error messages from local storages
func NewLocalTransactionProvider ¶
func NewLocalTransactionProvider( state protocol.State, collections storage.Collections, blocks storage.Blocks, eventsIndex *index.EventsIndex, txResultsIndex *index.TransactionResultsIndex, txErrorMessages error_messages.Provider, systemTxID flow.Identifier, txStatusDeriver *txstatus.TxStatusDeriver, chainID flow.ChainID, scheduledCallbacksEnabled bool, ) *LocalTransactionProvider
func (*LocalTransactionProvider) SystemTransaction ¶
func (t *LocalTransactionProvider) SystemTransaction( ctx context.Context, block *flow.Block, txID flow.Identifier, ) (*flow.TransactionBody, error)
SystemTransaction rebuilds the system transaction from storage
func (*LocalTransactionProvider) SystemTransactionResult ¶
func (t *LocalTransactionProvider) SystemTransactionResult( ctx context.Context, block *flow.Block, txID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
func (*LocalTransactionProvider) TransactionResult ¶
func (t *LocalTransactionProvider) TransactionResult( ctx context.Context, block *flow.Header, transactionID flow.Identifier, encodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
TransactionResult retrieves a transaction result from storage by block ID and transaction ID. Expected errors during normal operation:
- codes.NotFound when result cannot be provided by storage due to the absence of data.
- codes.Internal if event payload conversion failed.
- indexer.ErrIndexNotInitialized when txResultsIndex not initialized
- storage.ErrHeightNotIndexed when data is unavailable
All other errors are considered as state corruption (fatal) or internal errors in the transaction error message getter or when deriving transaction status.
func (*LocalTransactionProvider) TransactionResultByIndex ¶
func (t *LocalTransactionProvider) TransactionResultByIndex( ctx context.Context, block *flow.Block, index uint32, eventEncoding entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error)
TransactionResultByIndex retrieves a transaction result by index from storage. Expected errors during normal operation:
- codes.NotFound if result cannot be provided by storage due to the absence of data.
- codes.Internal when event payload conversion failed.
- indexer.ErrIndexNotInitialized when txResultsIndex not initialized
- storage.ErrHeightNotIndexed when data is unavailable
All other errors are considered as state corruption (fatal) or internal errors in the transaction error message getter or when deriving transaction status.
func (*LocalTransactionProvider) TransactionResultsByBlockID ¶
func (t *LocalTransactionProvider) TransactionResultsByBlockID( ctx context.Context, block *flow.Block, requiredEventEncodingVersion entities.EventEncodingVersion, ) ([]*accessmodel.TransactionResult, error)
TransactionResultsByBlockID retrieves transaction results by block ID from storage Expected errors during normal operation:
- codes.NotFound if result cannot be provided by storage due to the absence of data.
- codes.Internal when event payload conversion failed.
- indexer.ErrIndexNotInitialized when txResultsIndex not initialized
- storage.ErrHeightNotIndexed when data is unavailable
All other errors are considered as state corruption (fatal) or internal errors in the transaction error message getter or when deriving transaction status.
func (*LocalTransactionProvider) TransactionsByBlockID ¶
func (t *LocalTransactionProvider) TransactionsByBlockID( ctx context.Context, block *flow.Block, ) ([]*flow.TransactionBody, error)
TransactionsByBlockID retrieves transactions by block ID from storage Expected errors during normal operation:
- codes.NotFound if result cannot be provided by storage due to the absence of data.
- codes.Internal when event payload conversion failed.
- indexer.ErrIndexNotInitialized when txResultsIndex not initialized
- storage.ErrHeightNotIndexed when data is unavailable
All other errors are considered as state corruption (fatal) or internal errors in the transaction error message getter or when deriving transaction status.
type TransactionProvider ¶
type TransactionProvider interface { TransactionResult( ctx context.Context, header *flow.Header, txID flow.Identifier, encodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error) TransactionResultByIndex( ctx context.Context, block *flow.Block, index uint32, encodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error) TransactionResultsByBlockID( ctx context.Context, block *flow.Block, encodingVersion entities.EventEncodingVersion, ) ([]*accessmodel.TransactionResult, error) TransactionsByBlockID( ctx context.Context, block *flow.Block, ) ([]*flow.TransactionBody, error) SystemTransaction( ctx context.Context, block *flow.Block, txID flow.Identifier, ) (*flow.TransactionBody, error) SystemTransactionResult( ctx context.Context, block *flow.Block, txID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion, ) (*accessmodel.TransactionResult, error) }
TransactionProvider defines an interface for retrieving transaction results from various data sources, such as local storage and execution nodes.