LCOV - code coverage report
Current view: top level - app/firedancer-dev - main.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 14 14 100.0 %
Date: 2025-09-18 04:41:32 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_opaque;
      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_exec_spad;
      25             : extern fd_topo_obj_callbacks_t fd_obj_cb_banks;
      26             : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
      27             : extern fd_topo_obj_callbacks_t fd_obj_cb_bank_hash_cmp;
      28             : 
      29             : fd_topo_obj_callbacks_t * CALLBACKS[] = {
      30             :   &fd_obj_cb_mcache,
      31             :   &fd_obj_cb_dcache,
      32             :   &fd_obj_cb_fseq,
      33             :   &fd_obj_cb_metrics,
      34             :   &fd_obj_cb_opaque,
      35             :   &fd_obj_cb_dbl_buf,
      36             :   &fd_obj_cb_neigh4_hmap,
      37             :   &fd_obj_cb_fib4,
      38             :   &fd_obj_cb_keyswitch,
      39             :   &fd_obj_cb_tile,
      40             :   &fd_obj_cb_store,
      41             :   &fd_obj_cb_fec_sets,
      42             :   &fd_obj_cb_txncache,
      43             :   &fd_obj_cb_exec_spad,
      44             :   &fd_obj_cb_banks,
      45             :   &fd_obj_cb_funk,
      46             :   &fd_obj_cb_bank_hash_cmp,
      47             :   NULL,
      48             : };
      49             : 
      50             : configure_stage_t * STAGES[] = {
      51             :   &fd_cfg_stage_kill,
      52             :   &fd_cfg_stage_netns,
      53             :   &fd_cfg_stage_hugetlbfs,
      54             :   &fd_cfg_stage_normalpage,
      55             :   &fd_cfg_stage_sysctl,
      56             :   &fd_cfg_stage_ethtool_channels,
      57             :   &fd_cfg_stage_ethtool_gro,
      58             :   &fd_cfg_stage_ethtool_loopback,
      59             :   &fd_cfg_stage_keys,
      60             :   &fd_cfg_stage_genesis,
      61             :   &fd_cfg_stage_snapshots,
      62             :   NULL,
      63             : };
      64             : 
      65             : 
      66             : extern fd_topo_run_tile_t fd_tile_net;
      67             : extern fd_topo_run_tile_t fd_tile_netlnk;
      68             : extern fd_topo_run_tile_t fd_tile_sock;
      69             : extern fd_topo_run_tile_t fd_tile_quic;
      70             : extern fd_topo_run_tile_t fd_tile_verify;
      71             : extern fd_topo_run_tile_t fd_tile_dedup;
      72             : extern fd_topo_run_tile_t fd_tile_resolv;
      73             : extern fd_topo_run_tile_t fd_tile_pack;
      74             : extern fd_topo_run_tile_t fd_tile_bank;
      75             : extern fd_topo_run_tile_t fd_tile_poh;
      76             : extern fd_topo_run_tile_t fd_tile_shred;
      77             : extern fd_topo_run_tile_t fd_tile_sign;
      78             : extern fd_topo_run_tile_t fd_tile_metric;
      79             : extern fd_topo_run_tile_t fd_tile_cswtch;
      80             : extern fd_topo_run_tile_t fd_tile_gui;
      81             : extern fd_topo_run_tile_t fd_tile_plugin;
      82             : extern fd_topo_run_tile_t fd_tile_bencho;
      83             : extern fd_topo_run_tile_t fd_tile_benchg;
      84             : extern fd_topo_run_tile_t fd_tile_benchs;
      85             : extern fd_topo_run_tile_t fd_tile_bundle;
      86             : extern fd_topo_run_tile_t fd_tile_pktgen;
      87             : extern fd_topo_run_tile_t fd_tile_udpecho;
      88             : extern fd_topo_run_tile_t fd_tile_genesi;
      89             : extern fd_topo_run_tile_t fd_tile_ipecho;
      90             : 
      91             : extern fd_topo_run_tile_t fd_tile_gossvf;
      92             : extern fd_topo_run_tile_t fd_tile_gossip;
      93             : extern fd_topo_run_tile_t fd_tile_repair;
      94             : extern fd_topo_run_tile_t fd_tile_replay;
      95             : extern fd_topo_run_tile_t fd_tile_execor;
      96             : extern fd_topo_run_tile_t fd_tile_writer;
      97             : extern fd_topo_run_tile_t fd_tile_send;
      98             : extern fd_topo_run_tile_t fd_tile_tower;
      99             : extern fd_topo_run_tile_t fd_tile_rpcserv;
     100             : extern fd_topo_run_tile_t fd_tile_backtest;
     101             : extern fd_topo_run_tile_t fd_tile_archiver_feeder;
     102             : extern fd_topo_run_tile_t fd_tile_archiver_writer;
     103             : extern fd_topo_run_tile_t fd_tile_archiver_playback;
     104             : extern fd_topo_run_tile_t fd_tile_shredcap;
     105             : 
     106             : extern fd_topo_run_tile_t fd_tile_snaprd;
     107             : extern fd_topo_run_tile_t fd_tile_snapdc;
     108             : extern fd_topo_run_tile_t fd_tile_snapin;
     109             : 
     110             : fd_topo_run_tile_t * TILES[] = {
     111             :   &fd_tile_net,
     112             :   &fd_tile_netlnk,
     113             :   &fd_tile_sock,
     114             :   &fd_tile_quic,
     115             :   &fd_tile_verify,
     116             :   &fd_tile_dedup,
     117             :   &fd_tile_resolv,
     118             :   &fd_tile_pack,
     119             :   &fd_tile_bank,
     120             :   &fd_tile_shred,
     121             :   &fd_tile_sign,
     122             :   &fd_tile_metric,
     123             :   &fd_tile_cswtch,
     124             :   &fd_tile_gui,
     125             :   &fd_tile_plugin,
     126             :   &fd_tile_bencho,
     127             :   &fd_tile_benchg,
     128             :   &fd_tile_benchs,
     129             :   &fd_tile_bundle,
     130             :   &fd_tile_gossvf,
     131             :   &fd_tile_gossip,
     132             :   &fd_tile_repair,
     133             :   &fd_tile_replay,
     134             :   &fd_tile_execor,
     135             :   &fd_tile_writer,
     136             :   &fd_tile_poh,
     137             :   &fd_tile_send,
     138             :   &fd_tile_tower,
     139             :   &fd_tile_rpcserv,
     140             :   &fd_tile_archiver_feeder,
     141             :   &fd_tile_archiver_writer,
     142             :   &fd_tile_archiver_playback,
     143             :   &fd_tile_shredcap,
     144             : #if FD_HAS_ROCKSDB
     145             :   &fd_tile_backtest,
     146             : #endif
     147             :   &fd_tile_bencho,
     148             :   &fd_tile_benchg,
     149             :   &fd_tile_benchs,
     150             :   &fd_tile_pktgen,
     151             :   &fd_tile_udpecho,
     152             :   &fd_tile_snaprd,
     153             :   &fd_tile_snapdc,
     154             :   &fd_tile_snapin,
     155             :   &fd_tile_genesi,
     156             :   &fd_tile_ipecho,
     157             :   NULL,
     158             : };
     159             : 
     160             : extern action_t fd_action_run;
     161             : extern action_t fd_action_run1;
     162             : extern action_t fd_action_configure;
     163             : extern action_t fd_action_monitor;
     164             : extern action_t fd_action_keys;
     165             : extern action_t fd_action_ready;
     166             : extern action_t fd_action_mem;
     167             : extern action_t fd_action_netconf;
     168             : extern action_t fd_action_set_identity;
     169             : extern action_t fd_action_version;
     170             : extern action_t fd_action_bench;
     171             : extern action_t fd_action_bundle_client;
     172             : extern action_t fd_action_dev;
     173             : extern action_t fd_action_dump;
     174             : extern action_t fd_action_flame;
     175             : extern action_t fd_action_help;
     176             : extern action_t fd_action_metrics;
     177             : extern action_t fd_action_load;
     178             : extern action_t fd_action_pktgen;
     179             : extern action_t fd_action_quic_trace;
     180             : extern action_t fd_action_txn;
     181             : extern action_t fd_action_udpecho;
     182             : extern action_t fd_action_wksp;
     183             : extern action_t fd_action_gossip;
     184             : extern action_t fd_action_sim;
     185             : extern action_t fd_action_backtest;
     186             : extern action_t fd_action_snapshot_load;
     187             : extern action_t fd_action_repair;
     188             : extern action_t fd_action_shred_version;
     189             : extern action_t fd_action_ipecho_server;
     190             : extern action_t fd_action_send_test;
     191             : 
     192             : action_t * ACTIONS[] = {
     193             :   &fd_action_run,
     194             :   &fd_action_run1,
     195             :   &fd_action_configure,
     196             :   &fd_action_monitor,
     197             :   &fd_action_keys,
     198             :   &fd_action_ready,
     199             :   &fd_action_mem,
     200             :   &fd_action_netconf,
     201             :   &fd_action_set_identity,
     202             :   &fd_action_help,
     203             :   &fd_action_metrics,
     204             :   &fd_action_version,
     205             :   &fd_action_bench,
     206             :   &fd_action_bundle_client,
     207             :   &fd_action_dev,
     208             :   &fd_action_dump,
     209             :   &fd_action_flame,
     210             :   &fd_action_load,
     211             :   &fd_action_pktgen,
     212             :   &fd_action_quic_trace,
     213             :   &fd_action_txn,
     214             :   &fd_action_udpecho,
     215             :   &fd_action_wksp,
     216             :   &fd_action_gossip,
     217             :   &fd_action_sim,
     218             :   &fd_action_backtest,
     219             :   &fd_action_snapshot_load,
     220             :   &fd_action_repair,
     221             :   &fd_action_shred_version,
     222             :   &fd_action_ipecho_server,
     223             :   &fd_action_send_test,
     224             :   NULL,
     225             : };
     226             : 
     227             : int
     228             : main( int     argc,
     229          12 :       char ** argv ) {
     230          12 :   fd_config_file_t _default = fd_config_file_default();
     231          12 :   fd_config_file_t testnet = fd_config_file_testnet();
     232          12 :   fd_config_file_t devnet = fd_config_file_devnet();
     233          12 :   fd_config_file_t mainnet = fd_config_file_mainnet();
     234             : 
     235          12 :   fd_config_file_t * configs[] = {
     236          12 :     &_default,
     237          12 :     &testnet,
     238          12 :     &devnet,
     239          12 :     &mainnet,
     240          12 :     NULL
     241          12 :   };
     242             : 
     243          12 :   return fd_dev_main( argc, argv, 1, configs, fd_topo_initialize );
     244          12 : }

Generated by: LCOV version 1.14