Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Enforce EIP-1085 style for the genesis file of beacon chain #451

Closed
mhchia opened this issue Mar 23, 2019 · 1 comment
Closed

Enforce EIP-1085 style for the genesis file of beacon chain #451

mhchia opened this issue Mar 23, 2019 · 1 comment
Labels

Comments

@mhchia
Copy link
Contributor

mhchia commented Mar 23, 2019

What is wrong?

In #307, BeaconConfig is generated through hardcoded chain_id, network_id, and the other configs SERENITY_CONFIG.

How can it be fixed

It is possibly useful if we move the configs to a standalone genesis-beaconchain.json, in order to 1) remove hardcoded values for genesis. 2) share the config across ETH serentiy clients.

Steps

  • Create the json-schema for the beacon chain genesis file, enforcing EIP-1085-like style.
  • Load and validate the genesis file with the json-schema, which is implemented in Trinity, as the genesis_config.
  • Add BeaconConfig.from_beaconchain_genesis_config, to load genesis_data from the genesis_config
  • Generate BeaconChain with BeaconConfig.initialize_chain, which generates the chain with BeaconConfig.genesis_data

Reference

@mhchia mhchia added the eth2.0 label Mar 23, 2019
@ralexstokes
Copy link
Member

closing due to stalness. we can revisit if needed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants