Skip to content

Conversation

@xDimon
Copy link
Member

@xDimon xDimon commented Dec 17, 2025

No description provided.

Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
@xDimon xDimon requested review from kamilsa and turuslan December 17, 2025 11:19

// Safety: pull up head/safe_target up to the finalized root (just in case).
if (not blocks_.contains(head_)) {
head_ = latest_finalized_.root;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can finalized block have children? Should choose head from them?
Can use updateHead?

head_ = latest_finalized_.root;
}
if (not blocks_.contains(safe_target_)) {
safe_target_ = latest_finalized_.root;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can use updateSafeTarget?

Comment on lines +515 to +516
if (block.slot < finalized_slot) {
to_erase.push_back(hash);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to remove all blocks older than finalized block?
Did you want to remove forks (traverse, maybe cache map from parent hash to children list)?

@xDimon xDimon closed this Dec 17, 2025
@xDimon xDimon deleted the feature/prunning_of_fork_choice_store branch December 17, 2025 17:49
@kamilsa kamilsa restored the feature/prunning_of_fork_choice_store branch December 21, 2025 13:49
@xDimon xDimon deleted the feature/prunning_of_fork_choice_store branch December 29, 2025 09:02
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