|
20 | 20 | #include "../../util/tile/fd_tile_private.h" |
21 | 21 | #include "../../discof/restore/utils/fd_ssctrl.h" |
22 | 22 | #include "../../discof/restore/utils/fd_ssmsg.h" |
| 23 | +#include "../../flamenco/capture/fd_solcap_writer.h" |
23 | 24 | #include "../../flamenco/progcache/fd_progcache_admin.h" |
24 | 25 | #include "../../vinyl/meta/fd_vinyl_meta.h" |
25 | 26 |
|
@@ -270,6 +271,8 @@ fd_topo_initialize( config_t * config ) { |
270 | 271 | topo->max_page_size = fd_cstr_to_shmem_page_sz( config->hugetlbfs.max_page_size ); |
271 | 272 | topo->gigantic_page_threshold = config->hugetlbfs.gigantic_page_threshold_mib << 20; |
272 | 273 |
|
| 274 | + int solcap_enabled = strlen( config->capture.solcap_capture ) > 0; |
| 275 | + |
273 | 276 | /* topo, name */ |
274 | 277 | fd_topob_wksp( topo, "metric" ); |
275 | 278 | fd_topob_wksp( topo, "genesi" ); |
@@ -508,6 +511,11 @@ fd_topo_initialize( config_t * config ) { |
508 | 511 | /**/ fd_topob_tile( topo, "poh", "poh", "metric_in", tile_to_cpu[ topo->tile_cnt ], 0, 1 ); |
509 | 512 | FOR(sign_tile_cnt) fd_topob_tile( topo, "sign", "sign", "metric_in", tile_to_cpu[ topo->tile_cnt ], 0, 1 ); |
510 | 513 |
|
| 514 | + if( FD_UNLIKELY( solcap_enabled ) ) { |
| 515 | + fd_topob_wksp( topo, "captur" ); |
| 516 | + fd_topob_tile( topo, "captur", "captur", "metric_in", tile_to_cpu[ topo->tile_cnt ], 0, 0 ); |
| 517 | + } |
| 518 | + |
511 | 519 | /* topo, tile_name, tile_kind_id, fseq_wksp, link_name, link_kind_id, reliable, polled */ |
512 | 520 | FOR(gossvf_tile_cnt) for( ulong j=0UL; j<net_tile_cnt; j++ ) |
513 | 521 | fd_topob_tile_in( topo, "gossvf", i, "metric_in", "net_gossvf", j, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ |
@@ -728,6 +736,15 @@ fd_topo_initialize( config_t * config ) { |
728 | 736 | FOR(exec_tile_cnt) fd_topob_tile_out( topo, "exec", i, "exec_replay", i ); |
729 | 737 | FOR(exec_tile_cnt) fd_topob_tile_in( topo, "replay", 0UL, "metric_in", "exec_replay", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); |
730 | 738 |
|
| 739 | + if( FD_UNLIKELY( solcap_enabled ) ) { |
| 740 | + fd_topob_link( topo, "cap_repl", "captur", 32UL, SOLCAP_WRITE_ACCOUNT_DATA_MTU, 1UL ); |
| 741 | + fd_topob_tile_out( topo, "replay", 0UL, "cap_repl", 0UL ); |
| 742 | + fd_topob_tile_in( topo, "captur", 0UL, "metric_in", "cap_repl", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); |
| 743 | + FOR(exec_tile_cnt) fd_topob_link( topo, "cap_exec", "captur", 32UL, SOLCAP_WRITE_ACCOUNT_DATA_MTU, 1UL ); |
| 744 | + FOR(exec_tile_cnt) fd_topob_tile_out( topo, "exec", i, "cap_exec", i ); |
| 745 | + FOR(exec_tile_cnt) fd_topob_tile_in( topo, "captur", 0UL, "metric_in", "cap_exec", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); |
| 746 | + } |
| 747 | + |
731 | 748 | if( FD_LIKELY( !is_auto_affinity ) ) { |
732 | 749 | if( FD_UNLIKELY( affinity_tile_cnt<topo->tile_cnt ) ) |
733 | 750 | FD_LOG_ERR(( "The topology you are using has %lu tiles, but the CPU affinity specified in the config tile as [layout.affinity] only provides for %lu cores. " |
@@ -1246,6 +1263,11 @@ fd_topo_configure_tile( fd_topo_tile_t * tile, |
1246 | 1263 | tile->shredcap.enable_publish_stake_weights = 0; /* this is not part of the config */ |
1247 | 1264 | strncpy( tile->shredcap.manifest_path, "", PATH_MAX ); /* this is not part of the config */ |
1248 | 1265 |
|
| 1266 | + } else if( FD_UNLIKELY( !strcmp( tile->name, "captur" ) ) ) { |
| 1267 | + |
| 1268 | + tile->capctx.capture_start_slot = config->capture.capture_start_slot; |
| 1269 | + strncpy( tile->capctx.solcap_capture, config->capture.solcap_capture, sizeof(tile->capctx.solcap_capture) ); |
| 1270 | + |
1249 | 1271 | } else { |
1250 | 1272 | FD_LOG_ERR(( "unknown tile name `%s`", tile->name )); |
1251 | 1273 | } |
|
0 commit comments