@@ -17,9 +17,10 @@ export type SyncChainDebugState = {
17
17
18
18
export type GossipQueueItem = {
19
19
topic : unknown ;
20
- receivedFrom : string ;
20
+ propagationSource : string ;
21
21
data : Uint8Array ;
22
22
addedTimeMs : number ;
23
+ seenTimestampSec : number ;
23
24
} ;
24
25
25
26
export type RegenQueueItem = {
@@ -66,6 +67,8 @@ export type Api = {
66
67
getStateCacheItems ( ) : Promise < StateCacheItem [ ] > ;
67
68
/** Dump a summary of the states in the CheckpointStateCache */
68
69
getCheckpointStateCacheItems ( ) : Promise < StateCacheItem [ ] > ;
70
+ /** Dump peer gossip stats by peer */
71
+ getGossipPeerScoreStats ( ) : Promise < Record < string , unknown > > ;
69
72
/** Run GC with `global.gc()` */
70
73
runGC ( ) : Promise < void > ;
71
74
/** Drop all states in the state cache */
@@ -95,6 +98,7 @@ export const routesData: RoutesData<Api> = {
95
98
getBlockProcessorQueueItems : { url : "/eth/v1/lodestar/block-processor-queue-items" , method : "GET" } ,
96
99
getStateCacheItems : { url : "/eth/v1/lodestar/state-cache-items" , method : "GET" } ,
97
100
getCheckpointStateCacheItems : { url : "/eth/v1/lodestar/checkpoint-state-cache-items" , method : "GET" } ,
101
+ getGossipPeerScoreStats : { url : "/eth/v1/lodestar/gossip-peer-score-stats" , method : "GET" } ,
98
102
runGC : { url : "/eth/v1/lodestar/gc" , method : "POST" } ,
99
103
dropStateCache : { url : "/eth/v1/lodestar/drop-state-cache" , method : "POST" } ,
100
104
connectPeer : { url : "/eth/v1/lodestar/connect_peer" , method : "POST" } ,
@@ -113,6 +117,7 @@ export type ReqTypes = {
113
117
getBlockProcessorQueueItems : ReqEmpty ;
114
118
getStateCacheItems : ReqEmpty ;
115
119
getCheckpointStateCacheItems : ReqEmpty ;
120
+ getGossipPeerScoreStats : ReqEmpty ;
116
121
runGC : ReqEmpty ;
117
122
dropStateCache : ReqEmpty ;
118
123
connectPeer : { query : { peerId : string ; multiaddr : string [ ] } } ;
@@ -140,6 +145,7 @@ export function getReqSerializers(): ReqSerializers<Api, ReqTypes> {
140
145
getBlockProcessorQueueItems : reqEmpty ,
141
146
getStateCacheItems : reqEmpty ,
142
147
getCheckpointStateCacheItems : reqEmpty ,
148
+ getGossipPeerScoreStats : reqEmpty ,
143
149
runGC : reqEmpty ,
144
150
dropStateCache : reqEmpty ,
145
151
connectPeer : {
@@ -173,6 +179,7 @@ export function getReturnTypes(): ReturnTypes<Api> {
173
179
getBlockProcessorQueueItems : jsonType ( "camel" ) ,
174
180
getStateCacheItems : jsonType ( "camel" ) ,
175
181
getCheckpointStateCacheItems : jsonType ( "camel" ) ,
182
+ getGossipPeerScoreStats : jsonType ( "camel" ) ,
176
183
getPeers : jsonType ( "camel" ) ,
177
184
discv5GetKadValues : jsonType ( "camel" ) ,
178
185
} ;
0 commit comments