0xPolygon / polygon-edge

A Framework for Building Ethereum-compatible Blockchain Networks
https://polygon.technology/solutions/polygon-edge/
Apache License 2.0
1.01k stars 534 forks source link

Error writing genesis block: failed to initialize ChildValidatorSet contract. #1449

Closed mrandall101 closed 1 year ago

mrandall101 commented 1 year ago

Error writing genesis block: failed to initialize ChildValidatorSet contract.

when trying to start the childchain server this happens with a different chain-id

./polygon-edge polybft-secrets --insecure --data-dir test-chain- --num 4 --chain-id 4455

../polygon-edge rootchain deploy --json-rpc https://matic-mumbai.chainstacklabs.com --erc20-token 0x..... --deployer-key 0x....

./polygon-edge genesis --block-gas-limit 10000000 --epoch-size 10 --mintable-native-token --consensus polybft --json-rpc https://matic-mumbai.chainstacklabs.com --pos --chain-id 4455 --native-token-config name:SYMBOL:18

when you run this command you will get the error and the childchain will crash, Its a catastrophic error that makes supernets unusable.

./polygon-edge server --data-dir ./test-chain-1 --chain genesis.json \ --grpc-address :10000 --libp2p :30301 --jsonrpc :10002 --relayer \ --num-block-confirmations 2 --seal --log-level DEBUG 2>&1 | tee ./validator-1.log &

Your environment

Expected behavior

Stefan-Ethernal commented 1 year ago

In case the same chain-id is provided to the polybft-secrets and genesis commands, there should not be any problems. I have reproduced the issue when chain-id were not the same; otherwise, it works well on my end.

mrandall101 commented 1 year ago

@Stefan-Ethernal Ok thank you