Skip to content
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

feat: add ephemery network #6054

Merged

Conversation

atkinsonholly
Copy link
Contributor

@atkinsonholly atkinsonholly commented Oct 19, 2023

Description

Add ephemery as a network option, requiring additions to packages/cli, packages/config and packages/prover.

This PR addresses the first, second and third tasks of issue#6050, relating to:

  • Add ephemery flag
  • Use backup download URL (ephemery.dev)
  • Use flag to override with custom path to a genesis.ssz file provided by user

Steps to test or reproduce

Checkout the branch:

git checkout atkinsonholly/ephemery-config

To run the ephemery network using the genesis.ssz download available at https://ephemery.dev/latest/genesis.ssz, run:

lodestar beacon --ephemery

which should show

warn: Initializing from a stale checkpoint state vulnerable to long range attacks
warn: Checkpoint sync recommended

To run the ephemery network using the checkpoint sync flag (recommended), run:

lodestar beacon --network ephemery --checkpointSyncUrl https://checkpointz.bordel.wtf/

which should result in

info: Initializing beacon from a valid checkpoint state

To run the ephemery network with a local genesis state file, run:

lodestar beacon ephemery --genesisStateFile path/to/genesis.ssz

@CLAassistant
Copy link

CLAassistant commented Oct 19, 2023

CLA assistant check
All committers have signed the CLA.

@atkinsonholly atkinsonholly mentioned this pull request Oct 19, 2023
5 tasks
@atkinsonholly atkinsonholly marked this pull request as ready for review October 24, 2023 09:39
@atkinsonholly atkinsonholly requested a review from a team as a code owner October 24, 2023 09:39
@atkinsonholly atkinsonholly requested a review from nflaig October 24, 2023 09:39
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good overall, thanks for the updates.

I was able to verify that Lodestar can join the network by running

./lodestar beacon --network ephemery --execution.engineMock --eth1 false

and seems to be able to follow the chain, peer count is a bit low but might be due to low network participation

info: Synced - slot: 34269 - head: 0x9db9…87f6 - exec-block: syncing(31423 0x7ac5…) - finalized: 0x7339…cd93:1068 - peers: 6
info: Synced - slot: 34270 - head: 0x6b41…442e - exec-block: syncing(31424 0x98b2…) - finalized: 0x7339…cd93:1068 - peers: 6
info: Synced - slot: 34271 - head: 0xbff4…9c82 - exec-block: syncing(31425 0x0be5…) - finalized: 0x7339…cd93:1068 - peers: 6
info: Synced - slot: 34272 - head: 0x909f…8388 - exec-block: syncing(31426 0x88f6…) - finalized: 0x2ccb…1d8d:1069 - peers: 6

This should cover the basic support mentioned in EIP 6916 rationale

@@ -62,4 +65,8 @@ export const genesisData: Record<NetworkName, GenesisData> = {
genesisTime: 1665396300,
genesisValidatorsRoot: "0x9d642dac73058fbf39c0ae41ab1e34e4d889043cb199851ded7095bc99eb4c1e",
},
ephemery: {
genesisTime: ephemeryChainConfig.MIN_GENESIS_TIME + ephemeryChainConfig.GENESIS_DELAY,
genesisValidatorsRoot: "0x0000000000000000000000000000000000000000000000000000000000000000",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the spec

It's important to note that genesis_validators_root is normally predefined in the client but in this case it's not known in advance which can potentially break certain architectures. For example light clients which are relying on hardcoded genesis_validators_root won't work.

Not sure how to resolve this issue, @g11tech maybe you have some thoughts on this.

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the cleanup and adding references

@nflaig nflaig merged commit cf13ce9 into ChainSafe:unstable Oct 26, 2023
@philknows philknows mentioned this pull request Nov 8, 2023
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants