@@ -246,11 +246,19 @@ fd_hash_bank( fd_exec_slot_ctx_t * slot_ctx,
246246 }
247247
248248 if ( capture_ctx != NULL && capture_ctx -> capture != NULL && slot_ctx -> slot_bank .slot >=capture_ctx -> solcap_start_slot ) {
249+ uchar * lthash = NULL ;
250+
251+ if ( FD_FEATURE_ACTIVE ( slot_ctx -> slot_bank .slot , slot_ctx -> epoch_ctx -> features , accounts_lt_hash ) ) {
252+ lthash = (uchar * )fd_alloca_check ( 1UL , 32UL );
253+ fd_lthash_hash ((fd_lthash_value_t * ) slot_ctx -> slot_bank .lthash .lthash , lthash );
254+ }
255+
249256 fd_solcap_write_bank_preimage (
250257 capture_ctx -> capture ,
251258 hash -> hash ,
252259 slot_ctx -> slot_bank .prev_banks_hash .hash ,
253- slot_ctx -> account_delta_hash .hash ,
260+ FD_FEATURE_ACTIVE ( slot_ctx -> slot_bank .slot , slot_ctx -> epoch_ctx -> features , remove_accounts_delta_hash ) ? NULL : slot_ctx -> account_delta_hash .hash ,
261+ lthash ,
254262 & slot_ctx -> slot_bank .poh .hash ,
255263 slot_ctx -> signature_cnt );
256264 }
@@ -348,7 +356,10 @@ fd_account_hash( fd_funk_t * funk,
348356
349357 if ( memcmp ( task_info -> acc_hash -> hash , acc_meta -> hash , sizeof (fd_hash_t ) ) != 0 ) {
350358 task_info -> hash_changed = 1 ;
359+ // char *prev_lthash = FD_LTHASH_ENC_32_ALLOCA( lt_hash );
351360 fd_lthash_add ( lt_hash , & new_lthash_value );
361+ // FD_LOG_NOTICE(( "lthash %s + %s = %s (%s)", prev_lthash, FD_LTHASH_ENC_32_ALLOCA( &new_lthash_value ), FD_LTHASH_ENC_32_ALLOCA( lt_hash ),
362+ // FD_BASE58_ENC_32_ALLOCA( task_info->acc_pubkey )));
352363 }
353364 }
354365 if ( FD_LIKELY (task_info -> hash_changed && ((NULL != acc_meta_parent ) && (acc_meta_parent -> info .lamports != 0 ) ) ) ) {
@@ -364,15 +375,19 @@ fd_account_hash( fd_funk_t * funk,
364375 acc_data ,
365376 FD_HASH_JUST_LTHASH ,
366377 features );
378+
379+ // char *prev_lthash = FD_LTHASH_ENC_32_ALLOCA( lt_hash );
367380 fd_lthash_sub ( lt_hash , & old_lthash_value );
381+ // FD_LOG_NOTICE(( "lthash %s - %s = %s (%s)", prev_lthash, FD_LTHASH_ENC_32_ALLOCA( &old_lthash_value ), FD_LTHASH_ENC_32_ALLOCA( lt_hash ),
382+ // FD_BASE58_ENC_32_ALLOCA( task_info->acc_pubkey )));
368383 }
369384
370385 if ( acc_meta -> slot == slot ) {
371386 task_info -> hash_changed = 1 ;
372387 }
373388}
374389
375- static void
390+ void
376391fd_account_hash_task ( void * tpool ,
377392 ulong t0 , ulong t1 ,
378393 void * args ,
@@ -387,6 +402,8 @@ fd_account_hash_task( void * tpool,
387402
388403 fd_lthash_value_t * lthash = (fd_lthash_value_t * )args ;
389404
405+ FD_LOG_NOTICE (( "fd_account_hash_task: %lu %lu" , start_idx , stop_idx ));
406+
390407 for ( ulong i = start_idx ; i <=stop_idx ; i ++ ) {
391408 fd_accounts_hash_task_info_t * task_info = & task_data -> info [i ];
392409 fd_exec_slot_ctx_t * slot_ctx = task_info -> slot_ctx ;
@@ -395,7 +412,8 @@ fd_account_hash_task( void * tpool,
395412 task_info ,
396413 lthash ,
397414 slot_ctx -> slot_bank .slot ,
398- & slot_ctx -> epoch_ctx -> features );
415+ & slot_ctx -> epoch_ctx -> features
416+ );
399417 }
400418}
401419
0 commit comments