1
- #include <climits>
2
1
#define _GNU_SOURCE
3
2
#include "../../disco/tiles.h"
4
3
#include "generated/fd_replay_tile_seccomp.h"
@@ -439,6 +438,15 @@ slice_poll( fd_replay_tile_ctx_t * ctx,
439
438
fd_replay_slice_t * slice_deque ,
440
439
ulong slot ) {
441
440
uint consumed_idx , slices_added ;
441
+
442
+ fd_replay_idxs_t * shred_idxs = fd_replay_idxs_map_query ( ctx -> replay -> idxs_map , slot , NULL );
443
+ uint turbine_shred_wmark ;
444
+ if ( !shred_idxs ) {
445
+ turbine_shred_wmark = UINT_MAX ;
446
+ } else {
447
+ turbine_shred_wmark = (uint )shred_idxs -> wmark ;
448
+ }
449
+
442
450
for (;;) { /* speculative query */
443
451
fd_block_map_query_t query [1 ] = { 0 };
444
452
int err = fd_block_map_query_try ( ctx -> blockstore -> block_map , & slot , NULL , query , 0 );
@@ -447,7 +455,7 @@ slice_poll( fd_replay_tile_ctx_t * ctx,
447
455
if ( FD_UNLIKELY ( err == FD_MAP_ERR_KEY ) ) return 0 ;
448
456
if ( FD_UNLIKELY ( err == FD_MAP_ERR_AGAIN ) ) continue ;
449
457
450
- consumed_idx = block_info -> consumed_idx ;
458
+ consumed_idx = fd_uint_min ( block_info -> consumed_idx , turbine_shred_wmark ) ;
451
459
slices_added = 0 ;
452
460
453
461
if ( FD_UNLIKELY ( block_info -> buffered_idx == UINT_MAX ) ) return 1 ;
@@ -513,6 +521,10 @@ before_frag( fd_replay_tile_ctx_t * ctx,
513
521
(void )ctx ;
514
522
(void )seq ;
515
523
524
+ if ( in_idx == STORE_IN_IDX ) {
525
+ FD_LOG_WARNING ((" RECEIVE STORE MESSAGE: slot %lu" , fd_disco_replay_old_sig_slot ( sig )));
526
+ }
527
+
516
528
if ( in_idx == SHRED_IN_IDX ) {
517
529
// FD_LOG_NOTICE(( "shred in idx: %lu, seq: %lu, sig: %lu", in_idx, seq, sig ));
518
530
@@ -589,8 +601,6 @@ during_frag( fd_replay_tile_ctx_t * ctx,
589
601
ulong chunk ,
590
602
ulong sz ,
591
603
ulong ctl FD_PARAM_UNUSED ) {
592
- return ;
593
-
594
604
ctx -> skip_frag = 0 ;
595
605
596
606
if ( in_idx == STORE_IN_IDX ) {
@@ -604,6 +614,7 @@ during_frag( fd_replay_tile_ctx_t * ctx,
604
614
Microblock as a list of fd_txn_p_t (sz * sizeof(fd_txn_p_t)) */
605
615
606
616
ctx -> curr_slot = fd_disco_replay_old_sig_slot ( sig );
617
+ FD_LOG_WARNING (("store sent slot %lu" , ctx -> curr_slot ));
607
618
/* slot changes */
608
619
if ( FD_UNLIKELY ( ctx -> curr_slot < fd_fseq_query ( ctx -> published_wmark ) ) ) {
609
620
FD_LOG_WARNING (( "store sent slot %lu before our root." , ctx -> curr_slot ));
@@ -1921,7 +1932,7 @@ after_frag( fd_replay_tile_ctx_t * ctx,
1921
1932
(void )sig ;
1922
1933
(void )sz ;
1923
1934
(void )seq ;
1924
- return ;
1935
+ // return;
1925
1936
1926
1937
if ( FD_LIKELY ( in_idx == SHRED_IN_IDX ) ) {
1927
1938
/* We are here if any of the slot / shred idx numbers have been overrun */
@@ -2475,9 +2486,9 @@ after_credit( fd_replay_tile_ctx_t * ctx,
2475
2486
}
2476
2487
}
2477
2488
2478
- // exec_slices( ctx, stem, ctx->curr_slot );
2489
+ exec_slices ( ctx , stem , ctx -> curr_slot );
2479
2490
2480
- return ;
2491
+ // return;
2481
2492
2482
2493
ulong curr_slot = ctx -> curr_slot ;
2483
2494
ulong parent_slot = ctx -> parent_slot ;
@@ -2740,7 +2751,7 @@ after_credit( fd_replay_tile_ctx_t * ctx,
2740
2751
2741
2752
static void
2742
2753
during_housekeeping ( void * _ctx ) {
2743
- return ;
2754
+ // return;
2744
2755
2745
2756
fd_replay_tile_ctx_t * ctx = (fd_replay_tile_ctx_t * )_ctx ;
2746
2757
0 commit comments