Skip to content

feat(shred,repair): shred publish to repair #4561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

lidatong
Copy link
Member

@lidatong lidatong commented Mar 18, 2025

This PR changes the shred tile and topo such that shred now publishes to repair (Firedancer-only). The idea is the repair tile will now fan-in the shred tiles, and will be a single tile. It will handle merkle chaining validation (which requires serial ordering). It will also know how to repair late shreds inside in-progress FECs, and do this intelligently (only repair shreds in a FEC set that aren't redundant with what's already been received). Finally, repair will also receive and recover duplicate block issues, subsuming / removing the need for the separate eqvoc tile.

The shred_repair sig is now encoded as two different types (shred header or FEC set complete). Previously this was encoded in a single bit on a common message type.

Now the shred tile publishes different message types indicated in the sig. It only publishes to the link if it exists, and only writes to the blockstore if it exists. This simplifies the logic in the shred tile publishing.

Closes #4528

@lidatong lidatong changed the title feat(shred): better shred-repair encoding and update shred tile publish feat(shred): two shred-repair sig types and update shred tile publish Mar 18, 2025
@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch from 571c579 to f862fcc Compare March 18, 2025 22:01
@lidatong lidatong changed the title feat(shred): two shred-repair sig types and update shred tile publish feat(shred): two shred_repair sig types and update shred tile publish Mar 18, 2025
@lidatong lidatong marked this pull request as draft March 18, 2025 22:03
@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch 2 times, most recently from 4fe2d68 to 7b30357 Compare March 18, 2025 22:43
@lidatong lidatong changed the title feat(shred): two shred_repair sig types and update shred tile publish feat(shred,topo): two shred_repair sig types and shred publish Mar 18, 2025
@lidatong lidatong changed the title feat(shred,topo): two shred_repair sig types and shred publish feat(shred,topo): shred publish to repair and sig types Mar 18, 2025
@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch from 7b30357 to d37682d Compare March 18, 2025 22:47
@lidatong lidatong changed the title feat(shred,topo): shred publish to repair and sig types feat(shred,repair): shred publish to repair Mar 18, 2025
@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch 14 times, most recently from ce3676a to 2e8a20a Compare March 19, 2025 19:26
ulong completes_ul = (ulong)completes;
return slot_ul << 32 | shred_idx_ul << 17 | fec_set_idx_ul << 2 | is_code_ul << 1 | completes_ul;
fd_disco_shred_repair_sig( int type, int is_code_or_data_completes, ulong slot, uint fec_set_idx, uint shred_idx_or_data_cnt_or_parent_off ) {
ulong type_ul = (ulong)type;

Choose a reason for hiding this comment

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

To prevent unexpected behavior, ensure that 'type' is either FD_DISCO_SHRED_REPAIR_SIG_TYPE_HDR or FD_DISCO_SHRED_REPAIR_SIG_TYPE_FEC.

assert(type == FD_DISCO_SHRED_REPAIR_SIG_TYPE_HDR || type == FD_DISCO_SHRED_REPAIR_SIG_TYPE_FEC);

@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch 3 times, most recently from 0d78ad1 to 5e38532 Compare March 26, 2025 18:41
@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch 8 times, most recently from c54bba5 to 4ee1fba Compare March 27, 2025 19:28
@lidatong lidatong force-pushed the chali/feat/shred-repair-sig branch from 4ee1fba to 8e0a1f2 Compare March 27, 2025 22:47
@lidatong lidatong closed this Apr 24, 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.

2 participants