@@ -2404,6 +2404,12 @@ impl ReplayStage {
24042404 leader_schedule_cache,
24052405 ) ;
24062406 }
2407+
2408+ info ! (
2409+ "new fork:{} parent:{} (leader) root:{}" ,
2410+ my_leader_slot, parent_slot, root_slot
2411+ ) ;
2412+
24072413 let tpu_bank = Self :: new_bank_from_parent_with_notify (
24082414 parent_bank. clone ( ) ,
24092415 my_leader_slot,
@@ -2476,6 +2482,17 @@ impl ReplayStage {
24762482 }
24772483 } else {
24782484 // We are in full alpenglow mode
2485+ let highest_certificate_slot = cert_pool. highest_certificate_slot ( ) ;
2486+ if highest_certificate_slot < first_alpenglow_slot. unwrap ( ) {
2487+ // We haven't got a notarization cert yet for any of the first
2488+ // alpenglow slots after the migration, wait for something to
2489+ // get notarized
2490+ info ! (
2491+ "{} alpenglow maybe_start_leader no notarization certificates yet" ,
2492+ my_pubkey
2493+ ) ;
2494+ return false ;
2495+ }
24792496 info ! (
24802497 "alpenglow maybe_start_leader certficates
24812498 higheset notarized slot: {},
@@ -2487,7 +2504,7 @@ impl ReplayStage {
24872504 ) ;
24882505 (
24892506 cert_pool. highest_not_skip_certificate_slot ( ) ,
2490- cert_pool . highest_certificate_slot ( ) + 1 ,
2507+ highest_certificate_slot + 1 ,
24912508 )
24922509 }
24932510 } ;
@@ -2774,9 +2791,9 @@ impl ReplayStage {
27742791 return None ;
27752792 } ;
27762793 info ! (
2777- "pushing into vote pool {} { }" ,
2778- vote_bank . epoch_vote_account_stake ( vote_account_pubkey ) ,
2779- vote_bank . total_epoch_stake ( )
2794+ "{} pushing into vote pool {:? }" ,
2795+ identity_keypair . pubkey ( ) ,
2796+ vote
27802797 ) ;
27812798 let Ok ( maybe_new_cert) = cert_pool. add_vote (
27822799 & vote,
@@ -3353,7 +3370,6 @@ impl ReplayStage {
33533370 . expect ( "alpenglow feature must have been enabled if migration is complete" ) ;
33543371 let highest_frozen_bank = bank_forks. read ( ) . unwrap ( ) . highest_frozen_bank ( ) ;
33553372 assert ! ( highest_frozen_bank. is_frozen( ) ) ;
3356- assert ! ( highest_frozen_bank. slot( ) >= first_alpenglow_slot) ;
33573373
33583374 let poh_start_slot = poh_recorder. read ( ) . unwrap ( ) . start_slot ( ) ;
33593375 if poh_start_slot < highest_frozen_bank. slot ( ) {
@@ -3366,7 +3382,8 @@ impl ReplayStage {
33663382 // was a skip certificate for your slot, so it's ok to abandon your leader slot
33673383 //
33683384 // TODO: move PohRecorder::would_be_leader() to skip loop timer
3369- // TODO: test this scenario
3385+ // TODO: test this scenario if we reset immediately after starting up a
3386+ // leader block
33703387 Self :: reset_poh_recorder (
33713388 my_pubkey,
33723389 blockstore,
@@ -3375,8 +3392,10 @@ impl ReplayStage {
33753392 leader_schedule_cache,
33763393 ) ;
33773394 }
3395+
33783396 // Try to notarize the highest frozen bank
3379- if vote_history. latest_notarize_vote . slot ( ) != highest_frozen_bank. slot ( )
3397+ if highest_frozen_bank. slot ( ) >= first_alpenglow_slot
3398+ && vote_history. latest_notarize_vote . slot ( ) != highest_frozen_bank. slot ( )
33803399 && !vote_history. is_slot_skipped ( highest_frozen_bank. slot ( ) )
33813400 {
33823401 // TODO: Consider if voting on duplicate requires a retry, or not necessary if the other one has already been notarized?
@@ -3414,10 +3433,8 @@ impl ReplayStage {
34143433
34153434 // Try to finalize the highest notarized block
34163435 let highest_notarized_slot = cert_pool. highest_notarized_slot ( ) ;
3417- // Validators shouldn't be notarizing non alpenglow slots
3418- assert ! ( highest_notarized_slot >= first_alpenglow_slot) ;
3419-
3420- if vote_history. latest_finalize_vote . slot ( ) != highest_notarized_slot
3436+ if highest_notarized_slot >= first_alpenglow_slot
3437+ && vote_history. latest_finalize_vote . slot ( ) != highest_notarized_slot
34213438 && !vote_history. is_slot_skipped ( highest_notarized_slot)
34223439 {
34233440 let maybe_vote_bank = bank_forks. read ( ) . unwrap ( ) . get ( highest_notarized_slot) ;
0 commit comments