reth icon indicating copy to clipboard operation
reth copied to clipboard

Use `ArrayVec` in `Encode` implementations

Open DaniPopes opened this issue 1 year ago • 0 comments
trafficstars

Describe the feature

Some types like StoredNibblesSubKey have a maximum fixed size, which can benefit from using ArrayVec<u8, N> to avoid using heap memory. However, BufMut must be implemented for it, which requires a wrapper struct like ArrayVecCompat<T, const N: usize> which implements BufMut like for vec.

Blocked on https://github.com/paradigmxyz/reth/issues/11351 since we may use our own trait

Additional context

No response

DaniPopes avatar Sep 30 '24 17:09 DaniPopes