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