Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MetricsSubsystem is a subsystem shared by all metrics exposed by this // package. MetricsSubsystem = "sequencer" )
Variables ¶
View Source
var ( // ErrNotProposer is used when the node is not a proposer ErrNotProposer = errors.New("not a proposer") // ErrNoBatch indicate no batch is available for creating block ErrNoBatch = errors.New("no batch to process") // ErrNoTransactionsInBatch is used when no transactions are found in batch ErrNoTransactionsInBatch = errors.New("no transactions found in batch") // ErrHeightFromFutureStr is the error message for height from future returned by da ErrHeightFromFutureStr = errors.New("given height is from the future") )
These errors are used by block components.
View Source
var DataHashForEmptyTxs = []byte{110, 52, 11, 156, 255, 179, 122, 152, 156, 165, 68, 230, 187, 120, 10, 44, 120, 144, 29, 63, 179, 55, 56, 118, 133, 17, 163, 6, 23, 175, 160, 29}
DataHashForEmptyTxs is the hash of an empty block data.
Functions ¶
This section is empty.
Types ¶
type BlockOptions ¶
type BlockOptions struct {
AggregatorNodeSignatureBytesProvider types.AggregatorNodeSignatureBytesProvider
SyncNodeSignatureBytesProvider types.SyncNodeSignatureBytesProvider
ValidatorHasherProvider types.ValidatorHasherProvider
}
BlockOptions defines the options for creating block components
func DefaultBlockOptions ¶
func DefaultBlockOptions() BlockOptions
DefaultBlockOptions returns the default block options
func (*BlockOptions) Validate ¶
func (opts *BlockOptions) Validate() error
Validate validates the BlockOptions
type DAHeightEvent ¶
type DAHeightEvent struct {
Header *types.SignedHeader
Data *types.Data
// DaHeight corresponds to the highest DA included height between the Header and Data.
DaHeight uint64
// HeaderDaIncludedHeight corresponds to the DA height at which the Header was included.
HeaderDaIncludedHeight uint64
}
DAHeightEvent represents a DA event for caching
type Metrics ¶
type Metrics struct {
// Original metrics
Height metrics.Gauge // Height of the chain
NumTxs metrics.Gauge // Number of transactions in the latest block
BlockSizeBytes metrics.Gauge // Size of the latest block
TotalTxs metrics.Gauge // Total number of transactions
CommittedHeight metrics.Gauge `metrics_name:"latest_block_height"` // The latest block height
// Channel metrics
ChannelBufferUsage map[string]metrics.Gauge
DroppedSignals metrics.Counter
// Error metrics
ErrorsByType map[string]metrics.Counter
RecoverableErrors metrics.Counter
NonRecoverableErrors metrics.Counter
// Performance metrics
OperationDuration map[string]metrics.Histogram
GoroutineCount metrics.Gauge
// DA metrics
DASubmissionAttempts metrics.Counter
DASubmissionSuccesses metrics.Counter
DASubmissionFailures metrics.Counter
DARetrievalAttempts metrics.Counter
DARetrievalSuccesses metrics.Counter
DARetrievalFailures metrics.Counter
DAInclusionHeight metrics.Gauge
PendingHeadersCount metrics.Gauge
PendingDataCount metrics.Gauge
// Sync metrics
SyncLag metrics.Gauge
HeadersSynced metrics.Counter
DataSynced metrics.Counter
BlocksApplied metrics.Counter
InvalidHeadersCount metrics.Counter
// Block production metrics
BlockProductionTime metrics.Histogram
EmptyBlocksProduced metrics.Counter
LazyBlocksProduced metrics.Counter
NormalBlocksProduced metrics.Counter
TxsPerBlock metrics.Histogram
// State transition metrics
StateTransitions map[string]metrics.Counter
InvalidTransitions metrics.Counter
}
Metrics contains all metrics exposed by this package.
func PrometheusMetrics ¶
PrometheusMetrics returns Metrics built using Prometheus client library
Click to show internal directories.
Click to hide internal directories.