Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the main component of the dependency graph module. It is responsible for managing the local dependency constructor and the global dependency manager.
func NewManager ¶
func NewManager(p *Parameters) *Manager
NewManager creates a new dependency graph manager.
type Parameters ¶ added in v0.1.5
type Parameters struct {
// IncomingTxs is the channel for dependency manager to receive
// incoming transactions.
IncomingTxs <-chan *TransactionBatch
// OutgoingDepFreeTxsNode is the channel dependency manager to send
// dependency free transactions for validation and commit.
OutgoingDepFreeTxsNode chan<- TxNodeBatch
// IncomingValidatedTxsNode is the channel for dependency manager
// to receive validated transactions.
IncomingValidatedTxsNode <-chan TxNodeBatch
// NumOfLocalDepConstructors defines the number of local
// dependency constructors.
NumOfLocalDepConstructors int
// WaitingTxsLimit defines the maximum number of transactions
// that can be waiting at the dependency manager.
WaitingTxsLimit int
// PrometheusMetricsProvider is the provider for Prometheus metrics.
PrometheusMetricsProvider *monitoring.Provider
}
Parameters holds the configuration for the dependency graph manager.
type SimpleManager ¶
type SimpleManager struct {
// contains filtered or unexported fields
}
SimpleManager is the simpler version of the dependency graph module. It uses only 3 go routines, and a single regular map.
func NewSimpleManager ¶
func NewSimpleManager(p *Parameters) *SimpleManager
NewSimpleManager create a simple dependency graph manager.
func (*SimpleManager) Run ¶
func (m *SimpleManager) Run(ctx context.Context)
Run starts the dependency graph manager.
type TransactionBatch ¶
type TransactionBatch struct {
ID uint64
Txs []*protocoordinatorservice.Tx
}
TransactionBatch holds a batch of transactions to be included in the dependency graph. The id field denotes the order in which the batch needs to be processed.
type TransactionNode ¶
type TransactionNode struct {
Tx *protovcservice.Tx
Signatures [][]byte
// contains filtered or unexported fields
}
TransactionNode is a node in the dependency graph.
func NewRejectedTransactionNode ¶ added in v0.1.6
func NewRejectedTransactionNode(tx *protocoordinatorservice.TxStatusInfo) *TransactionNode
NewRejectedTransactionNode creates a TX node for a rejected TX.