fix: handle dynamic ephemery genesis metadata across config and lightclient paths#9204
fix: handle dynamic ephemery genesis metadata across config and lightclient paths#9204shrirajpawar4 wants to merge 4 commits intoChainSafe:unstablefrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Ephemery network configuration to support dynamic genesis and periodic resets. Key changes include updating the GenesisData type to allow a null genesisValidatorsRoot, implementing derivation functions for Ephemery's chain configuration based on the current time, and updating the API and CLI utilities to handle runtime-defined beacon configurations. These updates ensure correct light client serialization and slashing protection for networks where the genesis root is not statically known. I have no feedback to provide.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddf61d657b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@shrirajpawar4 please address the AI review comments |
|
@nflaig done ser. The genesis fetch call is now inside the |
Motivation
Ephemery was added in #6054, but some paths still assumed its genesis metadata was static. That left the remaining issue from #6050 unresolved in places that depend on
genesisValidatorsRoot, forkdigests, and reset-aware chain config values.
Description
This PR completes the remaining Ephemery work by treating its network metadata as runtime-derived instead of fully static.
Changes included:
MIN_GENESIS_TIME,DEPOSIT_CHAIN_ID, andDEPOSIT_NETWORK_IDfrom the current reset iterationgenesisValidatorsRootas unknown (null) in static network metadatagenesisValidatorsRootfrom the beacon API when static metadata does not provide oneBeaconConfigin lightclient route serialization so fork digests use the correct live genesis contextgenesisValidatorsRoottypeCloses #6050
AI Assistance Disclosure
used Codex to understand the code structure and identify the remaining gaps related to this issue. Each change was reviewed and is understood by me.