solana/ledger
behzad nouri 45e26574f3
removes redundant shred.sanitize() from blockstore (#28016)
Shreds received from other nodes over the socket are sanitized when the
payload is deserialized:
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/legacy.rs#L137
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/legacy.rs#L77
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/merkle.rs#L355
https://github.com/solana-labs/solana/blob/315707504/ledger/src/shred/merkle.rs#L439

Similarly, shreds recovered from erasure codes are also sanitized at
deserialization:
https://github.com/solana-labs/solana/blob/f02fe9c7e/ledger/src/shredder.rs#L330
or explicitly so for Merkle shreds:
https://github.com/solana-labs/solana/blob/f02fe9c7e/ledger/src/shred/merkle.rs#L753

Shreds generated locally by the node itself during its leader slots do
not need to be sanitized.

So sanitizing shreds in blockstore is redundant and wasteful. In
particular this becomes more wasteful with Merkle shreds because
sanitizing shreds would require verifying Merkle proof.
As such the commit removes redundant shred.sanitize() from blockstore.
2022-09-24 16:31:50 +00:00
..
benches plumbs through flag to generate merkle variant of shreds 2022-09-23 16:45:18 +00:00
src removes redundant shred.sanitize() from blockstore (#28016) 2022-09-24 16:31:50 +00:00
tests plumbs through flag to generate merkle variant of shreds 2022-09-23 16:45:18 +00:00
.gitignore system_instruction_processor updates (#6448) 2019-10-19 18:23:27 -07:00
Cargo.toml removes redundant shred.sanitize() from blockstore (#28016) 2022-09-24 16:31:50 +00:00
build.rs adds crds-value for broadcasting duplicate shreds through gossip (#14133) 2020-12-18 14:32:43 +00:00