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_sysctl,
55 : &fd_cfg_stage_ethtool_channels,
56 : &fd_cfg_stage_ethtool_offloads,
57 : &fd_cfg_stage_ethtool_loopback,
58 : &fd_cfg_stage_keys,
59 : &fd_cfg_stage_genesis,
60 : &fd_cfg_stage_snapshots,
61 : NULL,
62 : };
63 :
64 :
65 : extern fd_topo_run_tile_t fd_tile_net;
66 : extern fd_topo_run_tile_t fd_tile_netlnk;
67 : extern fd_topo_run_tile_t fd_tile_sock;
68 : extern fd_topo_run_tile_t fd_tile_quic;
69 : extern fd_topo_run_tile_t fd_tile_verify;
70 : extern fd_topo_run_tile_t fd_tile_dedup;
71 : extern fd_topo_run_tile_t fd_tile_resolv;
72 : extern fd_topo_run_tile_t fd_tile_pack;
73 : extern fd_topo_run_tile_t fd_tile_bank;
74 : extern fd_topo_run_tile_t fd_tile_poh;
75 : extern fd_topo_run_tile_t fd_tile_shred;
76 : extern fd_topo_run_tile_t fd_tile_sign;
77 : extern fd_topo_run_tile_t fd_tile_metric;
78 : extern fd_topo_run_tile_t fd_tile_cswtch;
79 : extern fd_topo_run_tile_t fd_tile_gui;
80 : extern fd_topo_run_tile_t fd_tile_plugin;
81 : extern fd_topo_run_tile_t fd_tile_bencho;
82 : extern fd_topo_run_tile_t fd_tile_benchg;
83 : extern fd_topo_run_tile_t fd_tile_benchs;
84 : extern fd_topo_run_tile_t fd_tile_bundle;
85 : extern fd_topo_run_tile_t fd_tile_pktgen;
86 : extern fd_topo_run_tile_t fd_tile_udpecho;
87 : extern fd_topo_run_tile_t fd_tile_genesi;
88 : extern fd_topo_run_tile_t fd_tile_ipecho;
89 :
90 : extern fd_topo_run_tile_t fd_tile_gossvf;
91 : extern fd_topo_run_tile_t fd_tile_gossip;
92 : extern fd_topo_run_tile_t fd_tile_repair;
93 : extern fd_topo_run_tile_t fd_tile_replay;
94 : extern fd_topo_run_tile_t fd_tile_execor;
95 : extern fd_topo_run_tile_t fd_tile_send;
96 : extern fd_topo_run_tile_t fd_tile_tower;
97 : extern fd_topo_run_tile_t fd_tile_rpcserv;
98 : extern fd_topo_run_tile_t fd_tile_backtest;
99 : extern fd_topo_run_tile_t fd_tile_archiver_feeder;
100 : extern fd_topo_run_tile_t fd_tile_archiver_writer;
101 : extern fd_topo_run_tile_t fd_tile_archiver_playback;
102 : extern fd_topo_run_tile_t fd_tile_shredcap;
103 :
104 : extern fd_topo_run_tile_t fd_tile_snapct;
105 : extern fd_topo_run_tile_t fd_tile_snapld;
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_snapct,
151 : &fd_tile_snapld,
152 : &fd_tile_snapdc,
153 : &fd_tile_snapin,
154 : &fd_tile_genesi,
155 : &fd_tile_ipecho,
156 : NULL,
157 : };
158 :
159 : extern action_t fd_action_run;
160 : extern action_t fd_action_run1;
161 : extern action_t fd_action_configure;
162 : extern action_t fd_action_monitor;
163 : extern action_t fd_action_keys;
164 : extern action_t fd_action_ready;
165 : extern action_t fd_action_mem;
166 : extern action_t fd_action_netconf;
167 : extern action_t fd_action_set_identity;
168 : extern action_t fd_action_version;
169 : extern action_t fd_action_bench;
170 : extern action_t fd_action_bundle_client;
171 : extern action_t fd_action_dev;
172 : extern action_t fd_action_dump;
173 : extern action_t fd_action_flame;
174 : extern action_t fd_action_help;
175 : extern action_t fd_action_metrics;
176 : extern action_t fd_action_load;
177 : extern action_t fd_action_pktgen;
178 : extern action_t fd_action_quic_trace;
179 : extern action_t fd_action_txn;
180 : extern action_t fd_action_udpecho;
181 : extern action_t fd_action_wksp;
182 : extern action_t fd_action_gossip;
183 : extern action_t fd_action_sim;
184 : extern action_t fd_action_backtest;
185 : extern action_t fd_action_snapshot_load;
186 : extern action_t fd_action_repair;
187 : extern action_t fd_action_shred_version;
188 : extern action_t fd_action_ipecho_server;
189 : extern action_t fd_action_send_test;
190 : extern action_t fd_action_gossip_dump;
191 : extern action_t fd_action_watch;
192 :
193 : action_t * ACTIONS[] = {
194 : &fd_action_run,
195 : &fd_action_run1,
196 : &fd_action_configure,
197 : &fd_action_monitor,
198 : &fd_action_keys,
199 : &fd_action_ready,
200 : &fd_action_mem,
201 : &fd_action_netconf,
202 : &fd_action_set_identity,
203 : &fd_action_help,
204 : &fd_action_metrics,
205 : &fd_action_version,
206 : &fd_action_bench,
207 : &fd_action_bundle_client,
208 : &fd_action_dev,
209 : &fd_action_dump,
210 : &fd_action_flame,
211 : &fd_action_load,
212 : &fd_action_pktgen,
213 : &fd_action_quic_trace,
214 : &fd_action_txn,
215 : &fd_action_udpecho,
216 : &fd_action_wksp,
217 : &fd_action_gossip,
218 : &fd_action_sim,
219 : &fd_action_backtest,
220 : &fd_action_snapshot_load,
221 : &fd_action_repair,
222 : &fd_action_shred_version,
223 : &fd_action_ipecho_server,
224 : &fd_action_send_test,
225 : &fd_action_gossip_dump,
226 : &fd_action_watch,
227 : NULL,
228 : };
229 :
230 : int
231 : main( int argc,
232 12 : char ** argv ) {
233 12 : fd_config_file_t _default = fd_config_file_default();
234 12 : fd_config_file_t testnet = fd_config_file_testnet();
235 12 : fd_config_file_t devnet = fd_config_file_devnet();
236 12 : fd_config_file_t mainnet = fd_config_file_mainnet();
237 :
238 12 : fd_config_file_t * configs[] = {
239 12 : &_default,
240 12 : &testnet,
241 12 : &devnet,
242 12 : &mainnet,
243 12 : NULL
244 12 : };
245 :
246 12 : return fd_dev_main( argc, argv, 1, configs, fd_topo_initialize );
247 12 : }
|