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_offloads,
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_send;
97 : extern fd_topo_run_tile_t fd_tile_tower;
98 : extern fd_topo_run_tile_t fd_tile_rpcserv;
99 : extern fd_topo_run_tile_t fd_tile_backtest;
100 : extern fd_topo_run_tile_t fd_tile_archiver_feeder;
101 : extern fd_topo_run_tile_t fd_tile_archiver_writer;
102 : extern fd_topo_run_tile_t fd_tile_archiver_playback;
103 : extern fd_topo_run_tile_t fd_tile_shredcap;
104 :
105 : extern fd_topo_run_tile_t fd_tile_snaprd;
106 : extern fd_topo_run_tile_t fd_tile_snapdc;
107 : extern fd_topo_run_tile_t fd_tile_snapin;
108 :
109 : fd_topo_run_tile_t * TILES[] = {
110 : &fd_tile_net,
111 : &fd_tile_netlnk,
112 : &fd_tile_sock,
113 : &fd_tile_quic,
114 : &fd_tile_verify,
115 : &fd_tile_dedup,
116 : &fd_tile_resolv,
117 : &fd_tile_pack,
118 : &fd_tile_bank,
119 : &fd_tile_shred,
120 : &fd_tile_sign,
121 : &fd_tile_metric,
122 : &fd_tile_cswtch,
123 : &fd_tile_gui,
124 : &fd_tile_plugin,
125 : &fd_tile_bencho,
126 : &fd_tile_benchg,
127 : &fd_tile_benchs,
128 : &fd_tile_bundle,
129 : &fd_tile_gossvf,
130 : &fd_tile_gossip,
131 : &fd_tile_repair,
132 : &fd_tile_replay,
133 : &fd_tile_execor,
134 : &fd_tile_poh,
135 : &fd_tile_send,
136 : &fd_tile_tower,
137 : &fd_tile_rpcserv,
138 : &fd_tile_archiver_feeder,
139 : &fd_tile_archiver_writer,
140 : &fd_tile_archiver_playback,
141 : &fd_tile_shredcap,
142 : #if FD_HAS_ROCKSDB
143 : &fd_tile_backtest,
144 : #endif
145 : &fd_tile_bencho,
146 : &fd_tile_benchg,
147 : &fd_tile_benchs,
148 : &fd_tile_pktgen,
149 : &fd_tile_udpecho,
150 : &fd_tile_snaprd,
151 : &fd_tile_snapdc,
152 : &fd_tile_snapin,
153 : &fd_tile_genesi,
154 : &fd_tile_ipecho,
155 : NULL,
156 : };
157 :
158 : extern action_t fd_action_run;
159 : extern action_t fd_action_run1;
160 : extern action_t fd_action_configure;
161 : extern action_t fd_action_monitor;
162 : extern action_t fd_action_keys;
163 : extern action_t fd_action_ready;
164 : extern action_t fd_action_mem;
165 : extern action_t fd_action_netconf;
166 : extern action_t fd_action_set_identity;
167 : extern action_t fd_action_version;
168 : extern action_t fd_action_bench;
169 : extern action_t fd_action_bundle_client;
170 : extern action_t fd_action_dev;
171 : extern action_t fd_action_dump;
172 : extern action_t fd_action_flame;
173 : extern action_t fd_action_help;
174 : extern action_t fd_action_metrics;
175 : extern action_t fd_action_load;
176 : extern action_t fd_action_pktgen;
177 : extern action_t fd_action_quic_trace;
178 : extern action_t fd_action_txn;
179 : extern action_t fd_action_udpecho;
180 : extern action_t fd_action_wksp;
181 : extern action_t fd_action_gossip;
182 : extern action_t fd_action_sim;
183 : extern action_t fd_action_backtest;
184 : extern action_t fd_action_snapshot_load;
185 : extern action_t fd_action_repair;
186 : extern action_t fd_action_shred_version;
187 : extern action_t fd_action_ipecho_server;
188 : extern action_t fd_action_send_test;
189 : extern action_t fd_action_gossip_dump;
190 :
191 : action_t * ACTIONS[] = {
192 : &fd_action_run,
193 : &fd_action_run1,
194 : &fd_action_configure,
195 : &fd_action_monitor,
196 : &fd_action_keys,
197 : &fd_action_ready,
198 : &fd_action_mem,
199 : &fd_action_netconf,
200 : &fd_action_set_identity,
201 : &fd_action_help,
202 : &fd_action_metrics,
203 : &fd_action_version,
204 : &fd_action_bench,
205 : &fd_action_bundle_client,
206 : &fd_action_dev,
207 : &fd_action_dump,
208 : &fd_action_flame,
209 : &fd_action_load,
210 : &fd_action_pktgen,
211 : &fd_action_quic_trace,
212 : &fd_action_txn,
213 : &fd_action_udpecho,
214 : &fd_action_wksp,
215 : &fd_action_gossip,
216 : &fd_action_sim,
217 : &fd_action_backtest,
218 : &fd_action_snapshot_load,
219 : &fd_action_repair,
220 : &fd_action_shred_version,
221 : &fd_action_ipecho_server,
222 : &fd_action_send_test,
223 : &fd_action_gossip_dump,
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 : }
|