Skip to content

Conversation

@carllin
Copy link
Contributor

@carllin carllin commented Mar 3, 2025

Problem

Slots can get a finalization certificate before we freeze them

Summary of Changes

On bank freeze, check if we have the finalization certificate

Fixes #

r_bank_forks.get(new_frozen_root).unwrap(),
)
};
assert!(new_frozen_root > current_root_slot);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 finalized have to descend from each other, replay cannot proceed out of order

(r_bank_forks.ancestors(), r_bank_forks.descendants())
};
let did_complete_bank = Self::replay_active_banks(
let completed_slots = Self::replay_active_banks(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think complete is pretty vague here, we really mean "slots_completed_replay"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to new_frozen_slots

let new_frozen_root = completed_slots
.into_iter()
.filter(|slot| cert_pool.is_finalized_slot(*slot))
.max();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that we have:
slot 100 -> 101
101 got finalized cert but somehow the finalization of 100 hasn't fully propagated so it doesn't have a finalization cert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

)
};
assert!(new_frozen_root > current_root_slot);
if let Err(e) = Self::alpenglow_handle_new_root(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have two sources of new_alpenglow_root, one in handle_votable_alpenglow_bank and one in here? Should we just have one set_root step at the end of Alpenglow replay loop (so no matter whether your own vote or replayed votes nailed a new cert, we just have one check_and_handle_new_root in the loop?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup that makes sense, there will be a third one as well once we add ingesting votes from gossip. I moved it out into the main replay loop, also was good to cut down on a lot of the arguments passed to the alpenglow vote functions 😃

@carllin carllin merged commit e1d86b4 into anza-xyz:master Mar 4, 2025
7 checks passed
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 1, 2025
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 1, 2025
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 1, 2025
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 1, 2025
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 1, 2025
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 1, 2025
bw-solana pushed a commit to bw-solana/alpenglow that referenced this pull request Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants