Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@AshwinSekar
Copy link
Contributor

@AshwinSekar AshwinSekar commented Dec 1, 2023

Problem

wider retransmitter set for last erasure batch

Summary of Changes

mark slot as invalid in fork choice if size < 64 shreds

Fixes #

@AshwinSekar AshwinSekar force-pushed the full-fec-fork-choice branch 5 times, most recently from 388d7bb to 9ddee53 Compare December 1, 2023 01:23
@AshwinSekar AshwinSekar marked this pull request as ready for review December 1, 2023 01:36
Some((bank.parent_slot(), bank.parent_hash())),
);
// If the block does not have at least 64 shreds in the last FEC set, mark
// it as duplicate, effectively removing it from fork choice.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// it as duplicate, effectively removing it from fork choice.
// it as invalid, effectively removing it from fork choice.

right? could be for reasons other than fuckery

);
// If the block does not have at least 64 shreds in the last FEC set, mark
// it as duplicate, effectively removing it from fork choice.
let mut incomplete_last_fec_set = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you are checking for a specific size, so it's not incomplete_last_fec_set, it's last_fec_set_too_small or something along that line?

bank.slot(),
u32::try_from(last_shred_index).expect("LAST_SHRED_IN_SLOT should be u32"),
)) {
if erasure_meta.total_shreds() >= 64 {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably get this constant from somewhere else depending on how the other PR is implemented.

heaviest_subtree_fork_choice
.mark_fork_invalid_candidate(&(bank.slot(), bank.hash()));
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Add a test somewhere?

@AshwinSekar
Copy link
Contributor Author

should be merged after #34330

Comment on lines 2901 to 2902
// If the block does not have at least 64 shreds in the last FEC set, mark
// it as invalid, effectively removing it from fork choice.
Copy link
Contributor

Choose a reason for hiding this comment

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

This definitely needs a feature-gate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why? there is no bank hash change

Copy link
Contributor

Choose a reason for hiding this comment

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

what if 40% of the cluster mark it invalid and the other 60% vote on it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fair point 😅 - that specific scenario will work but 50/50 will kill us
will add a feature gate

if let Some(last_shred_index) = slot_meta.last_index {
if let Ok(Some(erasure_meta)) = blockstore.erasure_meta(ErasureSetId::new(
bank.slot(),
u32::try_from(last_shred_index).expect("LAST_SHRED_IN_SLOT should be u32"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not look right. Are you using this as the fec_set_index?

@AshwinSekar AshwinSekar marked this pull request as draft December 6, 2023 21:37
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 21, 2023
@behzadnouri behzadnouri removed the stale [bot only] Added to stale content; results in auto-close after a week. label Dec 21, 2023
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jan 5, 2024
@github-actions github-actions bot closed this Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale [bot only] Added to stale content; results in auto-close after a week.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants