Repository navigation
new crate for shred definitions - #6028
Draft
alexpyattaev wants to merge 4 commits into
Draft
alexpyattaev wants to merge 4 commits into
alexpyattaev wants to merge 4 commits into
Conversation
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 21, 2025
puhtaytow
reviewed
Aug 30, 2025
Closed
|
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6028 +/- ##
=========================================
- Coverage 82.4% 82.4% -0.1%
=========================================
Files 936 953 +17
Lines 372276 374232 +1956
=========================================
+ Hits 307042 308425 +1383
- Misses 65234 65807 +573 🚀 New features to boost your workflow:
|
Closed
Ports the agave-shred changes made on shred_integration back onto this branch: shred id types, kind-erased accessors, header-only admission, verify_with for a caller-side signature cache, ShredKind <-> u8, and Eq/Hash on shreds. MerkleTree::try_new becomes pub.
Restores the structural check the incumbent sanitizer made: a data shred whose flags set the slot-end bit without the FEC-set-end bit is rejected while it is read, so every path into a shred is covered. FecSetSpec now validates where an FEC set may start and which slots a batch may chain between, before anything is written, so building can no longer produce shreds that admission immediately rejects. Adds golden payload vectors captured from the incumbent shredder, which preserve the byte-for-byte compatibility coverage after it is deleted. Verified narrows to what it actually promises.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
network packet parsing definition has nothing to do with ledger
Summary of Changes
split off into a separate crate
State diagram
--- config: flowchart: curve: linear --- flowchart TB style packet stroke: #f00 style parsed stroke: #ff0 style nonce stroke: #ff0 style verified stroke: #0f0 style rebuilt stroke: #0f0 style column stroke: #0f0 packet["Bytes from the wire"] --> fn_parse[/"Shred::parse(bytes)"/] fn_parse -->|"shred body"| parsed["AnyShred ‹Parsed›<br/>Prov:Received(Repair)"] fn_parse -.->|"repair nonce"| nonce["BlockLocation"] nonce -.->batch subgraph "Sigverify worker" parsed -->|"into_data / into_code"| typed["Shred ‹K, Parsed›"] typed -->|"verify(policy, leader)"| verified["Shred ‹K, Verified›"] end verified -->|"resign(keypair)"| verified verified --> batch["insert batch"] column("blockstore column") -->|from_blockstore| batch batch -->|"recover(data, code)"| rebuilt["Shred‹K, Verified› Provenance::Recovered"] rebuilt --> batchProvenance tracking
flowchart LR wire["wire bytes"] -->|"parse"| received["Received(Turbine) / Received(Repair)"] partial["Partial FEC set"] -->|"recover"| recovered["Recovered"] column["blockstore column"] -->|"from_blockstore"| stored["Blockstore"] entries["serialized entries"] -->|"FecSet::build"| produced["BlockProduction"] received --> batch["insert batch"] recovered --> batch stored --> batch produced --> batchBlock production
flowchart TB entries["serialized entries"] -->|"coalesce"| chunk["serialized EntryBatch"] chunk -->|"FecSet::build(spec, data, keypair)"| set["FecSet, Provenance::BlockProduction"] set -.->|"merkle_root chaining"| chunk set -->|into_any| stream["AnyShred ‹Verified›"] stream --> wire["Broadcast"] stream --> columns["blockstore insert"] columns -->|from_blockstore| served["Shred ‹K, Verified› Provenance::Blockstore"] served -->|"into_repair_response(nonce)"| response["repair response"]Review guide:
The complete overhaul is implemented by five crates:
solana-shred-wire-formatwire-format/solana-shred-verifyverify/solana-shreddershredder/solana-fec-set-recoveryfec-set-recovery/solana-shred.LoC tally