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_banks_locks;
26 : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
27 : extern fd_topo_obj_callbacks_t fd_obj_cb_acc_pool;
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 :
36 : fd_topo_obj_callbacks_t * CALLBACKS[] = {
37 : &fd_obj_cb_mcache,
38 : &fd_obj_cb_dcache,
39 : &fd_obj_cb_fseq,
40 : &fd_obj_cb_metrics,
41 : &fd_obj_cb_cnc,
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_vinyl_meta,
54 : &fd_obj_cb_vinyl_meta_ele,
55 : &fd_obj_cb_vinyl_data,
56 : &fd_obj_cb_acc_pool,
57 : &fd_obj_cb_vinyl_req_pool,
58 : &fd_obj_cb_vinyl_rq,
59 : &fd_obj_cb_vinyl_cq,
60 : NULL,
61 : };
62 :
63 : extern configure_stage_t fd_cfg_stage_accdb;
64 :
65 : configure_stage_t * STAGES[] = {
66 : &fd_cfg_stage_kill,
67 : &fd_cfg_stage_netns,
68 : &fd_cfg_stage_hugetlbfs,
69 : &fd_cfg_stage_sysctl,
70 : &fd_cfg_stage_bonding,
71 : &fd_cfg_stage_ethtool_channels,
72 : &fd_cfg_stage_ethtool_offloads,
73 : &fd_cfg_stage_ethtool_loopback,
74 : &fd_cfg_stage_keys,
75 : &fd_cfg_stage_genesis,
76 : &fd_cfg_stage_snapshots,
77 : &fd_cfg_stage_accdb,
78 : NULL,
79 : };
80 :
81 :
82 : extern fd_topo_run_tile_t fd_tile_net;
83 : extern fd_topo_run_tile_t fd_tile_netlnk;
84 : extern fd_topo_run_tile_t fd_tile_sock;
85 : extern fd_topo_run_tile_t fd_tile_quic;
86 : extern fd_topo_run_tile_t fd_tile_verify;
87 : extern fd_topo_run_tile_t fd_tile_dedup;
88 : extern fd_topo_run_tile_t fd_tile_resolv;
89 : extern fd_topo_run_tile_t fd_tile_pack;
90 : extern fd_topo_run_tile_t fd_tile_bank;
91 : extern fd_topo_run_tile_t fd_tile_poh;
92 : extern fd_topo_run_tile_t fd_tile_shred;
93 : extern fd_topo_run_tile_t fd_tile_sign;
94 : extern fd_topo_run_tile_t fd_tile_metric;
95 : extern fd_topo_run_tile_t fd_tile_diag;
96 : extern fd_topo_run_tile_t fd_tile_gui;
97 : extern fd_topo_run_tile_t fd_tile_rpc;
98 : extern fd_topo_run_tile_t fd_tile_plugin;
99 : extern fd_topo_run_tile_t fd_tile_bencho;
100 : extern fd_topo_run_tile_t fd_tile_benchg;
101 : extern fd_topo_run_tile_t fd_tile_benchs;
102 : extern fd_topo_run_tile_t fd_tile_bundle;
103 : extern fd_topo_run_tile_t fd_tile_pktgen;
104 : extern fd_topo_run_tile_t fd_tile_udpecho;
105 : extern fd_topo_run_tile_t fd_tile_genesi;
106 : extern fd_topo_run_tile_t fd_tile_ipecho;
107 :
108 : extern fd_topo_run_tile_t fd_tile_gossvf;
109 : extern fd_topo_run_tile_t fd_tile_gossip;
110 : extern fd_topo_run_tile_t fd_tile_repair;
111 : extern fd_topo_run_tile_t fd_tile_replay;
112 : extern fd_topo_run_tile_t fd_tile_execor;
113 : extern fd_topo_run_tile_t fd_tile_send;
114 : extern fd_topo_run_tile_t fd_tile_tower;
115 : extern fd_topo_run_tile_t fd_tile_backtest;
116 : extern fd_topo_run_tile_t fd_tile_archiver_feeder;
117 : extern fd_topo_run_tile_t fd_tile_archiver_writer;
118 : extern fd_topo_run_tile_t fd_tile_archiver_playback;
119 : extern fd_topo_run_tile_t fd_tile_shredcap;
120 : extern fd_topo_run_tile_t fd_tile_vinyl;
121 : extern fd_topo_run_tile_t fd_tile_solcap;
122 :
123 : extern fd_topo_run_tile_t fd_tile_snapct;
124 : extern fd_topo_run_tile_t fd_tile_snapld;
125 : extern fd_topo_run_tile_t fd_tile_snapdc;
126 : extern fd_topo_run_tile_t fd_tile_snapin;
127 : extern fd_topo_run_tile_t fd_tile_snapwm;
128 : extern fd_topo_run_tile_t fd_tile_snapwh;
129 : extern fd_topo_run_tile_t fd_tile_snapwr;
130 : extern fd_topo_run_tile_t fd_tile_snapla;
131 : extern fd_topo_run_tile_t fd_tile_snapls;
132 : extern fd_topo_run_tile_t fd_tile_snaplh;
133 : extern fd_topo_run_tile_t fd_tile_snaplv;
134 :
135 : fd_topo_run_tile_t * TILES[] = {
136 : &fd_tile_net,
137 : &fd_tile_netlnk,
138 : &fd_tile_sock,
139 : &fd_tile_quic,
140 : &fd_tile_verify,
141 : &fd_tile_dedup,
142 : &fd_tile_resolv,
143 : &fd_tile_pack,
144 : &fd_tile_bank,
145 : &fd_tile_shred,
146 : &fd_tile_sign,
147 : &fd_tile_metric,
148 : &fd_tile_diag,
149 : &fd_tile_gui,
150 : &fd_tile_rpc,
151 : &fd_tile_plugin,
152 : &fd_tile_bencho,
153 : &fd_tile_benchg,
154 : &fd_tile_benchs,
155 : &fd_tile_bundle,
156 : &fd_tile_gossvf,
157 : &fd_tile_gossip,
158 : &fd_tile_repair,
159 : &fd_tile_replay,
160 : &fd_tile_execor,
161 : &fd_tile_poh,
162 : &fd_tile_send,
163 : &fd_tile_tower,
164 : &fd_tile_archiver_feeder,
165 : &fd_tile_archiver_writer,
166 : &fd_tile_archiver_playback,
167 : &fd_tile_shredcap,
168 : &fd_tile_backtest,
169 : &fd_tile_bencho,
170 : &fd_tile_benchg,
171 : &fd_tile_benchs,
172 : &fd_tile_pktgen,
173 : &fd_tile_udpecho,
174 : &fd_tile_snapct,
175 : &fd_tile_snapld,
176 : &fd_tile_snapdc,
177 : &fd_tile_snapin,
178 : &fd_tile_snapwm,
179 : &fd_tile_snapwh,
180 : &fd_tile_snapwr,
181 : &fd_tile_snapla,
182 : &fd_tile_snapls,
183 : &fd_tile_snaplh,
184 : &fd_tile_snaplv,
185 : # if FD_HAS_BZIP2
186 : &fd_tile_genesi,
187 : # endif
188 : &fd_tile_ipecho,
189 : &fd_tile_vinyl,
190 : &fd_tile_solcap,
191 : NULL,
192 : };
193 :
194 : extern action_t fd_action_run;
195 : extern action_t fd_action_run1;
196 : extern action_t fd_action_configure;
197 : extern action_t fd_action_monitor;
198 : extern action_t fd_action_keys;
199 : extern action_t fd_action_ready;
200 : extern action_t fd_action_mem;
201 : extern action_t fd_action_netconf;
202 : extern action_t fd_action_set_identity;
203 : extern action_t fd_action_version;
204 : extern action_t fd_action_bench;
205 : extern action_t fd_action_bundle_client;
206 : extern action_t fd_action_dev;
207 : extern action_t fd_action_dump;
208 : extern action_t fd_action_flame;
209 : extern action_t fd_action_help;
210 : extern action_t fd_action_metrics;
211 : extern action_t fd_action_metrics_record;
212 : extern action_t fd_action_load;
213 : extern action_t fd_action_pktgen;
214 : extern action_t fd_action_quic_trace;
215 : extern action_t fd_action_txn;
216 : extern action_t fd_action_udpecho;
217 : extern action_t fd_action_wksp;
218 : extern action_t fd_action_gossip;
219 : extern action_t fd_action_sim;
220 : extern action_t fd_action_backtest;
221 : extern action_t fd_action_snapshot_load;
222 : extern action_t fd_action_repair;
223 : extern action_t fd_action_tower;
224 : extern action_t fd_action_shred_version;
225 : extern action_t fd_action_ipecho_server;
226 : extern action_t fd_action_send_test;
227 : extern action_t fd_action_gossip_dump;
228 : extern action_t fd_action_watch;
229 :
230 : action_t * ACTIONS[] = {
231 : &fd_action_run,
232 : &fd_action_run1,
233 : &fd_action_configure,
234 : &fd_action_monitor,
235 : &fd_action_keys,
236 : &fd_action_ready,
237 : &fd_action_mem,
238 : &fd_action_netconf,
239 : &fd_action_set_identity,
240 : &fd_action_help,
241 : &fd_action_metrics,
242 : &fd_action_metrics_record,
243 : &fd_action_version,
244 : &fd_action_bench,
245 : &fd_action_bundle_client,
246 : &fd_action_dev,
247 : &fd_action_dump,
248 : &fd_action_flame,
249 : &fd_action_load,
250 : &fd_action_pktgen,
251 : &fd_action_quic_trace,
252 : &fd_action_txn,
253 : &fd_action_udpecho,
254 : &fd_action_wksp,
255 : &fd_action_gossip,
256 : &fd_action_sim,
257 : &fd_action_backtest,
258 : &fd_action_snapshot_load,
259 : &fd_action_repair,
260 : &fd_action_tower,
261 : &fd_action_shred_version,
262 : &fd_action_ipecho_server,
263 : &fd_action_send_test,
264 : &fd_action_gossip_dump,
265 : &fd_action_watch,
266 : NULL,
267 : };
268 :
269 : int
270 : main( int argc,
271 9 : char ** argv ) {
272 9 : fd_config_file_t _default = fd_config_file_default();
273 9 : fd_config_file_t testnet = fd_config_file_testnet();
274 9 : fd_config_file_t devnet = fd_config_file_devnet();
275 9 : fd_config_file_t mainnet = fd_config_file_mainnet();
276 9 : fd_config_file_t testnet_jito = fd_config_file_testnet_jito();
277 9 : fd_config_file_t mainnet_jito = fd_config_file_mainnet_jito();
278 :
279 9 : fd_config_file_t * configs[] = {
280 9 : &_default,
281 9 : &testnet,
282 9 : &devnet,
283 9 : &mainnet,
284 9 : &testnet_jito,
285 9 : &mainnet_jito,
286 9 : NULL
287 9 : };
288 :
289 9 : return fd_dev_main( argc, argv, 1, configs, fd_topo_initialize );
290 9 : }
|