solana/ledger
behzad nouri a913068512 embeds versioning into shred binary
In preparation of
https://github.com/solana-labs/solana/pull/25237
which adds a new shred variant with merkle tree branches, the commit
embeds versioning into shred binary by encoding a new ShredVariant type
at byte 65 of payload replacing previously ShredType at this offset.
    enum ShredVariant {
        LegacyCode, // 0b0101_1010
        LegacyData, // 0b0101_1010
    }

* 0b0101_1010 indicates a legacy coding shred, which is also equal to
  ShredType::Code for backward compatibility.
* 0b1010_0101 indicates a legacy data shred, which is also equal to
  ShredType::Data for backward compatibility.

Following commits will add merkle variants to this type:
    enum ShredVariant {
        LegacyCode, // 0b0101_1010
        LegacyData, // 0b1010_0101
        MerkleCode(/*proof_size:*/ u8), // 0b0100_????
        MerkleData(/*proof_size:*/ u8), // 0b1000_????
    }
2022-06-02 18:55:50 +00:00
..
benches Make PacketBatch packets vector non-public (#25413) 2022-05-23 15:30:15 -05:00
src embeds versioning into shred binary 2022-06-02 18:55:50 +00:00
tests hides implementation details of shred from its public interface (#24563) 2022-04-25 12:43:22 +00:00
.gitignore
Cargo.toml chore: bump lru from 0.7.5 to 0.7.6 (#25572) 2022-05-26 19:05:02 +00:00
build.rs adds crds-value for broadcasting duplicate shreds through gossip (#14133) 2020-12-18 14:32:43 +00:00