@@ -10,72 +10,72 @@ use reth_metrics::{
1010#[ metrics( scope = "transaction_pool" ) ]
1111pub struct TxPoolMetrics {
1212 /// Number of transactions inserted in the pool
13- pub ( crate ) inserted_transactions : Counter ,
13+ pub inserted_transactions : Counter ,
1414 /// Number of invalid transactions
15- pub ( crate ) invalid_transactions : Counter ,
15+ pub invalid_transactions : Counter ,
1616 /// Number of removed transactions from the pool
17- pub ( crate ) removed_transactions : Counter ,
17+ pub removed_transactions : Counter ,
1818
1919 /// Number of transactions in the pending sub-pool
20- pub ( crate ) pending_pool_transactions : Gauge ,
20+ pub pending_pool_transactions : Gauge ,
2121 /// Total amount of memory used by the transactions in the pending sub-pool in bytes
22- pub ( crate ) pending_pool_size_bytes : Gauge ,
22+ pub pending_pool_size_bytes : Gauge ,
2323
2424 /// Number of transactions in the basefee sub-pool
25- pub ( crate ) basefee_pool_transactions : Gauge ,
25+ pub basefee_pool_transactions : Gauge ,
2626 /// Total amount of memory used by the transactions in the basefee sub-pool in bytes
27- pub ( crate ) basefee_pool_size_bytes : Gauge ,
27+ pub basefee_pool_size_bytes : Gauge ,
2828
2929 /// Number of transactions in the queued sub-pool
30- pub ( crate ) queued_pool_transactions : Gauge ,
30+ pub queued_pool_transactions : Gauge ,
3131 /// Total amount of memory used by the transactions in the queued sub-pool in bytes
32- pub ( crate ) queued_pool_size_bytes : Gauge ,
32+ pub queued_pool_size_bytes : Gauge ,
3333
3434 /// Number of transactions in the blob sub-pool
35- pub ( crate ) blob_pool_transactions : Gauge ,
35+ pub blob_pool_transactions : Gauge ,
3636 /// Total amount of memory used by the transactions in the blob sub-pool in bytes
37- pub ( crate ) blob_pool_size_bytes : Gauge ,
37+ pub blob_pool_size_bytes : Gauge ,
3838
3939 /// Number of all transactions of all sub-pools: pending + basefee + queued + blob
40- pub ( crate ) total_transactions : Gauge ,
40+ pub total_transactions : Gauge ,
4141 /// Number of all legacy transactions in the pool
42- pub ( crate ) total_legacy_transactions : Gauge ,
42+ pub total_legacy_transactions : Gauge ,
4343 /// Number of all EIP-2930 transactions in the pool
44- pub ( crate ) total_eip2930_transactions : Gauge ,
44+ pub total_eip2930_transactions : Gauge ,
4545 /// Number of all EIP-1559 transactions in the pool
46- pub ( crate ) total_eip1559_transactions : Gauge ,
46+ pub total_eip1559_transactions : Gauge ,
4747 /// Number of all EIP-4844 transactions in the pool
48- pub ( crate ) total_eip4844_transactions : Gauge ,
48+ pub total_eip4844_transactions : Gauge ,
4949 /// Number of all EIP-7702 transactions in the pool
50- pub ( crate ) total_eip7702_transactions : Gauge ,
50+ pub total_eip7702_transactions : Gauge ,
5151 /// Number of all other transactions in the pool
52- pub ( crate ) total_other_transactions : Gauge ,
52+ pub total_other_transactions : Gauge ,
5353
5454 /// How often the pool was updated after the canonical state changed
55- pub ( crate ) performed_state_updates : Counter ,
55+ pub performed_state_updates : Counter ,
5656
5757 /// Counter for the number of pending transactions evicted
58- pub ( crate ) pending_transactions_evicted : Counter ,
58+ pub pending_transactions_evicted : Counter ,
5959 /// Counter for the number of basefee transactions evicted
60- pub ( crate ) basefee_transactions_evicted : Counter ,
60+ pub basefee_transactions_evicted : Counter ,
6161 /// Counter for the number of blob transactions evicted
62- pub ( crate ) blob_transactions_evicted : Counter ,
62+ pub blob_transactions_evicted : Counter ,
6363 /// Counter for the number of queued transactions evicted
64- pub ( crate ) queued_transactions_evicted : Counter ,
64+ pub queued_transactions_evicted : Counter ,
6565}
6666
6767/// Transaction pool blobstore metrics
6868#[ derive( Metrics ) ]
6969#[ metrics( scope = "transaction_pool" ) ]
7070pub struct BlobStoreMetrics {
7171 /// Number of failed inserts into the blobstore
72- pub ( crate ) blobstore_failed_inserts : Counter ,
72+ pub blobstore_failed_inserts : Counter ,
7373 /// Number of failed deletes into the blobstore
74- pub ( crate ) blobstore_failed_deletes : Counter ,
74+ pub blobstore_failed_deletes : Counter ,
7575 /// The number of bytes the blobs in the blobstore take up
76- pub ( crate ) blobstore_byte_size : Gauge ,
76+ pub blobstore_byte_size : Gauge ,
7777 /// How many blobs are currently in the blobstore
78- pub ( crate ) blobstore_entries : Gauge ,
78+ pub blobstore_entries : Gauge ,
7979}
8080
8181/// Transaction pool maintenance metrics
@@ -84,35 +84,39 @@ pub struct BlobStoreMetrics {
8484pub struct MaintainPoolMetrics {
8585 /// Gauge indicating the number of addresses with pending updates in the pool,
8686 /// requiring their account information to be fetched.
87- pub ( crate ) dirty_accounts : Gauge ,
87+ pub dirty_accounts : Gauge ,
8888 /// Counter for the number of times the pool state diverged from the canonical blockchain
8989 /// state.
90- pub ( crate ) drift_count : Counter ,
90+ pub drift_count : Counter ,
9191 /// Counter for the number of transactions reinserted into the pool following a blockchain
9292 /// reorganization (reorg).
93- pub ( crate ) reinserted_transactions : Counter ,
93+ pub reinserted_transactions : Counter ,
9494 /// Counter for the number of finalized blob transactions that have been removed from tracking.
95- pub ( crate ) deleted_tracked_finalized_blobs : Counter ,
95+ pub deleted_tracked_finalized_blobs : Counter ,
9696}
9797
9898impl MaintainPoolMetrics {
99+ /// Sets the number of dirty accounts in the pool.
99100 #[ inline]
100- pub ( crate ) fn set_dirty_accounts_len ( & self , count : usize ) {
101+ pub fn set_dirty_accounts_len ( & self , count : usize ) {
101102 self . dirty_accounts . set ( count as f64 ) ;
102103 }
103104
105+ /// Increments the count of reinserted transactions.
104106 #[ inline]
105- pub ( crate ) fn inc_reinserted_transactions ( & self , count : usize ) {
107+ pub fn inc_reinserted_transactions ( & self , count : usize ) {
106108 self . reinserted_transactions . increment ( count as u64 ) ;
107109 }
108110
111+ /// Increments the count of deleted tracked finalized blobs.
109112 #[ inline]
110- pub ( crate ) fn inc_deleted_tracked_blobs ( & self , count : usize ) {
113+ pub fn inc_deleted_tracked_blobs ( & self , count : usize ) {
111114 self . deleted_tracked_finalized_blobs . increment ( count as u64 ) ;
112115 }
113116
117+ /// Increments the drift count by one.
114118 #[ inline]
115- pub ( crate ) fn inc_drift ( & self ) {
119+ pub fn inc_drift ( & self ) {
116120 self . drift_count . increment ( 1 ) ;
117121 }
118122}
@@ -122,31 +126,31 @@ impl MaintainPoolMetrics {
122126#[ metrics( scope = "transaction_pool" ) ]
123127pub struct AllTransactionsMetrics {
124128 /// Number of all transactions by hash in the pool
125- pub ( crate ) all_transactions_by_hash : Gauge ,
129+ pub all_transactions_by_hash : Gauge ,
126130 /// Number of all transactions by id in the pool
127- pub ( crate ) all_transactions_by_id : Gauge ,
131+ pub all_transactions_by_id : Gauge ,
128132 /// Number of all transactions by all senders in the pool
129- pub ( crate ) all_transactions_by_all_senders : Gauge ,
133+ pub all_transactions_by_all_senders : Gauge ,
130134 /// Number of blob transactions nonce gaps.
131- pub ( crate ) blob_transactions_nonce_gaps : Counter ,
135+ pub blob_transactions_nonce_gaps : Counter ,
132136 /// The current blob base fee
133- pub ( crate ) blob_base_fee : Gauge ,
137+ pub blob_base_fee : Gauge ,
134138 /// The current base fee
135- pub ( crate ) base_fee : Gauge ,
139+ pub base_fee : Gauge ,
136140}
137141
138142/// Transaction pool validation metrics
139143#[ derive( Metrics ) ]
140144#[ metrics( scope = "transaction_pool" ) ]
141145pub struct TxPoolValidationMetrics {
142146 /// How long to successfully validate a blob
143- pub ( crate ) blob_validation_duration : Histogram ,
147+ pub blob_validation_duration : Histogram ,
144148}
145149
146150/// Transaction pool validator task metrics
147151#[ derive( Metrics ) ]
148152#[ metrics( scope = "transaction_pool" ) ]
149153pub struct TxPoolValidatorMetrics {
150154 /// Number of in-flight validation job sends waiting for channel capacity
151- pub ( crate ) inflight_validation_jobs : Gauge ,
155+ pub inflight_validation_jobs : Gauge ,
152156}
0 commit comments