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 : extern fd_topo_run_tile_t fd_tile_solcap;
112 :
113 : extern fd_topo_run_tile_t fd_tile_snapct;
114 : extern fd_topo_run_tile_t fd_tile_snapld;
115 : extern fd_topo_run_tile_t fd_tile_snapdc;
116 : extern fd_topo_run_tile_t fd_tile_snapin;
117 : extern fd_topo_run_tile_t fd_tile_snapwh;
118 : extern fd_topo_run_tile_t fd_tile_snapwr;
119 : extern fd_topo_run_tile_t fd_tile_snapla;
120 : extern fd_topo_run_tile_t fd_tile_snapls;
121 :
122 : fd_topo_run_tile_t * TILES[] = {
123 : &fd_tile_net,
124 : &fd_tile_netlnk,
125 : &fd_tile_sock,
126 : &fd_tile_quic,
127 : &fd_tile_verify,
128 : &fd_tile_dedup,
129 : &fd_tile_resolv,
130 : &fd_tile_pack,
131 : &fd_tile_bank,
132 : &fd_tile_shred,
133 : &fd_tile_sign,
134 : &fd_tile_metric,
135 : &fd_tile_cswtch,
136 : &fd_tile_gui,
137 : &fd_tile_rpc,
138 : &fd_tile_plugin,
139 : &fd_tile_bencho,
140 : &fd_tile_benchg,
141 : &fd_tile_benchs,
142 : &fd_tile_bundle,
143 : &fd_tile_gossvf,
144 : &fd_tile_gossip,
145 : &fd_tile_repair,
146 : &fd_tile_replay,
147 : &fd_tile_execor,
148 : &fd_tile_poh,
149 : &fd_tile_send,
150 : &fd_tile_tower,
151 : &fd_tile_archiver_feeder,
152 : &fd_tile_archiver_writer,
153 : &fd_tile_archiver_playback,
154 : &fd_tile_shredcap,
155 : &fd_tile_backtest,
156 : &fd_tile_bencho,
157 : &fd_tile_benchg,
158 : &fd_tile_benchs,
159 : &fd_tile_pktgen,
160 : &fd_tile_udpecho,
161 : &fd_tile_snapct,
162 : &fd_tile_snapld,
163 : &fd_tile_snapdc,
164 : &fd_tile_snapin,
165 : &fd_tile_snapwh,
166 : &fd_tile_snapwr,
167 : &fd_tile_snapla,
168 : &fd_tile_snapls,
169 : # if FD_HAS_BZIP2
170 : &fd_tile_genesi,
171 : # endif
172 : &fd_tile_ipecho,
173 : &fd_tile_vinyl,
174 : &fd_tile_solcap,
175 : NULL,
176 : };
177 :
178 : extern action_t fd_action_run;
179 : extern action_t fd_action_run1;
180 : extern action_t fd_action_configure;
181 : extern action_t fd_action_monitor;
182 : extern action_t fd_action_keys;
183 : extern action_t fd_action_ready;
184 : extern action_t fd_action_mem;
185 : extern action_t fd_action_netconf;
186 : extern action_t fd_action_set_identity;
187 : extern action_t fd_action_version;
188 : extern action_t fd_action_bench;
189 : extern action_t fd_action_bundle_client;
190 : extern action_t fd_action_dev;
191 : extern action_t fd_action_dump;
192 : extern action_t fd_action_flame;
193 : extern action_t fd_action_help;
194 : extern action_t fd_action_metrics;
195 : extern action_t fd_action_metrics_record;
196 : extern action_t fd_action_load;
197 : extern action_t fd_action_pktgen;
198 : extern action_t fd_action_quic_trace;
199 : extern action_t fd_action_txn;
200 : extern action_t fd_action_udpecho;
201 : extern action_t fd_action_wksp;
202 : extern action_t fd_action_gossip;
203 : extern action_t fd_action_sim;
204 : extern action_t fd_action_backtest;
205 : extern action_t fd_action_snapshot_load;
206 : extern action_t fd_action_repair;
207 : extern action_t fd_action_tower;
208 : extern action_t fd_action_shred_version;
209 : extern action_t fd_action_ipecho_server;
210 : extern action_t fd_action_send_test;
211 : extern action_t fd_action_gossip_dump;
212 : extern action_t fd_action_watch;
213 :
214 : action_t * ACTIONS[] = {
215 : &fd_action_run,
216 : &fd_action_run1,
217 : &fd_action_configure,
218 : &fd_action_monitor,
219 : &fd_action_keys,
220 : &fd_action_ready,
221 : &fd_action_mem,
222 : &fd_action_netconf,
223 : &fd_action_set_identity,
224 : &fd_action_help,
225 : &fd_action_metrics,
226 : &fd_action_metrics_record,
227 : &fd_action_version,
228 : &fd_action_bench,
229 : &fd_action_bundle_client,
230 : &fd_action_dev,
231 : &fd_action_dump,
232 : &fd_action_flame,
233 : &fd_action_load,
234 : &fd_action_pktgen,
235 : &fd_action_quic_trace,
236 : &fd_action_txn,
237 : &fd_action_udpecho,
238 : &fd_action_wksp,
239 : &fd_action_gossip,
240 : &fd_action_sim,
241 : &fd_action_backtest,
242 : &fd_action_snapshot_load,
243 : &fd_action_repair,
244 : &fd_action_tower,
245 : &fd_action_shred_version,
246 : &fd_action_ipecho_server,
247 : &fd_action_send_test,
248 : &fd_action_gossip_dump,
249 : &fd_action_watch,
250 : NULL,
251 : };
252 :
253 : int
254 : main( int argc,
255 9 : char ** argv ) {
256 9 : fd_config_file_t _default = fd_config_file_default();
257 9 : fd_config_file_t testnet = fd_config_file_testnet();
258 9 : fd_config_file_t devnet = fd_config_file_devnet();
259 9 : fd_config_file_t mainnet = fd_config_file_mainnet();
260 9 : fd_config_file_t testnet_jito = fd_config_file_testnet_jito();
261 9 : fd_config_file_t mainnet_jito = fd_config_file_mainnet_jito();
262 :
263 9 : fd_config_file_t * configs[] = {
264 9 : &_default,
265 9 : &testnet,
266 9 : &devnet,
267 9 : &mainnet,
268 9 : &testnet_jito,
269 9 : &mainnet_jito,
270 9 : NULL
271 9 : };
272 :
273 9 : return fd_dev_main( argc, argv, 1, configs, fd_topo_initialize );
274 9 : }
|