Open realbigsean opened 11 months ago
A Blob is 131kB, MacOS default stack size is 512 kB, so a single Blob does use more than 25% of what's available.
Miscellaneous copies would lead to an overflow.
Now in general Blob should always be on the heap due to their size.
Thanks @mratsim
Now in general Blob should always be on the heap due to their size.
I agree. We don't store them internally on the stack, but when we pass them to c-kzg
, we're forced to initialize a blob-sized array (at the link in the PR description). I'm interested in trying out constantine
, either directly or via rust-kzg
.
Steps to reproduce
Info
I haven't investigated whether the stacks usage is high in this particular test prior to this call or if there's a different issue:
https://github.com/ethereum/c-kzg-4844/blob/main/bindings/rust/src/bindings/mod.rs#L234
I think we should explore updating
c-kzg
bindings to accept slices so we don't have to do this transition from lighthouse types toc-kzg
types (which is forcing this stack allocation, and also forces us to copy/clone blobs during verification)