You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, new CLI option --genesis which expects to be passed the filesystem path to a valid genesis JSON file. When --genesis has been provided we will require that --data-dir is also specified to avoid accidental collision with the mainnet and ropsten directories until we sort this API out a bit.
Validation of genesis data
Next we need validation for the genesis JSON. A simple function which takes the parsed JSON and raises an eth_utils.ValidationError if it is not valid.
Update the ChainConfig class
Next the trinity.config.ChainConfig class needs to be updated to include this genesis data. This includes:
New attribute chain_id that needs to be set on the ChainConfig class and probably stored on whatever Node class is used.
Setting genesis header
Next, in trinity.chains.get_chaindb_manager and trinity.chains.initialize_database we need to setup the database. We'll need the chain_class to do this. When --genesis has been specified, we need to use chain_class.from_genesis(...) to initialize the data dir. Ideally, we should be able to convert how the mainnet and ropsten chains are initialized to use the same mechanism, maintaining a local copy of the mainnet and ropsten genesis JSON (and probably validating them against the genesis header values from the py-evm package).
Part of this is going to be dynamically configuring the vm_configuration for the chain class from the provided genesis data.
What is wrong?
ethereum/EIPs#1085
How can it be fixed
Implement the spec
The text was updated successfully, but these errors were encountered: