Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recovers Merkle shreds using mutable references into shreds payloads
Erasure recovery for Merkle shreds copies the erasure shards out of the shreds: https://github.com/anza-xyz/agave/blob/df5c9ad28/ledger/src/shred/merkle.rs#L893 and then resizes and copies recovered shards after erasure recovery which might cause another re-allocation: https://github.com/anza-xyz/agave/blob/df5c9ad28/ledger/src/shred/merkle.rs#L157-L158 https://github.com/anza-xyz/agave/blob/df5c9ad28/ledger/src/shred/merkle.rs#L246-L247 In order to minimize allocations and memory copies, this commit instead uses mutable references into the shred payload, passing them directly as shards to the Reed-Solomon implementation.
- Loading branch information