solana/ledger
behzad nouri 37b8587d4e
expands number of erasure coding shreds in the last batch in slots (#16484)
Number of parity coding shreds is always less than the number of data
shreds in FEC blocks:
https://github.com/solana-labs/solana/blob/6907a2366/ledger/src/shred.rs#L719

Data shreds are batched in chunks of 32 shreds each:
https://github.com/solana-labs/solana/blob/6907a2366/ledger/src/shred.rs#L714

However the very last batch of data shreds in a slot can be small, in
which case the loss rate can be exacerbated.

This commit expands the number of coding shreds in the last FEC block in
slots to: 64 - number of data shreds; so that FEC blocks are always 64
data and parity coding shreds each.

As a consequence of this, the last FEC block has more parity coding
shreds than data shreds. So for some shred indices we will have a coding
shred but no data shreds. This should not cause any kind of overlapping
FEC blocks as in:
https://github.com/solana-labs/solana/pull/10095
since this is done only for the very last batch in a slot, and the next
slot will reset the shred index.
2021-04-21 12:47:50 +00:00
..
benches Revert "Add limit and shrink policy for recycler (#15320)" 2021-04-18 19:29:24 +00:00
src expands number of erasure coding shreds in the last batch in slots (#16484) 2021-04-21 12:47:50 +00:00
tests expands number of erasure coding shreds in the last batch in slots (#16484) 2021-04-21 12:47:50 +00:00
.gitignore
Cargo.toml Adjust tokio version to just "1" 2021-04-05 17:13:20 +00:00
build.rs