OffchainLabs / eth-pos-devnet

MIT License
103 stars 124 forks source link

Error: could not set config params: conflicts with existing config #9

Closed hiromaily closed 10 months ago

hiromaily commented 1 year ago

The following error seems to occur after docker compose up

eth-pos-devnet-create-beacon-chain-genesis-1  | time="2023-01-24T07:46:00Z" level=fatal msg="Could not generate beacon chain genesis state" error="could not set config params: config name=interop conflicts with existing config named=mainnet: configset cannot add config with conflicting fork version schedule" prefix=genesis
imsundusk commented 1 year ago

i am having the exact same issue. i tried building with source it works for the first time but when i restart the beacon chain it never get back to sync state.

patrickmao93 commented 1 year ago

anyone found any solutions to this?

zyDevoted commented 1 year ago

I change Config_Name and PRESET_BASE in the config.yml to mainnet, and the container won't exit 1,but i can not see the beacon chain in normal operation, i guess the network configuration is not consistent

pelyhe commented 1 year ago

Anyone found a solution for this?

pelyhe commented 1 year ago

You have to add the following fields to the config.yml file and it is going to work! GENESIS_FORK_VERSION: 0x20000089 ALTAIR_FORK_VERSION: 0x20000090 BELLATRIX_FORK_VERSION: 0x20000091 CAPELLA_FORK_VERSION: 0x20000092

seunlanlege commented 10 months ago

Actually this is my issue #31, Did anyone get it to work? I changed my CONFIG_NAME & PRESET_BASE to mainnet and while the docker containers run, the beacon chain nodes are unable to connect.

eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:14" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:20" level=info msg="Syncing with beacon node to align on chain genesis info" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:24" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:30" level=info msg="Syncing with beacon node to align on chain genesis info" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:34" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:40" level=info msg="Syncing with beacon node to align on chain genesis info" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:44" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:50" level=info msg="Syncing with beacon node to align on chain genesis info" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:12:54" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:13:00" level=info msg="Syncing with beacon node to align on chain genesis info" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:13:04" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:13:10" level=info msg="Syncing with beacon node to align on chain genesis info" prefix=validator
eth-pos-devnet-validator-1                    | time="2023-08-29 12:13:14" level=warning msg="Could not determine if beacon chain started" error="could not receive ChainStart from stream: could not setup beacon chain ChainStart streaming client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup beacon-chain on 127.0.0.11:53: no such host": could not connect: could not connect" prefix=validator
kasey commented 10 months ago

Hi @seunlanlege we index all the configs in order to automatically determine the chain and fork for checkpoint sync from the ssz-encoded state. An implementation detail is that we enforce unique config names. So picking a unique name for config name should resolve this issue - please give that a try and ping me if that doesn't resolve your issue.

seunlanlege commented 10 months ago

Thanks for the response @kasey, I changed the config and preset base both to test. This prevents the containers from starting

@seunlanlege ➜ /workspaces/eth-pos-devnet (master) $ DOCKER_BUILDKIT=0 docker compose up 
[+] Running 5/5
 ✔ Container eth-pos-devnet-create-beacon-chain-genesis-1  Created                                                                                                                       0.1s 
 ✔ Container eth-pos-devnet-geth-genesis-1                 Created                                                                                                                       0.1s 
 ✔ Container eth-pos-devnet-geth-1                         Created                                                                                                                       0.1s 
 ✔ Container eth-pos-devnet-beacon-chain-1                 Created                                                                                                                       0.1s 
 ✔ Container eth-pos-devnet-validator-1                    Created                                                                                                                       0.1s 
Attaching to eth-pos-devnet-beacon-chain-1, eth-pos-devnet-create-beacon-chain-genesis-1, eth-pos-devnet-geth-1, eth-pos-devnet-geth-genesis-1, eth-pos-devnet-validator-1
eth-pos-devnet-create-beacon-chain-genesis-1  | time="2023-08-29T14:13:26Z" level=info msg="Specified a chain config file: /consensus/config.yml" prefix=genesis
eth-pos-devnet-create-beacon-chain-genesis-1  | time="2023-08-29T14:13:26Z" level=fatal msg="Could not generate beacon chain genesis state" error="could not set config params: config name=test conflicts with existing config named=mainnet: configset cannot add config with conflicting fork version schedule" prefix=genesis
eth-pos-devnet-create-beacon-chain-genesis-1 exited with code 1
service "create-beacon-chain-genesis" didn't complete successfully: exit 1
kasey commented 10 months ago

@seunlanlege , in addition to the unique config name, you also need to specify a unique fork version schedule. This is what pelyhe is showing in their config.yaml snippet above: https://github.com/OffchainLabs/eth-pos-devnet/issues/9#issuecomment-1468273851 That's just one example of a unique fork version schedule - I like to pick a 3 hex byte "prefix" that is common to each version (eg 0x424242 in the example below) and then a byte that is unique to each fork (eg 0x42424200, 0x42424201 -- IMO most intuitive is for the final byte to be in ascending order from genesis..capella). For example:

GENESIS_FORK_VERSION: 0x42424200
ALTAIR_FORK_VERSION: 0x42424201
BELLATRIX_FORK_VERSION: 0x42424202
CAPELLA_FORK_VERSION: 0x42424203
seunlanlege commented 10 months ago

Hi @kasey, so i tried this, but unfortunately got the same error. here's my config.yml

CONFIG_NAME: localnet
PRESET_BASE: localnet

# Genesis
GENESIS_FORK_VERSION: 0x52525500

# Altair
ALTAIR_FORK_EPOCH: 0
ALTAIR_FORK_VERSION: 0x52525501

# Merge
BELLATRIX_FORK_EPOCH: 0
BELLATRIX_FORK_VERSION: 0x52525502
TERMINAL_TOTAL_DIFFICULTY: 0

CAPELLA_FORK_EPOCH: 0
CAPELLA_FORK_VERSION: 0x52525503

# Time parameters
SECONDS_PER_SLOT: 12
SLOTS_PER_EPOCH: 6

# Deposit contract
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

And the ensuing error:

@seunlanlege ➜ /workspaces/eth-pos-devnet (master) $ DOCKER_BUILDKIT=0 docker compose up 
[+] Running 1/0
 ✔ Container eth-pos-devnet-create-beacon-chain-genesis-1  Created                                                                                                                        0.0s 
Attaching to eth-pos-devnet-beacon-chain-1, eth-pos-devnet-create-beacon-chain-genesis-1, eth-pos-devnet-geth-1, eth-pos-devnet-geth-genesis-1, eth-pos-devnet-validator-1
eth-pos-devnet-create-beacon-chain-genesis-1  | time="2023-08-29T15:34:49Z" level=info msg="Specified a chain config file: /consensus/config.yml" prefix=genesis
eth-pos-devnet-create-beacon-chain-genesis-1  | time="2023-08-29T15:34:49Z" level=fatal msg="Could not generate beacon chain genesis state" error="could not set config params: config name=localnet conflicts with existing config named=mainnet: configset cannot add config with conflicting fork version schedule" prefix=genesis
eth-pos-devnet-create-beacon-chain-genesis-1 exited with code 1
service "create-beacon-chain-genesis" didn't complete successfully: exit 1
@seunlanlege ➜ /workspaces/eth-pos-devnet (master) $ 
kasey commented 10 months ago

@seunlanlege I think the problem is that we added DENEB_FORK_VERSION so now you need to specify that one as well, eg DENEB_FORK_VERSION: 0x52525504

I suggest not specifying DENEB_FORK_EPOCH for now - the default will be MaxUint64 until the official deneb release, which ensures that prysm doesn't fork to that version in the meantime.

seunlanlege commented 10 months ago

DENEB_FORK_VERSION so now you need to specify that one as well, eg DENEB_FORK_VERSION: 0x52525504

Thanks for the help @kasey, adding the DENEB_FORK_VERSION fixes my issues.

rauljordan commented 10 months ago

Fixed this up as of latest master