Line data Source code
1 : #include "topology.h"
2 : #include "config.h"
3 : #include "../shared/boot/fd_boot.h"
4 : #include "../shared/commands/configure/configure.h"
5 :
6 : char const * FD_APP_NAME = "Firedancer";
7 : char const * FD_BINARY_NAME = "firedancer";
8 :
9 : extern fd_topo_obj_callbacks_t fd_obj_cb_mcache;
10 : extern fd_topo_obj_callbacks_t fd_obj_cb_dcache;
11 : extern fd_topo_obj_callbacks_t fd_obj_cb_fseq;
12 : extern fd_topo_obj_callbacks_t fd_obj_cb_metrics;
13 : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
14 : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
15 : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
16 : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
17 : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
18 : extern fd_topo_obj_callbacks_t fd_obj_cb_store;
19 : extern fd_topo_obj_callbacks_t fd_obj_cb_fec_sets;
20 : extern fd_topo_obj_callbacks_t fd_obj_cb_txncache;
21 : extern fd_topo_obj_callbacks_t fd_obj_cb_banks;
22 : extern fd_topo_obj_callbacks_t fd_obj_cb_banks_locks;
23 : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
24 : extern fd_topo_obj_callbacks_t fd_obj_cb_acc_pool;
25 :
26 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_meta;
27 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_meta_ele;
28 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_data;
29 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_req_pool;
30 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_rq;
31 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_cq;
32 : extern fd_topo_obj_callbacks_t fd_obj_cb_vinyl_admin;
33 :
34 : fd_topo_obj_callbacks_t * CALLBACKS[] = {
35 : &fd_obj_cb_mcache,
36 : &fd_obj_cb_dcache,
37 : &fd_obj_cb_fseq,
38 : &fd_obj_cb_metrics,
39 : &fd_obj_cb_dbl_buf,
40 : &fd_obj_cb_neigh4_hmap,
41 : &fd_obj_cb_fib4,
42 : &fd_obj_cb_keyswitch,
43 : &fd_obj_cb_tile,
44 : &fd_obj_cb_store,
45 : &fd_obj_cb_fec_sets,
46 : &fd_obj_cb_txncache,
47 : &fd_obj_cb_banks,
48 : &fd_obj_cb_banks_locks,
49 : &fd_obj_cb_funk,
50 : &fd_obj_cb_acc_pool,
51 : &fd_obj_cb_vinyl_meta,
52 : &fd_obj_cb_vinyl_meta_ele,
53 : &fd_obj_cb_vinyl_data,
54 : &fd_obj_cb_acc_pool,
55 : &fd_obj_cb_vinyl_req_pool,
56 : &fd_obj_cb_vinyl_rq,
57 : &fd_obj_cb_vinyl_cq,
58 : &fd_obj_cb_vinyl_admin,
59 : NULL,
60 : };
61 :
62 : extern configure_stage_t fd_cfg_stage_accdb;
63 :
64 : configure_stage_t * STAGES[] = {
65 : &fd_cfg_stage_hugetlbfs,
66 : &fd_cfg_stage_sysctl,
67 : &fd_cfg_stage_bonding,
68 : &fd_cfg_stage_ethtool_channels,
69 : &fd_cfg_stage_ethtool_offloads,
70 : &fd_cfg_stage_ethtool_loopback,
71 : &fd_cfg_stage_snapshots,
72 : &fd_cfg_stage_accdb,
73 : NULL,
74 : };
75 :
76 :
77 : extern fd_topo_run_tile_t fd_tile_net;
78 : extern fd_topo_run_tile_t fd_tile_netlnk;
79 : extern fd_topo_run_tile_t fd_tile_sock;
80 : extern fd_topo_run_tile_t fd_tile_quic;
81 : extern fd_topo_run_tile_t fd_tile_verify;
82 : extern fd_topo_run_tile_t fd_tile_dedup;
83 : extern fd_topo_run_tile_t fd_tile_resolv;
84 : extern fd_topo_run_tile_t fd_tile_pack;
85 : extern fd_topo_run_tile_t fd_tile_execle;
86 : extern fd_topo_run_tile_t fd_tile_poh;
87 : extern fd_topo_run_tile_t fd_tile_shred;
88 : extern fd_topo_run_tile_t fd_tile_sign;
89 : extern fd_topo_run_tile_t fd_tile_metric;
90 : extern fd_topo_run_tile_t fd_tile_event;
91 : extern fd_topo_run_tile_t fd_tile_diag;
92 : extern fd_topo_run_tile_t fd_tile_gui;
93 : extern fd_topo_run_tile_t fd_tile_rpc;
94 : extern fd_topo_run_tile_t fd_tile_plugin;
95 : extern fd_topo_run_tile_t fd_tile_bundle;
96 : #if FD_HAS_BZIP2
97 : extern fd_topo_run_tile_t fd_tile_genesi;
98 : #endif
99 : extern fd_topo_run_tile_t fd_tile_ipecho;
100 :
101 : extern fd_topo_run_tile_t fd_tile_gossvf;
102 : extern fd_topo_run_tile_t fd_tile_gossip;
103 : extern fd_topo_run_tile_t fd_tile_repair;
104 : extern fd_topo_run_tile_t fd_tile_replay;
105 : extern fd_topo_run_tile_t fd_tile_execrp;
106 : extern fd_topo_run_tile_t fd_tile_txsend;
107 : extern fd_topo_run_tile_t fd_tile_tower;
108 : extern fd_topo_run_tile_t fd_tile_vinyl;
109 : extern fd_topo_run_tile_t fd_tile_solcap;
110 :
111 : extern fd_topo_run_tile_t fd_tile_snapct;
112 : extern fd_topo_run_tile_t fd_tile_snapld;
113 : extern fd_topo_run_tile_t fd_tile_snapdc;
114 : extern fd_topo_run_tile_t fd_tile_snapin;
115 : extern fd_topo_run_tile_t fd_tile_snapwm;
116 : extern fd_topo_run_tile_t fd_tile_snapwh;
117 : extern fd_topo_run_tile_t fd_tile_snapwr;
118 : extern fd_topo_run_tile_t fd_tile_snapla;
119 : extern fd_topo_run_tile_t fd_tile_snapls;
120 : extern fd_topo_run_tile_t fd_tile_snaplh;
121 : extern fd_topo_run_tile_t fd_tile_snaplv;
122 :
123 : fd_topo_run_tile_t * TILES[] = {
124 : &fd_tile_net,
125 : &fd_tile_netlnk,
126 : &fd_tile_sock,
127 : &fd_tile_quic,
128 : &fd_tile_verify,
129 : &fd_tile_dedup,
130 : &fd_tile_resolv,
131 : &fd_tile_pack,
132 : &fd_tile_execle,
133 : &fd_tile_shred,
134 : &fd_tile_sign,
135 : &fd_tile_metric,
136 : &fd_tile_event,
137 : &fd_tile_diag,
138 : &fd_tile_gui,
139 : &fd_tile_rpc,
140 : &fd_tile_plugin,
141 : &fd_tile_bundle,
142 : &fd_tile_gossvf,
143 : &fd_tile_gossip,
144 : &fd_tile_repair,
145 : &fd_tile_replay,
146 : &fd_tile_execrp,
147 : &fd_tile_poh,
148 : &fd_tile_txsend,
149 : &fd_tile_tower,
150 : &fd_tile_snapct,
151 : &fd_tile_snapld,
152 : &fd_tile_snapdc,
153 : &fd_tile_snapin,
154 : &fd_tile_snapwm,
155 : &fd_tile_snapwh,
156 : &fd_tile_snapwr,
157 : &fd_tile_snapla,
158 : &fd_tile_snapls,
159 : &fd_tile_snaplh,
160 : &fd_tile_snaplv,
161 : # if FD_HAS_BZIP2
162 : &fd_tile_genesi,
163 : # endif
164 : &fd_tile_ipecho,
165 : &fd_tile_vinyl,
166 : &fd_tile_solcap,
167 : NULL,
168 : };
169 :
170 : extern action_t fd_action_run;
171 : extern action_t fd_action_run1;
172 : extern action_t fd_action_configure;
173 : extern action_t fd_action_monitor;
174 : extern action_t fd_action_keys;
175 : extern action_t fd_action_ready;
176 : extern action_t fd_action_mem;
177 : extern action_t fd_action_netconf;
178 : extern action_t fd_action_set_identity;
179 : extern action_t fd_action_help;
180 : extern action_t fd_action_metrics;
181 : extern action_t fd_action_version;
182 : extern action_t fd_action_shred_version;
183 : extern action_t fd_action_watch;
184 :
185 : action_t * ACTIONS[] = {
186 : &fd_action_run,
187 : &fd_action_run1,
188 : &fd_action_configure,
189 : &fd_action_monitor,
190 : &fd_action_keys,
191 : &fd_action_ready,
192 : &fd_action_mem,
193 : &fd_action_netconf,
194 : &fd_action_set_identity,
195 : &fd_action_help,
196 : &fd_action_metrics,
197 : &fd_action_version,
198 : &fd_action_shred_version,
199 : &fd_action_watch,
200 : NULL,
201 : };
202 :
203 : int
204 : main( int argc,
205 9 : char ** argv ) {
206 9 : fd_config_file_t _default = fd_config_file_default();
207 9 : fd_config_file_t testnet = fd_config_file_testnet();
208 9 : fd_config_file_t devnet = fd_config_file_devnet();
209 9 : fd_config_file_t mainnet = fd_config_file_mainnet();
210 :
211 9 : fd_config_file_t * configs[] = {
212 9 : &_default,
213 9 : &testnet,
214 9 : &devnet,
215 9 : &mainnet,
216 9 : NULL
217 9 : };
218 :
219 9 : return fd_main( argc, argv, 1, configs, fd_topo_initialize );
220 9 : }
221 :
222 : /* Kind of a hack for now, we sometimes want to view bench generation
223 : in the monitor binary, but it's not part of the production binary. */
224 :
225 : void
226 : add_bench_topo( fd_topo_t * topo,
227 : char const * affinity,
228 : ulong benchg_tile_cnt,
229 : ulong benchs_tile_cnt,
230 : ulong accounts_cnt,
231 : int transaction_mode,
232 : float contending_fraction,
233 : float cu_price_spread,
234 : ulong conn_cnt,
235 : ushort send_to_port,
236 : uint send_to_ip_addr,
237 : ushort rpc_port,
238 : uint rpc_ip_addr,
239 : int no_quic,
240 0 : int reserve_agave_cores ) {
241 0 : (void)topo;
242 0 : (void)affinity;
243 0 : (void)benchg_tile_cnt;
244 0 : (void)benchs_tile_cnt;
245 0 : (void)accounts_cnt;
246 0 : (void)transaction_mode;
247 0 : (void)contending_fraction;
248 0 : (void)cu_price_spread;
249 0 : (void)conn_cnt;
250 0 : (void)send_to_port;
251 0 : (void)send_to_ip_addr;
252 0 : (void)rpc_port;
253 0 : (void)rpc_ip_addr;
254 0 : (void)no_quic;
255 0 : (void)reserve_agave_cores;
256 0 : }
|