-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt ckzg changes for runtime parameters #4818
Conversation
Here's what I was thinking wrt runtime integration: pawanjay176#7 If we view the
|
I don't think I would like to wait for the upstream PR to get merged or dropped before deciding anything though, since there's talk about just ditching minimal blob sizes. |
Closing this as ckzg moved away from runtime parameters support |
Issue Addressed
Resolves #4440
Proposed Changes
Adopt the changes in ethereum/c-kzg-4844#376 to change
FIELD_ELEMENTS_PER_BLOB
into a runtime instead of compile time parameterThis is a strict improvement imo to what we had in the compile time constants world (atleast for lighthouse) for the following reasons:
KzgPreset
trait since the code for minimal and mainnet parameters are the same. This reduces a lot of generics that was introduced mainly to allow for working with different sized blobs in the compile type constants caseImo, this also doesn't reduce type safety because the ssz blobs are already type checked based on if we are running with mainnet preset or mimimal preset.
The only type safety we loose is it's now possible to load a minimal trusted setup for a mainnet preset lighthouse binary. We can easily get over this issue by just introducing this check when building a beacon chain struct which would exit lighthouse on startup
We do similar checks for loading invalid genesis bytes or invalid checkpoint states, so I don't think this is a big deal. In case we want additional compile time guarantees, we should be able to wrap the
ckzg::KzgSettings
struct into a const generics newtype that depends on EthSpec in lighthouse.