Skip to content

Commit e0b3efe

Browse files
snapshots: hash tile
1 parent b9cd2de commit e0b3efe

24 files changed

+880
-150
lines changed

book/api/metrics-generated.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,17 @@
900900

901901
</div>
902902

903+
## Snaphs Tile
904+
905+
<div class="metrics">
906+
907+
| Metric | Type | Description |
908+
|--------|------|-------------|
909+
| <span class="metrics-name">snaphs_&#8203;state</span> | gauge | State of the tile. 0=hashing, 1=done, 2=shutdown |
910+
| <span class="metrics-name">snaphs_&#8203;accounts_&#8203;hashed</span> | gauge | Number of accounts hashed so far during snapshot loading. Might decrease if snapshot load is aborted and restarted |
911+
912+
</div>
913+
903914
## Ipecho Tile
904915

905916
<div class="metrics">

src/app/firedancer-dev/commands/backtest.c

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "../../../util/pod/fd_pod_format.h"
2525
#include "../../../discof/replay/fd_replay_notif.h"
2626
#include "../../../discof/reasm/fd_reasm.h"
27+
#include "../../../discof/restore/utils/fd_ssctrl.h"
2728
#include "../../../flamenco/runtime/fd_runtime_public.h" /* FD_RUNTIME_PUBLIC_ACCOUNT_UPDATE_MSG_MTU */
2829
#include "../main.h"
2930

@@ -36,6 +37,7 @@ static void
3637
backtest_topo( config_t * config ) {
3738
ulong exec_tile_cnt = config->firedancer.layout.exec_tile_count;
3839
ulong writer_tile_cnt = config->firedancer.layout.writer_tile_count;
40+
ulong hash_tile_cnt = config->firedancer.layout.hash_tile_count;
3941

4042
fd_topo_t * topo = { fd_topob_new( &config->topo, config->name ) };
4143
topo->max_page_size = fd_cstr_to_shmem_page_sz( config->hugetlbfs.max_page_size );
@@ -99,6 +101,15 @@ backtest_topo( config_t * config ) {
99101
snapdc_tile->allow_shutdown = 1;
100102
snapin_tile->allow_shutdown = 1;
101103

104+
if( FD_LIKELY( hash_tile_cnt ) ) {
105+
fd_topob_wksp( topo, "snaphs" );
106+
}
107+
108+
for( ulong i=0UL; i<hash_tile_cnt; i++ ) {
109+
fd_topo_tile_t * snaphsh_tile = fd_topob_tile( topo, "snaphs", "snaphs", "metric_in", cpu_idx++, 0, 0 );
110+
snaphsh_tile->allow_shutdown = 1;
111+
}
112+
102113
/**********************************************************************/
103114
/* Setup backtest->replay link (repair_repla) in topo */
104115
/**********************************************************************/
@@ -121,16 +132,23 @@ backtest_topo( config_t * config ) {
121132
fd_topob_wksp( topo, "snapdc_rd" );
122133
fd_topob_wksp( topo, "snapin_rd" );
123134
fd_topob_wksp( topo, "snap_out" );
124-
fd_topob_wksp( topo, "replay_manif" );
135+
136+
if( FD_LIKELY( hash_tile_cnt ) ) {
137+
fd_topob_wksp( topo, "snapin_hsh" );
138+
fd_topob_wksp( topo, "snaphsh_out" );
139+
}
140+
125141
/* TODO: Should be depth of 1 or 2, not 4, but it causes backpressure
126142
from the replay tile parsing the manifest, remove when this is
127143
fixed. */
128144
fd_topob_link( topo, "snap_out", "snap_out", 4UL, 5UL*(1UL<<30UL), 1UL );
129145

130146
fd_topob_link( topo, "snap_zstd", "snap_zstd", 8192UL, 16384UL, 1UL );
131147
fd_topob_link( topo, "snap_stream", "snap_stream", 2048UL, USHORT_MAX, 1UL );
132-
fd_topob_link( topo, "snapdc_rd", "snapdc_rd", 128UL, 0UL, 1UL );
133-
fd_topob_link( topo, "snapin_rd", "snapin_rd", 128UL, 0UL, 1UL );
148+
fd_topob_link( topo, "snapdc_rd", "snapdc_rd", 128UL, 0UL, 1UL );
149+
fd_topob_link( topo, "snapin_rd", "snapin_rd", 128UL, 0UL, 1UL );
150+
FOR(hash_tile_cnt) fd_topob_link( topo, "snapin_hsh", "snapin_hsh", 128UL, sizeof(fd_snapshot_existing_account_t), 1UL );
151+
FOR(hash_tile_cnt) fd_topob_link( topo, "snaphsh_out", "snaphsh_out", 128UL, 2048UL, 1UL );
134152

135153
fd_topob_tile_out( topo, "snaprd", 0UL, "snap_zstd", 0UL );
136154
fd_topob_tile_in ( topo, "snapdc", 0UL, "metric_in", "snap_zstd", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
@@ -144,6 +162,12 @@ backtest_topo( config_t * config ) {
144162
fd_topob_tile_in( topo, "snaprd", 0UL, "metric_in", "snapin_rd", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
145163
fd_topob_tile_out( topo, "snapin", 0UL, "snapin_rd", 0UL );
146164

165+
FOR(hash_tile_cnt) fd_topob_tile_out( topo, "snapin", 0UL, "snapin_hsh", i );
166+
FOR(hash_tile_cnt) fd_topob_tile_in( topo, "snapin", 0UL, "metric_in", "snaphsh_out", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
167+
168+
FOR(hash_tile_cnt) fd_topob_tile_in( topo, "snaphs", i, "metric_in", "snapin_hsh", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
169+
FOR(hash_tile_cnt) fd_topob_tile_out( topo, "snaphs", i, "snaphsh_out", i );
170+
147171
/**********************************************************************/
148172
/* More backtest->replay links in topo */
149173
/**********************************************************************/
@@ -312,15 +336,7 @@ backtest_topo( config_t * config ) {
312336
FD_TEST( fd_pod_insertf_ulong( topo->props, busy_obj->id, "bank_busy.%lu", i ) );
313337
}
314338

315-
/* Replay decoded manifest dcache topo obj */
316-
fd_topo_obj_t * replay_manifest_dcache = fd_topob_obj( topo, "dcache", "replay_manif" );
317-
fd_pod_insertf_ulong( topo->props, 2UL << 30UL, "obj.%lu.data_sz", replay_manifest_dcache->id );
318-
fd_pod_insert_ulong( topo->props, "manifest_dcache", replay_manifest_dcache->id );
319-
320339
fd_topob_tile_uses( topo, snapin_tile, funk_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
321-
fd_topob_tile_uses( topo, snapin_tile, replay_manifest_dcache, FD_SHMEM_JOIN_MODE_READ_WRITE );
322-
fd_topob_tile_uses( topo, replay_tile, replay_manifest_dcache, FD_SHMEM_JOIN_MODE_READ_ONLY );
323-
324340
for( ulong i=0UL; i<topo->tile_cnt; i++ ) {
325341
fd_topo_tile_t * tile = &topo->tiles[ i ];
326342
if( !fd_topo_configure_tile( tile, config ) ) {
@@ -398,9 +414,13 @@ backtest_cmd_fn( args_t * args FD_PARAM_UNUSED,
398414
fd_topo_tile_t * snapdc_tile = &topo->tiles[ fd_topo_find_tile( topo, "snapdc", 0UL ) ];
399415
fd_topo_tile_t * snapin_tile = &topo->tiles[ fd_topo_find_tile( topo, "snapin", 0UL ) ];
400416

417+
ulong snaphs_tile_idx = fd_topo_find_tile( topo, "snaphs", 0UL );
418+
fd_topo_tile_t * snaphs_tile = snaphs_tile_idx!=ULONG_MAX ? &topo->tiles[ snaphs_tile_idx ] : NULL;
419+
401420
ulong volatile * const snaprd_metrics = fd_metrics_tile( snaprd_tile->metrics );
402421
ulong volatile * const snapdc_metrics = fd_metrics_tile( snapdc_tile->metrics );
403422
ulong volatile * const snapin_metrics = fd_metrics_tile( snapin_tile->metrics );
423+
ulong volatile * const snaphs_metrics = snaphs_tile ? fd_metrics_tile( snaphs_tile->metrics ) : NULL;
404424

405425
ulong total_off_old = 0UL;
406426
ulong snaprd_backp_old = 0UL;
@@ -409,6 +429,8 @@ backtest_cmd_fn( args_t * args FD_PARAM_UNUSED,
409429
ulong snapdc_wait_old = 0UL;
410430
ulong snapin_backp_old = 0UL;
411431
ulong snapin_wait_old = 0UL;
432+
ulong snaphs_backp_old = 0UL;
433+
ulong snaphs_wait_old = 0UL;
412434
ulong acc_cnt_old = 0UL;
413435
sleep( 1 );
414436
puts( "-------------backp=(snaprd,snapdc,snapin) busy=(snaprd,snapdc,snapin)---------------" );
@@ -417,8 +439,9 @@ backtest_cmd_fn( args_t * args FD_PARAM_UNUSED,
417439
ulong snaprd_status = FD_VOLATILE_CONST( snaprd_metrics[ MIDX( GAUGE, TILE, STATUS ) ] );
418440
ulong snapdc_status = FD_VOLATILE_CONST( snapdc_metrics[ MIDX( GAUGE, TILE, STATUS ) ] );
419441
ulong snapin_status = FD_VOLATILE_CONST( snapin_metrics[ MIDX( GAUGE, TILE, STATUS ) ] );
442+
ulong snaphs_status = snaphs_metrics ? FD_VOLATILE_CONST( snaphs_metrics[ MIDX( GAUGE, TILE, STATUS ) ] ) : 2UL;
420443

421-
if( FD_UNLIKELY( snaprd_status==2UL && snapdc_status==2UL && snapin_status == 2UL ) ) break;
444+
if( FD_UNLIKELY( snaprd_status==2UL && snapdc_status==2UL && snapin_status == 2UL && snaphs_status==2UL ) ) break;
422445

423446
long cur = fd_log_wallclock();
424447
if( FD_UNLIKELY( cur<next ) ) {
@@ -438,16 +461,21 @@ backtest_cmd_fn( args_t * args FD_PARAM_UNUSED,
438461
ulong snapin_backp = snapin_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ];
439462
ulong snapin_wait = snapin_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_PREFRAG ) ] +
440463
snapin_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] + snapin_backp;
464+
ulong snaphs_backp = snaphs_metrics ? snaphs_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ] : 0UL;
465+
ulong snaphs_wait = snaphs_metrics ? snaphs_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_PREFRAG ) ] +
466+
snaphs_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] + snaphs_backp : 0UL;
441467

442468
ulong acc_cnt = snapin_metrics[ MIDX( GAUGE, SNAPIN, ACCOUNTS_INSERTED ) ];
443-
printf( "bw=%4.0f MB/s backp=(%3.0f%%,%3.0f%%,%3.0f%%) busy=(%3.0f%%,%3.0f%%,%3.0f%%) acc=%3.1f M/s\n",
469+
printf( "bw=%4.0f MB/s backp=(%3.0f%%,%3.0f%%,%3.0f%%,%3.0f%%) busy=(%3.0f%%,%3.0f%%,%3.0f%%,%3.0f%%) acc=%3.1f M/s\n",
444470
(double)( total_off-total_off_old )/1e6,
445471
( (double)( snaprd_backp-snaprd_backp_old )*ns_per_tick )/1e7,
446472
( (double)( snapdc_backp-snapdc_backp_old )*ns_per_tick )/1e7,
447473
( (double)( snapin_backp-snapin_backp_old )*ns_per_tick )/1e7,
474+
( (double)( snaphs_backp-snaphs_backp_old )*ns_per_tick )/1e7,
448475
100-( ( (double)( snaprd_wait-snaprd_wait_old )*ns_per_tick )/1e7 ),
449476
100-( ( (double)( snapdc_wait-snapdc_wait_old )*ns_per_tick )/1e7 ),
450477
100-( ( (double)( snapin_wait-snapin_wait_old )*ns_per_tick )/1e7 ),
478+
100-( ( (double)( snaphs_wait-snaphs_wait_old )*ns_per_tick )/1e7 ),
451479
(double)( acc_cnt-acc_cnt_old )/1e6 );
452480
fflush( stdout );
453481
total_off_old = total_off;
@@ -457,6 +485,8 @@ backtest_cmd_fn( args_t * args FD_PARAM_UNUSED,
457485
snapdc_wait_old = snapdc_wait;
458486
snapin_backp_old = snapin_backp;
459487
snapin_wait_old = snapin_wait;
488+
snaphs_backp_old = snaphs_backp;
489+
snaphs_wait_old = snaphs_wait;
460490
acc_cnt_old = acc_cnt;
461491

462492
next+=1000L*1000L*1000L;

src/app/firedancer-dev/commands/snapshot_load.c

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "../../../disco/metrics/fd_metrics.h"
77
#include "../../../disco/topo/fd_topob.h"
88
#include "../../../util/tile/fd_tile_private.h"
9+
#include "../../../discof/restore/utils/fd_ssctrl.h"
910
#include "../../../discof/restore/utils/fd_ssmsg.h"
1011

1112
#include <sys/resource.h>
@@ -26,6 +27,7 @@ snapshot_load_topo( config_t * config,
2627
fd_topo_t * topo = &config->topo;
2728
fd_topob_new( &config->topo, config->name );
2829
topo->max_page_size = fd_cstr_to_shmem_page_sz( config->hugetlbfs.max_page_size );
30+
ulong hash_tile_cnt = config->firedancer.layout.hash_tile_count;
2931

3032
fd_topob_wksp( topo, "funk" );
3133
fd_topo_obj_t * funk_obj = setup_topo_funk( topo, "funk",
@@ -37,7 +39,7 @@ snapshot_load_topo( config_t * config,
3739
static ushort tile_to_cpu[ FD_TILE_MAX ] = {0};
3840
if( args->snapshot_load.tile_cpus[0] ) {
3941
ulong cpu_cnt = fd_tile_private_cpus_parse( args->snapshot_load.tile_cpus, tile_to_cpu );
40-
if( FD_UNLIKELY( cpu_cnt<4UL ) ) FD_LOG_ERR(( "--tile-cpus specifies %lu CPUs, but need at least 4", cpu_cnt ));
42+
if( FD_UNLIKELY( cpu_cnt<4UL + hash_tile_cnt ) ) FD_LOG_ERR(( "--tile-cpus specifies %lu CPUs, but need at least %lu", cpu_cnt, 4UL + hash_tile_cnt ));
4143
}
4244

4345
/* metrics tile *****************************************************/
@@ -77,6 +79,20 @@ snapshot_load_topo( config_t * config,
7779
fd_topo_tile_t * snapin_tile = fd_topob_tile( topo, "snapin", "snapin", "snapin", tile_to_cpu[3], 0, 0 );
7880
snapin_tile->allow_shutdown = 1;
7981

82+
if( FD_LIKELY( hash_tile_cnt ) ) {
83+
fd_topob_wksp( topo, "snaphs" );
84+
fd_topob_wksp( topo, "snapin_hsh" );
85+
fd_topob_wksp( topo, "snaphsh_out" );
86+
}
87+
#define FOR(cnt) for( ulong i=0UL; i<cnt; i++ )
88+
for( ulong i=0UL; i<hash_tile_cnt; i++ ) {
89+
fd_topo_tile_t * snaphsh_tile = fd_topob_tile( topo, "snaphs", "snaphs", "metric_in", tile_to_cpu[4 + i], 0, 0 );
90+
snaphsh_tile->allow_shutdown = 1;
91+
}
92+
93+
FOR(hash_tile_cnt) fd_topob_link( topo, "snapin_hsh", "snapin_hsh", 128UL, sizeof(fd_snapshot_existing_account_t), 1UL );
94+
FOR(hash_tile_cnt) fd_topob_link( topo, "snaphsh_out", "snaphsh_out", 128UL, 2048UL, 1UL );
95+
8096
/* uncompressed stream -> snapin tile */
8197
fd_topob_tile_in ( topo, "snapin", 0UL, "metric_in", "snap_stream", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
8298

@@ -100,6 +116,11 @@ snapshot_load_topo( config_t * config,
100116
fd_topob_tile_in( topo, "snaprd", 0UL, "metric_in", "snapin_rd", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
101117
fd_topob_tile_out( topo, "snapin", 0UL, "snapin_rd", 0UL );
102118

119+
FOR(hash_tile_cnt) fd_topob_tile_out( topo, "snapin", 0UL, "snapin_hsh", i );
120+
FOR(hash_tile_cnt) fd_topob_tile_in( topo, "snapin", 0UL, "metric_in", "snaphsh_out", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
121+
FOR(hash_tile_cnt) fd_topob_tile_in( topo, "snaphs", i, "metric_in", "snapin_hsh", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
122+
FOR(hash_tile_cnt) fd_topob_tile_out( topo, "snaphs", i, "snaphsh_out", i );
123+
103124
for( ulong i=0UL; i<topo->tile_cnt; i++ ) {
104125
fd_topo_tile_t * tile = &topo->tiles[ i ];
105126
if( !fd_topo_configure_tile( tile, config ) ) {
@@ -158,9 +179,13 @@ snapshot_load_cmd_fn( args_t * args,
158179
fd_topo_tile_t * snapdc_tile = &topo->tiles[ fd_topo_find_tile( topo, "snapdc", 0UL ) ];
159180
fd_topo_tile_t * snapin_tile = &topo->tiles[ fd_topo_find_tile( topo, "snapin", 0UL ) ];
160181

182+
ulong snaphs_tile_idx = fd_topo_find_tile( topo, "snaphs", 0UL );
183+
fd_topo_tile_t * snaphs_tile = snaphs_tile_idx!=ULONG_MAX ? &topo->tiles[ snaphs_tile_idx ] : NULL;
184+
161185
ulong volatile * const snaprd_metrics = fd_metrics_tile( snaprd_tile->metrics );
162186
ulong volatile * const snapdc_metrics = fd_metrics_tile( snapdc_tile->metrics );
163187
ulong volatile * const snapin_metrics = fd_metrics_tile( snapin_tile->metrics );
188+
ulong volatile * const snaphs_metrics = snaphs_tile ? fd_metrics_tile( snaphs_tile->metrics ) : NULL;
164189

165190
ulong total_off_old = 0UL;
166191
ulong snaprd_backp_old = 0UL;
@@ -169,6 +194,8 @@ snapshot_load_cmd_fn( args_t * args,
169194
ulong snapdc_wait_old = 0UL;
170195
ulong snapin_backp_old = 0UL;
171196
ulong snapin_wait_old = 0UL;
197+
ulong snaphs_backp_old = 0UL;
198+
ulong snaphs_wait_old = 0UL;
172199
ulong acc_cnt_old = 0UL;
173200
sleep( 1 );
174201
puts( "" );
@@ -178,14 +205,15 @@ snapshot_load_cmd_fn( args_t * args,
178205
puts( "- stall: Waiting on upstream tile" );
179206
puts( "- acc: Number of accounts" );
180207
puts( "" );
181-
puts( "-------------backp=(snaprd,snapdc,snapin) busy=(snaprd,snapdc,snapin)---------------" );
208+
puts( "-------------backp=(snaprd,snapdc,snapin,snaphs) busy=(snaprd,snapdc,snapin,snaphs)---------------" );
182209
long next = start+1000L*1000L*1000L;
183210
for(;;) {
184211
ulong snaprd_status = FD_VOLATILE_CONST( snaprd_metrics[ MIDX( GAUGE, TILE, STATUS ) ] );
185212
ulong snapdc_status = FD_VOLATILE_CONST( snapdc_metrics[ MIDX( GAUGE, TILE, STATUS ) ] );
186213
ulong snapin_status = FD_VOLATILE_CONST( snapin_metrics[ MIDX( GAUGE, TILE, STATUS ) ] );
214+
ulong snaphs_status = snaphs_metrics ? FD_VOLATILE_CONST( snaphs_metrics[ MIDX( GAUGE, TILE, STATUS ) ] ) : 2UL;
187215

188-
if( FD_UNLIKELY( snaprd_status==2UL && snapdc_status==2UL && snapin_status == 2UL ) ) break;
216+
if( FD_UNLIKELY( snaprd_status==2UL && snapdc_status==2UL && snapin_status == 2UL && snaphs_status==2UL ) ) break;
189217

190218
long cur = fd_log_wallclock();
191219
if( FD_UNLIKELY( cur<next ) ) {
@@ -205,16 +233,21 @@ snapshot_load_cmd_fn( args_t * args,
205233
ulong snapin_backp = snapin_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ];
206234
ulong snapin_wait = snapin_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_PREFRAG ) ] +
207235
snapin_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] + snapin_backp;
236+
ulong snaphs_backp = snaphs_metrics ? snaphs_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ] : 0UL;
237+
ulong snaphs_wait = snaphs_metrics ? snaphs_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_PREFRAG ) ] +
238+
snaphs_metrics[ MIDX( COUNTER, TILE, REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] + snaphs_backp : 0UL;
208239

209240
ulong acc_cnt = snapin_metrics[ MIDX( GAUGE, SNAPIN, ACCOUNTS_INSERTED ) ];
210-
printf( "bw=%4.0f MB/s backp=(%3.0f%%,%3.0f%%,%3.0f%%) busy=(%3.0f%%,%3.0f%%,%3.0f%%) acc=%3.1f M/s\n",
241+
printf( "bw=%4.0f MB/s backp=(%3.0f%%,%3.0f%%,%3.0f%%,%3.0f%%) busy=(%3.0f%%,%3.0f%%,%3.0f%%,%3.0f%%) acc=%3.1f M/s\n",
211242
(double)( total_off-total_off_old )/1e6,
212243
( (double)( snaprd_backp-snaprd_backp_old )*ns_per_tick )/1e7,
213244
( (double)( snapdc_backp-snapdc_backp_old )*ns_per_tick )/1e7,
214245
( (double)( snapin_backp-snapin_backp_old )*ns_per_tick )/1e7,
246+
( (double)( snaphs_backp-snaphs_backp_old )*ns_per_tick )/1e7,
215247
100-( ( (double)( snaprd_wait-snaprd_wait_old )*ns_per_tick )/1e7 ),
216248
100-( ( (double)( snapdc_wait-snapdc_wait_old )*ns_per_tick )/1e7 ),
217249
100-( ( (double)( snapin_wait-snapin_wait_old )*ns_per_tick )/1e7 ),
250+
100-( ( (double)( snaphs_wait-snaphs_wait_old )*ns_per_tick )/1e7 ),
218251
(double)( acc_cnt-acc_cnt_old )/1e6 );
219252
fflush( stdout );
220253
total_off_old = total_off;
@@ -224,6 +257,8 @@ snapshot_load_cmd_fn( args_t * args,
224257
snapdc_wait_old = snapdc_wait;
225258
snapin_backp_old = snapin_backp;
226259
snapin_wait_old = snapin_wait;
260+
snaphs_backp_old = snaphs_backp;
261+
snaphs_wait_old = snaphs_wait;
227262
acc_cnt_old = acc_cnt;
228263

229264
next+=1000L*1000L*1000L;

src/app/firedancer-dev/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ extern fd_topo_run_tile_t fd_tile_shredcap;
106106
extern fd_topo_run_tile_t fd_tile_snaprd;
107107
extern fd_topo_run_tile_t fd_tile_snapdc;
108108
extern fd_topo_run_tile_t fd_tile_snapin;
109+
extern fd_topo_run_tile_t fd_tile_snaphs;
109110

110111
fd_topo_run_tile_t * TILES[] = {
111112
&fd_tile_net,
@@ -150,6 +151,7 @@ fd_topo_run_tile_t * TILES[] = {
150151
&fd_tile_snaprd,
151152
&fd_tile_snapdc,
152153
&fd_tile_snapin,
154+
&fd_tile_snaphs,
153155
&fd_tile_ipecho,
154156
NULL,
155157
};

src/app/firedancer/config/default.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,14 @@ user = ""
698698
# requests.
699699
sign_tile_count = 2
700700

701+
# How many snapshot hash tiles to run. The snapshot hash tiles are
702+
# responsible for verifying the hash of all accounts in the loaded
703+
# snapshot via lthash (lattice hashing). Currently, set to 0 by
704+
# default because it is too slow to run in the full client. TODO:
705+
# enable snapshot hash tiles in the full client and update this
706+
# comment.
707+
hash_tile_count = 0
708+
701709
# All memory that will be used in Firedancer is pre-allocated in two
702710
# kinds of pages: huge and gigantic. Huge pages are 2 MiB and gigantic
703711
# pages are 1 GiB. This is done to prevent TLB misses which can have a

0 commit comments

Comments
 (0)