@@ -565,33 +565,56 @@ export const epochSchema = z.discriminatedUnion("key", [
565565] ) ;
566566
567567const 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 ( ) ,
576583} ) ;
577584
578585const 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 ( ) ,
582590} ) ;
583591
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 ( ) ,
588610} ) ;
589611
590612export const gossipNetworkStatsSchema = z . object ( {
591613 health : gossipNetworkHealthSchema ,
592614 ingress : gossipNetworkTrafficSchema ,
593615 egress : gossipNetworkTrafficSchema ,
594- storage : gossipStorageUtilSchema ,
616+ storage : gossipStorageStatsSchema ,
617+ messages : gossipMessageStatsSchema ,
595618} ) ;
596619
597620export const gossipSchema = z . discriminatedUnion ( "key" , [
0 commit comments