@@ -563,33 +563,56 @@ export const epochSchema = z.discriminatedUnion("key", [
563
563
] ) ;
564
564
565
565
const gossipNetworkHealthSchema = z . object ( {
566
- rx_push_pct : z . number ( ) . optional ( ) ,
567
- duplicate_pct : z . number ( ) . optional ( ) ,
568
- bad_pct : z . number ( ) . optional ( ) ,
569
- pull_already_known_pct : z . number ( ) . optional ( ) ,
570
- total_stake : z . coerce . bigint ( ) ,
571
- total_peers : z . coerce . bigint ( ) ,
572
- connected_stake : z . coerce . bigint ( ) ,
573
- connected_peers : z . number ( ) ,
566
+ push_rx_pct : z . number ( ) . nullable ( ) . optional ( ) ,
567
+ pull_response_rx_pct : z . number ( ) . nullable ( ) . optional ( ) ,
568
+ push_rx_dup_pct : z . number ( ) . nullable ( ) . optional ( ) ,
569
+ pull_response_rx_dup_pct : z . number ( ) . nullable ( ) . optional ( ) ,
570
+ push_rx_msg_bad_pct : z . number ( ) . nullable ( ) . optional ( ) ,
571
+ push_rx_entry_bad_pct : z . number ( ) . nullable ( ) . optional ( ) ,
572
+ pull_response_rx_msg_bad_pct : z . number ( ) . nullable ( ) . optional ( ) ,
573
+ pull_response_rx_entry_bad_pct : z . number ( ) . nullable ( ) . optional ( ) ,
574
+ pull_already_known_pct : z . number ( ) . nullable ( ) . optional ( ) ,
575
+ total_stake : z . coerce . bigint ( ) . nullable ( ) . optional ( ) ,
576
+ total_staked_peers : z . number ( ) . nullable ( ) . optional ( ) ,
577
+ total_unstaked_peers : z . number ( ) . nullable ( ) . optional ( ) ,
578
+ connected_stake : z . coerce . bigint ( ) . nullable ( ) . optional ( ) ,
579
+ connected_staked_peers : z . number ( ) . nullable ( ) . optional ( ) ,
580
+ connected_unstaked_peers : z . number ( ) . nullable ( ) . optional ( ) ,
574
581
} ) ;
575
582
576
583
const gossipNetworkTrafficSchema = z . object ( {
577
- total_throughput : z . number ( ) . optional ( ) ,
578
- peer_names : z . string ( ) . array ( ) ,
579
- peer_throughputs : z . number ( ) . array ( ) . optional ( ) ,
584
+ total_throughput : z . number ( ) . nullable ( ) . optional ( ) ,
585
+ peer_names : z . string ( ) . array ( ) . nullable ( ) . optional ( ) ,
586
+ peer_identities : z . string ( ) . array ( ) . nullable ( ) . optional ( ) ,
587
+ peer_throughput : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
580
588
} ) ;
581
589
582
- const gossipStorageUtilSchema = z . object ( {
583
- total_bytes : z . coerce . number ( ) ,
584
- peer_names : z . string ( ) . array ( ) ,
585
- peer_bytes : z . number ( ) . array ( ) ,
590
+ const gossipStorageStatsSchema = z . object ( {
591
+ capacity : z . number ( ) . nullable ( ) . optional ( ) ,
592
+ expired_total : z . number ( ) . nullable ( ) . optional ( ) ,
593
+ evicted_total : z . number ( ) . nullable ( ) . optional ( ) ,
594
+ count : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
595
+ bps_tx : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
596
+ eps_tx : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
597
+ } ) ;
598
+
599
+ const gossipMessageStatsSchema = z . object ( {
600
+ bytes_rx_total : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
601
+ count_rx_total : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
602
+ bytes_tx_total : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
603
+ count_tx_total : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
604
+ bps_rx : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
605
+ mps_rx : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
606
+ bps_tx : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
607
+ mps_tx : z . number ( ) . array ( ) . nullable ( ) . optional ( ) ,
586
608
} ) ;
587
609
588
610
export const gossipNetworkStatsSchema = z . object ( {
589
611
health : gossipNetworkHealthSchema ,
590
612
ingress : gossipNetworkTrafficSchema ,
591
613
egress : gossipNetworkTrafficSchema ,
592
- storage : gossipStorageUtilSchema ,
614
+ storage : gossipStorageStatsSchema ,
615
+ messages : gossipMessageStatsSchema ,
593
616
} ) ;
594
617
595
618
export const gossipSchema = z . discriminatedUnion ( "key" , [
0 commit comments