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
118 stars 109 forks source link

Tracking issue: consider allocating Blobs on the heap #465

Open kevaundray opened 3 months ago

kevaundray commented 3 months 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 3 months ago

(Same argument could apply for the Cell type too)