Skip to content

Document Shred-related types - #14428

Merged
plafer merged 1 commit into
anza-xyz:masterfrom
plafer:shred-cleanup-and-docs
Oct 7, 2026
Merged

plafer merged 1 commit into
anza-xyz:masterfrom
plafer:shred-cleanup-and-docs

Conversation

@plafer

@plafer plafer commented Aug 7, 2026 •

Copy link
Copy Markdown

The definition of how shred header fields work is relatively complex and previously had to be deduced by looking at the implementation. This PR documents those fields, adding additional context where (I judged was) useful.

@plafer
plafer force-pushed the shred-cleanup-and-docs branch 2 times, most recently from be56b7b to fecfe70 Compare August 7, 2026 16:04
@plafer
plafer requested a review from AshwinSekar August 7, 2026 16:05
@plafer
plafer force-pushed the shred-cleanup-and-docs branch from fecfe70 to 96afa92 Compare August 7, 2026 16:22
@codecov-commenter

codecov-commenter commented Aug 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.4%. Comparing base (f5bc27e) to head (5768142).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #14428     +/-   ##
=========================================
- Coverage    82.4%    82.4%   -0.1%     
=========================================
  Files         937      937             
  Lines      374297   374297             
=========================================
- Hits       308557   308550      -7     
- Misses      65740    65747      +7     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@plafer
plafer requested a review from KirillLykov August 7, 2026 19:09
@plafer
plafer force-pushed the shred-cleanup-and-docs branch 2 times, most recently from 6133c82 to 73bd4e4 Compare August 21, 2026 12:30
@plafer

plafer commented Aug 21, 2026

Copy link
Copy Markdown
Author

Rebased the PR, and removed the first commit (which was now a duplicate of #14656). So what's left is basically documenting the Shred-related types and fields.

Any chance I can get a review on this?

@steviez steviez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'll read through the comment in the morning after a night of sleep, but for now, mind updating the PR description to reflect current state + get green CI ?

@plafer plafer changed the title refactor(shred): type cleanup and docs Document Shred-related types Aug 24, 2026
@plafer
plafer force-pushed the shred-cleanup-and-docs branch from 73bd4e4 to 019bf9b Compare August 24, 2026 13:14
@plafer

plafer commented Aug 24, 2026

Copy link
Copy Markdown
Author

@steviez done

@steviez steviez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There are some nice additions here; didn't make it all the way through but have some nits. Might have @alexpyattaev take a look too since I believe work is starting to refactor Shred and underlying types in very near future. I think lots of this will still be valid but could always put it in now and then adjust as refactoring happen

Comment thread ledger/src/shred/merkle.rs Resolved
Comment thread ledger/src/shred.rs Resolved
Comment thread ledger/src/shred.rs Resolved
Comment thread ledger/src/shred.rs Resolved
Comment thread ledger/src/shred/merkle.rs Resolved
@alexpyattaev

Copy link
Copy Markdown

FYI we're taking a fresh look at the shred struct in #6028.

@steviez

steviez commented Aug 27, 2026

Copy link
Copy Markdown

FYI we're taking a fresh look at the shred struct in #6028.

@alexpyattaev - What do you think about landing these docs changes now ? I know a lot of code will be moving around for that, but the changes are seemingly good additions. The diff you just linked is +4800 so I'll admit I didn't look to see if we have the same stuff that @plafer introduced here

@alexpyattaev

alexpyattaev commented Aug 27, 2026 •

Copy link
Copy Markdown

I do not mind these docs landing, docs do not hurt, the FYI is because much of the current code may get axed soon. The new docs here are far better that status quo, so I'm in favor of merging this PR ASAP.

That PR is a preview of a future state, it will obviously need to be chunked up for actual merge. It is also ~2000 LoC less than existing ledger/src/shred* implementation.

@plafer

plafer commented Sep 2, 2026

Copy link
Copy Markdown
Author

Should we try to push this one through then? IMO it's worth merging even if this gets scrapped soon, since at the very least in the future, anyone looking at the current implementation in the git history will have docs to help.

@alexpyattaev

Copy link
Copy Markdown

Should we try to push this one through then? IMO it's worth merging even if this gets scrapped soon, since at the very least in the future, anyone looking at the current implementation in the git history will have docs to help.

Agree, this documents what we have, which would be handy during migration.

Comment thread ledger/src/shred/payload.rs Resolved
Comment thread ledger/src/shred.rs Resolved
Comment thread ledger/src/shred.rs Resolved
@plafer
plafer requested a review from steviez September 4, 2026 19:58
@plafer

plafer commented Sep 14, 2026

Copy link
Copy Markdown
Author

@steviez friendly bump 🙂

@alexpyattaev alexpyattaev left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This mostly LGTM, one small correction. fec_set_index is not in fact meaningless. Redundant, but not meaningless. better no comment than wrong comment. Also please squash all the commits into one & rebase on top of latest master, thank you!

Comment thread ledger/src/shred.rs Resolved
@alexpyattaev
alexpyattaev self-requested a review October 5, 2026 15:42
@plafer
plafer force-pushed the shred-cleanup-and-docs branch from fb52619 to 5768142 Compare October 6, 2026 19:31
@alexpyattaev alexpyattaev added the CI Pull Request is ready to enter CI label Oct 7, 2026
@github-actions github-actions Bot removed the CI Pull Request is ready to enter CI label Oct 7, 2026
@plafer
plafer added this pull request to the merge queue Oct 7, 2026
Merged via the queue into anza-xyz:master with commit 1d8597b Oct 7, 2026
54 checks passed
@plafer
plafer deleted the shred-cleanup-and-docs branch October 7, 2026 17:53
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.

4 participants