1

I'm working with Ethereum fork, called Wemix. According to the list of commands, it supports dumpgenesis command, which is supposed to generate genesis file (similarly to geth, though we don't need to run that command for ETH because ETH genesis.jon is available in Github). However, it generates Ethereum genesis instead of the Wemix one. Is there a way for Ethereum fork to produce its genesis, not Ethereum's?

Maybe it is somewhere in the chaindata DB, which I can open programmatically and read its data?

4
  • before you start your node you need to run geth init to initialize block 0 , after that it will only run for your network, not mainnet. if you start geth without init command executed previously, geth will make default initialization using mainnet genesis
    – Nulik
    Commented Nov 28 at 18:54
  • you can reconstruct genesis by assembling the JSON file from the data located in the header of the block 0, and to figure out the account balances, you will have to read the state using stateRoot (of block 0) and read all the accounts and their balances (and code)
    – Nulik
    Commented Nov 28 at 18:56
  • @Nulik thank you! regarding your second comment - any example how to read the state for particular block?
    – DimaA6_ABC
    Commented Nov 28 at 19:46
  • Ethereum provides functions for dumping the state, but I am not sure if there is a front-end to dump it, maybe with debug api? check cmd directory in ethereum sources. github.com/ethereum/go-ethereum/blob/…
    – Nulik
    Commented Dec 7 at 5:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.