incubator-tuweni
incubator-tuweni copied to clipboard
Genesis file creation tool
Genesis ceremonies involve having all participants take a JSON file which defines how the network will behave.
Motivation
Genesis files are easy to get wrong. They don't have a proper spec (question) and are written in JSON.
Scope of work
- Allow creation of Genesis files using a tool.
- Allow formatting of Genesis JSON contents using a specific formatter so it can be hashed and verified across peers.
Parity and Geth clients have different acceptable genesis files,
Parity: https://github.com/5chdn/crossclient-chainspec/blob/master/parity.json
Geth: https://github.com/5chdn/crossclient-chainspec/blob/master/geth.json
yes, the spec. isn't even agreed to as a standard in ethereum foundation, which chain_id and network_id having different meanings, but let's just ignore that for this argument.
I think a good place to start would be with something like this: https://github.com/ethereum-lists/chains where a network's metadata is at least indexed and agreed upon. Defining those terms first then worrying about specific parts such as alloc for example would be easier, as the amount of configuration is rather large when you start getting into IBFT2, etc.
Another good reference point would be the Parity config generator: https://paritytech.github.io/parity-config-generator/#config=e30=
I just committed a genesis file reader.
It definitely doesn't use as much flexibility as required, and some of the alloc keys are missing. Contribs to make that easier are welcome. We can easily make a genesis file writer as well.
Will check it out, I have a script I made to create a genesis file but it is for Hyperledger Besu, will have to dig it out. In the meantime will look at collecting a reference list I suppose of different chains? Should this only concern itself with EVM compatible, or would we want to include other types e.g. UTXO model?
The reader I made is meant for ethereum. It is too specific to ethereum to be reused for another chain, but you could get inspired by it pretty easily.
On May 30, 2020, at 17:23, sam bacha [email protected] wrote:
Will check it out, I have a script I made to create a genesis file but it is for Hyperledger Besu, will have to dig it out. In the meantime will look at collecting a reference list I suppose of different chains? Should this only concern itself with EVM compatible, or would we want to include other types e.g. UTXO model?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
We have a genesis tool now: https://github.com/apache/incubator-tuweni/tree/main/genesis
Closing as complete!