ethereum / c-kzg-4844

A minimal implementation of the Polynomial Commitments API for EIP-4844 and EIP-7594, written in C.
Apache License 2.0
112 stars 105 forks source link

Tracking issue: consider allocating Blobs on the heap #465

Open kevaundray opened 1 month ago

kevaundray commented 1 month ago

Currently Blobs are allocated on the stack in some of the bindings, see for example, Rust here

This is a tracking issue to discuss changing it so that Blobs are heap allocated, where the benefit is that we do not put large (131KB per Blob) items on the stack, consequently removing the possibility of accidental stackoverflow issues in downstream dependencies.

kevaundray commented 1 month ago

(Same argument could apply for the Cell type too)