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

Wrong chain id generated from config files #22

Open
jvbriones opened this issue Apr 5, 2023 · 4 comments
Open

Wrong chain id generated from config files #22

jvbriones opened this issue Apr 5, 2023 · 4 comments

Comments

@jvbriones
Copy link

jvbriones commented Apr 5, 2023

Very useful tool, thank you.

We are trying to set up a custom local network with capella support with some allocated accounts and contracts on the execution genesis file.

We generate the genesis.ssz file but when trying to use it, the generated network id is 1 instead of the one provided by the config files:

1) config inputs:

engine_genesis.json
{
  "config": {
    "chainId": 2018,
    ...
}
eth2_config.yaml
{
...
DEPOSIT_CHAIN_ID: 2018
DEPOSIT_NETWORK_ID: 2018
...
}

> ./eth2-testnet-genesis capella --config=eth2_config.yaml
--> output: genesis.ssz

2) starting up both execution and consensus clients

eth1_node:
 - --genesis-file=engine_genesis.json
 ...
eth2_node:
- --genesis-state=genesis.ssz

3) the eth2 node complains:

ERROR - PLEASE CHECK YOUR ETH1 NODE (endpoint http://eth1:8545)| Wrong Eth1 chain id (expected=1, actual=2018)

are we missing something?
thanks,

@parithosh
Copy link
Collaborator

The full command you'd need is: ./eth2-testnet-genesis capella --config=config.yaml --mnemonics=mnemonics.yaml --eth1-config=genesis.json . So the chainID is obtained from the file specified in --eth1-config and that is currently missing in your command.

@jvbriones
Copy link
Author

jvbriones commented Jul 24, 2023

you would need to specify in the command the config file names if you are not using the default values right?
is long time ago now, but we remember trying it with different ways without success - anyway, thank you.

@parithosh
Copy link
Collaborator

Ah, that file doesn't exist in the repo and should be corrected to default to ""... That was probably the source of your issue and I'll make a PR to change the default to null

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

No branches or pull requests

3 participants
@jvbriones @parithosh and others