@@ -46,13 +46,19 @@ export function getGossipValidatorBatchFn(
4646 } ) )
4747 ) ;
4848
49- return results . map ( ( e ) => {
49+ return results . map ( ( e , i ) => {
5050 if ( e == null ) {
5151 return TopicValidatorResult . Accept ;
5252 }
5353
54+ const { clientAgent, clientVersion, propagationSource} = messageInfos [ i ] ;
55+
5456 if ( ! ( e instanceof AttestationError ) ) {
55- logger . debug ( `Gossip batch validation ${ type } threw a non-AttestationError` , { } , e as Error ) ;
57+ logger . debug (
58+ `Gossip batch validation ${ type } threw a non-AttestationError` ,
59+ { peerId : prettyPrintPeerIdStr ( propagationSource ) , clientAgent, clientVersion} ,
60+ e as Error
61+ ) ;
5662 metrics ?. networkProcessor . gossipValidationIgnore . inc ( { topic : type } ) ;
5763 return TopicValidatorResult . Ignore ;
5864 }
@@ -67,7 +73,11 @@ export function getGossipValidatorBatchFn(
6773 metrics ?. networkProcessor . gossipValidationReject . inc ( { topic : type } ) ;
6874 // only beacon_attestation topic is validated in batch
6975 metrics ?. networkProcessor . gossipAttestationRejectByReason . inc ( { reason : e . type . code } ) ;
70- logger . debug ( `Gossip validation ${ type } rejected` , { } , e ) ;
76+ logger . debug (
77+ `Gossip validation ${ type } rejected` ,
78+ { peerId : prettyPrintPeerIdStr ( propagationSource ) , clientAgent, clientVersion} ,
79+ e
80+ ) ;
7181 return TopicValidatorResult . Reject ;
7282 }
7383 } ) ;
@@ -125,7 +135,11 @@ export function getGossipValidatorFn(gossipHandlers: GossipHandlers, modules: Va
125135 } catch ( e ) {
126136 if ( ! ( e instanceof GossipActionError ) ) {
127137 // not deserve to log error here, it looks too dangerous to users
128- logger . debug ( `Gossip validation ${ type } threw a non-GossipActionError` , { } , e as Error ) ;
138+ logger . debug (
139+ `Gossip validation ${ type } threw a non-GossipActionError` ,
140+ { peerId : prettyPrintPeerIdStr ( propagationSource ) , clientAgent, clientVersion} ,
141+ e as Error
142+ ) ;
129143 return TopicValidatorResult . Ignore ;
130144 }
131145
0 commit comments