LCOV - code coverage report
Current view: top level - app/firedancer - main.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 17 0.0 %
Date: 2026-03-19 18:19:27 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "topology.h"
       2             : #include "config.h"
       3             : #include "../shared/boot/fd_boot.h"
       4             : #include "../shared/commands/configure/configure.h"
       5             : 
       6             : char const * FD_APP_NAME    = "Firedancer";
       7             : char const * FD_BINARY_NAME = "firedancer";
       8             : 
       9             : extern fd_topo_obj_callbacks_t fd_obj_cb_mcache;
      10             : extern fd_topo_obj_callbacks_t fd_obj_cb_dcache;
      11             : extern fd_topo_obj_callbacks_t fd_obj_cb_fseq;
      12             : extern fd_topo_obj_callbacks_t fd_obj_cb_metrics;
      13             : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
      14             : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
      15             : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
      16             : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
      17             : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
      18             : extern fd_topo_obj_callbacks_t fd_obj_cb_store;
      19             : extern fd_topo_obj_callbacks_t fd_obj_cb_fec_sets;
      20             : extern fd_topo_obj_callbacks_t fd_obj_cb_txncache;
      21             : extern fd_topo_obj_callbacks_t fd_obj_cb_banks;
      22             : extern fd_topo_obj_callbacks_t fd_obj_cb_banks_locks;
      23             : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
      24             : extern fd_topo_obj_callbacks_t fd_obj_cb_funk_locks;
      25             : extern fd_topo_obj_callbacks_t fd_obj_cb_progcache;
      26             : extern fd_topo_obj_callbacks_t fd_obj_cb_acc_pool;
      27             : extern fd_topo_obj_callbacks_t fd_obj_cb_rnonce_ss;
      28             : 
      29             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_meta;
      30             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_meta_ele;
      31             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_data;
      32             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_req_pool;
      33             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_rq;
      34             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_cq;
      35             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_admin;
      36             : 
      37             : fd_topo_obj_callbacks_t * CALLBACKS[] = {
      38             :   &fd_obj_cb_mcache,
      39             :   &fd_obj_cb_dcache,
      40             :   &fd_obj_cb_fseq,
      41             :   &fd_obj_cb_metrics,
      42             :   &fd_obj_cb_dbl_buf,
      43             :   &fd_obj_cb_neigh4_hmap,
      44             :   &fd_obj_cb_fib4,
      45             :   &fd_obj_cb_keyswitch,
      46             :   &fd_obj_cb_tile,
      47             :   &fd_obj_cb_store,
      48             :   &fd_obj_cb_fec_sets,
      49             :   &fd_obj_cb_txncache,
      50             :   &fd_obj_cb_banks,
      51             :   &fd_obj_cb_banks_locks,
      52             :   &fd_obj_cb_funk,
      53             :   &fd_obj_cb_funk_locks,
      54             :   &fd_obj_cb_progcache,
      55             :   &fd_obj_cb_acc_pool,
      56             :   &fd_obj_cb_vinyl_meta,
      57             :   &fd_obj_cb_vinyl_meta_ele,
      58             :   &fd_obj_cb_vinyl_data,
      59             :   &fd_obj_cb_acc_pool,
      60             :   &fd_obj_cb_vinyl_req_pool,
      61             :   &fd_obj_cb_vinyl_rq,
      62             :   &fd_obj_cb_vinyl_cq,
      63             :   &fd_obj_cb_vinyl_admin,
      64             :   &fd_obj_cb_rnonce_ss,
      65             :   NULL,
      66             : };
      67             : 
      68             : extern configure_stage_t fd_cfg_stage_accdb;
      69             : 
      70             : configure_stage_t * STAGES[] = {
      71             :   &fd_cfg_stage_hugetlbfs,
      72             :   &fd_cfg_stage_sysctl,
      73             :   &fd_cfg_stage_bonding,
      74             :   &fd_cfg_stage_ethtool_channels,
      75             :   &fd_cfg_stage_ethtool_offloads,
      76             :   &fd_cfg_stage_ethtool_loopback,
      77             :   &fd_cfg_stage_snapshots,
      78             :   &fd_cfg_stage_accdb,
      79             :   NULL,
      80             : };
      81             : 
      82             : 
      83             : extern fd_topo_run_tile_t fd_tile_net;
      84             : extern fd_topo_run_tile_t fd_tile_netlnk;
      85             : extern fd_topo_run_tile_t fd_tile_sock;
      86             : extern fd_topo_run_tile_t fd_tile_quic;
      87             : extern fd_topo_run_tile_t fd_tile_verify;
      88             : extern fd_topo_run_tile_t fd_tile_dedup;
      89             : extern fd_topo_run_tile_t fd_tile_resolv;
      90             : extern fd_topo_run_tile_t fd_tile_pack;
      91             : extern fd_topo_run_tile_t fd_tile_execle;
      92             : extern fd_topo_run_tile_t fd_tile_poh;
      93             : extern fd_topo_run_tile_t fd_tile_shred;
      94             : extern fd_topo_run_tile_t fd_tile_sign;
      95             : extern fd_topo_run_tile_t fd_tile_metric;
      96             : extern fd_topo_run_tile_t fd_tile_event;
      97             : extern fd_topo_run_tile_t fd_tile_diag;
      98             : extern fd_topo_run_tile_t fd_tile_gui;
      99             : extern fd_topo_run_tile_t fd_tile_rpc;
     100             : extern fd_topo_run_tile_t fd_tile_plugin;
     101             : extern fd_topo_run_tile_t fd_tile_bundle;
     102             : #if FD_HAS_BZIP2
     103             : extern fd_topo_run_tile_t fd_tile_genesi;
     104             : #endif
     105             : extern fd_topo_run_tile_t fd_tile_ipecho;
     106             : 
     107             : extern fd_topo_run_tile_t fd_tile_gossvf;
     108             : extern fd_topo_run_tile_t fd_tile_gossip;
     109             : extern fd_topo_run_tile_t fd_tile_repair;
     110             : extern fd_topo_run_tile_t fd_tile_replay;
     111             : extern fd_topo_run_tile_t fd_tile_execrp;
     112             : extern fd_topo_run_tile_t fd_tile_txsend;
     113             : extern fd_topo_run_tile_t fd_tile_tower;
     114             : extern fd_topo_run_tile_t fd_tile_vinyl;
     115             : extern fd_topo_run_tile_t fd_tile_solcap;
     116             : 
     117             : extern fd_topo_run_tile_t fd_tile_snapct;
     118             : extern fd_topo_run_tile_t fd_tile_snapld;
     119             : extern fd_topo_run_tile_t fd_tile_snapdc;
     120             : extern fd_topo_run_tile_t fd_tile_snapin;
     121             : extern fd_topo_run_tile_t fd_tile_snapwm;
     122             : extern fd_topo_run_tile_t fd_tile_snapwh;
     123             : extern fd_topo_run_tile_t fd_tile_snapwr;
     124             : extern fd_topo_run_tile_t fd_tile_snapla;
     125             : extern fd_topo_run_tile_t fd_tile_snapls;
     126             : extern fd_topo_run_tile_t fd_tile_snaplh;
     127             : extern fd_topo_run_tile_t fd_tile_snaplv;
     128             : 
     129             : fd_topo_run_tile_t * TILES[] = {
     130             :   &fd_tile_net,
     131             :   &fd_tile_netlnk,
     132             :   &fd_tile_sock,
     133             :   &fd_tile_quic,
     134             :   &fd_tile_verify,
     135             :   &fd_tile_dedup,
     136             :   &fd_tile_resolv,
     137             :   &fd_tile_pack,
     138             :   &fd_tile_execle,
     139             :   &fd_tile_shred,
     140             :   &fd_tile_sign,
     141             :   &fd_tile_metric,
     142             :   &fd_tile_event,
     143             :   &fd_tile_diag,
     144             :   &fd_tile_gui,
     145             :   &fd_tile_rpc,
     146             :   &fd_tile_plugin,
     147             :   &fd_tile_bundle,
     148             :   &fd_tile_gossvf,
     149             :   &fd_tile_gossip,
     150             :   &fd_tile_repair,
     151             :   &fd_tile_replay,
     152             :   &fd_tile_execrp,
     153             :   &fd_tile_poh,
     154             :   &fd_tile_txsend,
     155             :   &fd_tile_tower,
     156             :   &fd_tile_snapct,
     157             :   &fd_tile_snapld,
     158             :   &fd_tile_snapdc,
     159             :   &fd_tile_snapin,
     160             :   &fd_tile_snapwm,
     161             :   &fd_tile_snapwh,
     162             :   &fd_tile_snapwr,
     163             :   &fd_tile_snapla,
     164             :   &fd_tile_snapls,
     165             :   &fd_tile_snaplh,
     166             :   &fd_tile_snaplv,
     167             : # if FD_HAS_BZIP2
     168             :   &fd_tile_genesi,
     169             : # endif
     170             :   &fd_tile_ipecho,
     171             :   &fd_tile_vinyl,
     172             :   &fd_tile_solcap,
     173             :   NULL,
     174             : };
     175             : 
     176             : extern action_t fd_action_run;
     177             : extern action_t fd_action_run1;
     178             : extern action_t fd_action_configure;
     179             : extern action_t fd_action_monitor;
     180             : extern action_t fd_action_keys;
     181             : extern action_t fd_action_ready;
     182             : extern action_t fd_action_mem;
     183             : extern action_t fd_action_netconf;
     184             : extern action_t fd_action_help;
     185             : extern action_t fd_action_metrics;
     186             : extern action_t fd_action_version;
     187             : extern action_t fd_action_shred_version;
     188             : extern action_t fd_action_watch;
     189             : extern action_t fd_action_add_authorized_voter;
     190             : extern action_t fd_action_set_identity;
     191             : extern action_t fd_action_monitor_gossip;
     192             : 
     193             : action_t * ACTIONS[] = {
     194             :   &fd_action_run,
     195             :   &fd_action_run1,
     196             :   &fd_action_configure,
     197             :   &fd_action_monitor,
     198             :   &fd_action_keys,
     199             :   &fd_action_ready,
     200             :   &fd_action_mem,
     201             :   &fd_action_netconf,
     202             :   &fd_action_help,
     203             :   &fd_action_metrics,
     204             :   &fd_action_version,
     205             :   &fd_action_shred_version,
     206             :   &fd_action_add_authorized_voter,
     207             :   &fd_action_watch,
     208             :   &fd_action_monitor_gossip,
     209             :   &fd_action_set_identity,
     210             :   NULL,
     211             : };
     212             : 
     213             : int
     214             : main( int     argc,
     215             :       char ** argv ) {
     216             :   fd_config_file_t _default = fd_config_file_default();
     217             :   fd_config_file_t testnet = fd_config_file_testnet();
     218             :   fd_config_file_t devnet = fd_config_file_devnet();
     219             :   fd_config_file_t mainnet = fd_config_file_mainnet();
     220             : 
     221             :   fd_config_file_t * configs[] = {
     222             :     &_default,
     223             :     &testnet,
     224             :     &devnet,
     225             :     &mainnet,
     226             :     NULL
     227             :   };
     228             : 
     229             :   return fd_main( argc, argv, 1, configs, fd_topo_initialize );
     230             : }
     231             : 
     232             : /* Kind of a hack for now, we sometimes want to view bench generation
     233             :    in the monitor binary, but it's not part of the production binary. */
     234             : 
     235             : void
     236             : add_bench_topo( fd_topo_t  * topo,
     237             :                 char const * affinity,
     238             :                 ulong        benchg_tile_cnt,
     239             :                 ulong        benchs_tile_cnt,
     240             :                 ulong        accounts_cnt,
     241             :                 int          transaction_mode,
     242             :                 float        contending_fraction,
     243             :                 float        cu_price_spread,
     244             :                 ulong        conn_cnt,
     245             :                 ushort       send_to_port,
     246             :                 uint         send_to_ip_addr,
     247             :                 ushort       rpc_port,
     248             :                 uint         rpc_ip_addr,
     249             :                 int          no_quic,
     250           0 :                 int          reserve_agave_cores ) {
     251           0 :   (void)topo;
     252           0 :   (void)affinity;
     253           0 :   (void)benchg_tile_cnt;
     254           0 :   (void)benchs_tile_cnt;
     255           0 :   (void)accounts_cnt;
     256           0 :   (void)transaction_mode;
     257           0 :   (void)contending_fraction;
     258           0 :   (void)cu_price_spread;
     259           0 :   (void)conn_cnt;
     260           0 :   (void)send_to_port;
     261           0 :   (void)send_to_ip_addr;
     262           0 :   (void)rpc_port;
     263           0 :   (void)rpc_ip_addr;
     264           0 :   (void)no_quic;
     265           0 :   (void)reserve_agave_cores;
     266           0 : }

Generated by: LCOV version 1.14