lighthouse
lighthouse copied to clipboard
Add option to select KZG library for PeerDAS
Description
We've recently switched from the c-kzg
library to the Rust peerdas-kzg
library on the das
branch (#5941). The purpose for the switch was to:
- Try out a new alternative to c-kzg;
- Allow us to merge
das
branch tounstable
without having to updatec-kzg
to a development version
However we've now lost the option to run the das
branch with ckzg
, which has been quite stable for a while. We've recently run into a few issues with peerdas-kzg
, including slow startup time and stack overflow during block production (#6105). Therefore I think it would be great to have the option to use ckzg
library, especially for public denvets, where a small number of reliable supernodes is required.
Ideally we want to be able to:
- maintain the ckzg library version for the mainnet code path
- optionally include the ckzg peerdas library when it's enabled via a feature flag, so both ckzg library will co-exist when this
ckzg-peerdas
feature is enabled, however this library will only be referenced by the PeerDAS portion of the code. - allow selecting the ckzg-peerdas library via a hidden runtime flag