LCOV - code coverage report
Current view: top level - app/firedancer-dev - main.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 18 18 100.0 %
Date: 2025-12-07 04:58:33 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "main.h"
       2             : #include "../firedancer/topology.h"
       3             : #include "../firedancer/config.h"
       4             : #include "../shared_dev/boot/fd_dev_boot.h"
       5             : #include "../shared/fd_action.h"
       6             : #include "../shared/commands/configure/configure.h"
       7             : 
       8             : char const * FD_APP_NAME    = "Firedancer";
       9             : char const * FD_BINARY_NAME = "firedancer-dev";
      10             : 
      11             : extern fd_topo_obj_callbacks_t fd_obj_cb_mcache;
      12             : extern fd_topo_obj_callbacks_t fd_obj_cb_dcache;
      13             : extern fd_topo_obj_callbacks_t fd_obj_cb_fseq;
      14             : extern fd_topo_obj_callbacks_t fd_obj_cb_metrics;
      15             : extern fd_topo_obj_callbacks_t fd_obj_cb_cnc;
      16             : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
      17             : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
      18             : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
      19             : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
      20             : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
      21             : extern fd_topo_obj_callbacks_t fd_obj_cb_store;
      22             : extern fd_topo_obj_callbacks_t fd_obj_cb_fec_sets;
      23             : extern fd_topo_obj_callbacks_t fd_obj_cb_txncache;
      24             : extern fd_topo_obj_callbacks_t fd_obj_cb_banks;
      25             : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
      26             : 
      27             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_meta;
      28             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_meta_ele;
      29             : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_data;
      30             : 
      31             : fd_topo_obj_callbacks_t * CALLBACKS[] = {
      32             :   &fd_obj_cb_mcache,
      33             :   &fd_obj_cb_dcache,
      34             :   &fd_obj_cb_fseq,
      35             :   &fd_obj_cb_metrics,
      36             :   &fd_obj_cb_cnc,
      37             :   &fd_obj_cb_dbl_buf,
      38             :   &fd_obj_cb_neigh4_hmap,
      39             :   &fd_obj_cb_fib4,
      40             :   &fd_obj_cb_keyswitch,
      41             :   &fd_obj_cb_tile,
      42             :   &fd_obj_cb_store,
      43             :   &fd_obj_cb_fec_sets,
      44             :   &fd_obj_cb_txncache,
      45             :   &fd_obj_cb_banks,
      46             :   &fd_obj_cb_funk,
      47             :   &fd_obj_cb_vinyl_meta,
      48             :   &fd_obj_cb_vinyl_meta_ele,
      49             :   &fd_obj_cb_vinyl_data,
      50             :   NULL,
      51             : };
      52             : 
      53             : extern configure_stage_t fd_cfg_stage_vinyl;
      54             : 
      55             : configure_stage_t * STAGES[] = {
      56             :   &fd_cfg_stage_kill,
      57             :   &fd_cfg_stage_netns,
      58             :   &fd_cfg_stage_hugetlbfs,
      59             :   &fd_cfg_stage_sysctl,
      60             :   &fd_cfg_stage_bonding,
      61             :   &fd_cfg_stage_ethtool_channels,
      62             :   &fd_cfg_stage_ethtool_offloads,
      63             :   &fd_cfg_stage_ethtool_loopback,
      64             :   &fd_cfg_stage_keys,
      65             :   &fd_cfg_stage_genesis,
      66             :   &fd_cfg_stage_snapshots,
      67             :   &fd_cfg_stage_vinyl,
      68             :   NULL,
      69             : };
      70             : 
      71             : 
      72             : extern fd_topo_run_tile_t fd_tile_net;
      73             : extern fd_topo_run_tile_t fd_tile_netlnk;
      74             : extern fd_topo_run_tile_t fd_tile_sock;
      75             : extern fd_topo_run_tile_t fd_tile_quic;
      76             : extern fd_topo_run_tile_t fd_tile_verify;
      77             : extern fd_topo_run_tile_t fd_tile_dedup;
      78             : extern fd_topo_run_tile_t fd_tile_resolv;
      79             : extern fd_topo_run_tile_t fd_tile_pack;
      80             : extern fd_topo_run_tile_t fd_tile_bank;
      81             : extern fd_topo_run_tile_t fd_tile_poh;
      82             : extern fd_topo_run_tile_t fd_tile_shred;
      83             : extern fd_topo_run_tile_t fd_tile_sign;
      84             : extern fd_topo_run_tile_t fd_tile_metric;
      85             : extern fd_topo_run_tile_t fd_tile_cswtch;
      86             : extern fd_topo_run_tile_t fd_tile_gui;
      87             : extern fd_topo_run_tile_t fd_tile_rpc;
      88             : extern fd_topo_run_tile_t fd_tile_plugin;
      89             : extern fd_topo_run_tile_t fd_tile_bencho;
      90             : extern fd_topo_run_tile_t fd_tile_benchg;
      91             : extern fd_topo_run_tile_t fd_tile_benchs;
      92             : extern fd_topo_run_tile_t fd_tile_bundle;
      93             : extern fd_topo_run_tile_t fd_tile_pktgen;
      94             : extern fd_topo_run_tile_t fd_tile_udpecho;
      95             : extern fd_topo_run_tile_t fd_tile_genesi;
      96             : extern fd_topo_run_tile_t fd_tile_ipecho;
      97             : 
      98             : extern fd_topo_run_tile_t fd_tile_gossvf;
      99             : extern fd_topo_run_tile_t fd_tile_gossip;
     100             : extern fd_topo_run_tile_t fd_tile_repair;
     101             : extern fd_topo_run_tile_t fd_tile_replay;
     102             : extern fd_topo_run_tile_t fd_tile_execor;
     103             : extern fd_topo_run_tile_t fd_tile_send;
     104             : extern fd_topo_run_tile_t fd_tile_tower;
     105             : extern fd_topo_run_tile_t fd_tile_backtest;
     106             : extern fd_topo_run_tile_t fd_tile_archiver_feeder;
     107             : extern fd_topo_run_tile_t fd_tile_archiver_writer;
     108             : extern fd_topo_run_tile_t fd_tile_archiver_playback;
     109             : extern fd_topo_run_tile_t fd_tile_shredcap;
     110             : extern fd_topo_run_tile_t fd_tile_vinyl;
     111             : 
     112             : extern fd_topo_run_tile_t fd_tile_snapct;
     113             : extern fd_topo_run_tile_t fd_tile_snapld;
     114             : extern fd_topo_run_tile_t fd_tile_snapdc;
     115             : extern fd_topo_run_tile_t fd_tile_snapin;
     116             : extern fd_topo_run_tile_t fd_tile_snapwh;
     117             : extern fd_topo_run_tile_t fd_tile_snapwr;
     118             : extern fd_topo_run_tile_t fd_tile_snapla;
     119             : extern fd_topo_run_tile_t fd_tile_snapls;
     120             : 
     121             : fd_topo_run_tile_t * TILES[] = {
     122             :   &fd_tile_net,
     123             :   &fd_tile_netlnk,
     124             :   &fd_tile_sock,
     125             :   &fd_tile_quic,
     126             :   &fd_tile_verify,
     127             :   &fd_tile_dedup,
     128             :   &fd_tile_resolv,
     129             :   &fd_tile_pack,
     130             :   &fd_tile_bank,
     131             :   &fd_tile_shred,
     132             :   &fd_tile_sign,
     133             :   &fd_tile_metric,
     134             :   &fd_tile_cswtch,
     135             :   &fd_tile_gui,
     136             :   &fd_tile_rpc,
     137             :   &fd_tile_plugin,
     138             :   &fd_tile_bencho,
     139             :   &fd_tile_benchg,
     140             :   &fd_tile_benchs,
     141             :   &fd_tile_bundle,
     142             :   &fd_tile_gossvf,
     143             :   &fd_tile_gossip,
     144             :   &fd_tile_repair,
     145             :   &fd_tile_replay,
     146             :   &fd_tile_execor,
     147             :   &fd_tile_poh,
     148             :   &fd_tile_send,
     149             :   &fd_tile_tower,
     150             :   &fd_tile_archiver_feeder,
     151             :   &fd_tile_archiver_writer,
     152             :   &fd_tile_archiver_playback,
     153             :   &fd_tile_shredcap,
     154             :   &fd_tile_backtest,
     155             :   &fd_tile_bencho,
     156             :   &fd_tile_benchg,
     157             :   &fd_tile_benchs,
     158             :   &fd_tile_pktgen,
     159             :   &fd_tile_udpecho,
     160             :   &fd_tile_snapct,
     161             :   &fd_tile_snapld,
     162             :   &fd_tile_snapdc,
     163             :   &fd_tile_snapin,
     164             :   &fd_tile_snapwh,
     165             :   &fd_tile_snapwr,
     166             :   &fd_tile_snapla,
     167             :   &fd_tile_snapls,
     168             :   &fd_tile_genesi,
     169             :   &fd_tile_ipecho,
     170             :   &fd_tile_vinyl,
     171             :   NULL,
     172             : };
     173             : 
     174             : extern action_t fd_action_run;
     175             : extern action_t fd_action_run1;
     176             : extern action_t fd_action_configure;
     177             : extern action_t fd_action_monitor;
     178             : extern action_t fd_action_keys;
     179             : extern action_t fd_action_ready;
     180             : extern action_t fd_action_mem;
     181             : extern action_t fd_action_netconf;
     182             : extern action_t fd_action_set_identity;
     183             : extern action_t fd_action_version;
     184             : extern action_t fd_action_bench;
     185             : extern action_t fd_action_bundle_client;
     186             : extern action_t fd_action_dev;
     187             : extern action_t fd_action_dump;
     188             : extern action_t fd_action_flame;
     189             : extern action_t fd_action_help;
     190             : extern action_t fd_action_metrics;
     191             : extern action_t fd_action_metrics_record;
     192             : extern action_t fd_action_load;
     193             : extern action_t fd_action_pktgen;
     194             : extern action_t fd_action_quic_trace;
     195             : extern action_t fd_action_txn;
     196             : extern action_t fd_action_udpecho;
     197             : extern action_t fd_action_wksp;
     198             : extern action_t fd_action_gossip;
     199             : extern action_t fd_action_sim;
     200             : extern action_t fd_action_backtest;
     201             : extern action_t fd_action_snapshot_load;
     202             : extern action_t fd_action_repair;
     203             : extern action_t fd_action_tower;
     204             : extern action_t fd_action_shred_version;
     205             : extern action_t fd_action_ipecho_server;
     206             : extern action_t fd_action_send_test;
     207             : extern action_t fd_action_gossip_dump;
     208             : extern action_t fd_action_watch;
     209             : 
     210             : action_t * ACTIONS[] = {
     211             :   &fd_action_run,
     212             :   &fd_action_run1,
     213             :   &fd_action_configure,
     214             :   &fd_action_monitor,
     215             :   &fd_action_keys,
     216             :   &fd_action_ready,
     217             :   &fd_action_mem,
     218             :   &fd_action_netconf,
     219             :   &fd_action_set_identity,
     220             :   &fd_action_help,
     221             :   &fd_action_metrics,
     222             :   &fd_action_metrics_record,
     223             :   &fd_action_version,
     224             :   &fd_action_bench,
     225             :   &fd_action_bundle_client,
     226             :   &fd_action_dev,
     227             :   &fd_action_dump,
     228             :   &fd_action_flame,
     229             :   &fd_action_load,
     230             :   &fd_action_pktgen,
     231             :   &fd_action_quic_trace,
     232             :   &fd_action_txn,
     233             :   &fd_action_udpecho,
     234             :   &fd_action_wksp,
     235             :   &fd_action_gossip,
     236             :   &fd_action_sim,
     237             :   &fd_action_backtest,
     238             :   &fd_action_snapshot_load,
     239             :   &fd_action_repair,
     240             :   &fd_action_tower,
     241             :   &fd_action_shred_version,
     242             :   &fd_action_ipecho_server,
     243             :   &fd_action_send_test,
     244             :   &fd_action_gossip_dump,
     245             :   &fd_action_watch,
     246             :   NULL,
     247             : };
     248             : 
     249             : int
     250             : main( int     argc,
     251           9 :       char ** argv ) {
     252           9 :   fd_config_file_t _default = fd_config_file_default();
     253           9 :   fd_config_file_t testnet = fd_config_file_testnet();
     254           9 :   fd_config_file_t devnet = fd_config_file_devnet();
     255           9 :   fd_config_file_t mainnet = fd_config_file_mainnet();
     256           9 :   fd_config_file_t testnet_jito = fd_config_file_testnet_jito();
     257           9 :   fd_config_file_t mainnet_jito = fd_config_file_mainnet_jito();
     258             : 
     259           9 :   fd_config_file_t * configs[] = {
     260           9 :     &_default,
     261           9 :     &testnet,
     262           9 :     &devnet,
     263           9 :     &mainnet,
     264           9 :     &testnet_jito,
     265           9 :     &mainnet_jito,
     266           9 :     NULL
     267           9 :   };
     268             : 
     269           9 :   return fd_dev_main( argc, argv, 1, configs, fd_topo_initialize );
     270           9 : }

Generated by: LCOV version 1.14