-
Notifications
You must be signed in to change notification settings - Fork 166
Externalizable config for a chain #131
Comments
This is much needed. |
We already have the core.ChainConfig JSON, just no geth flag to specify the file. |
Edit: most recent example of JSON chain configuration file (including |
@splix By your proposed outline for the chain config above, would it be accurate to translate/summarize it in Go as something like: type ExternalChainConfig struct {
ID string `json:"id"`
Name string `json:"name"`
Genesis *core.GenesisDump `json:"genesisDump"`
ChainConfig *core.ChainConfig `json:"chainConfig"`
State []*core.GenesisAccount `json:"state"`
Bootstrap []*discover.Node `json:"bootstrap"`
} ? I'm just wanting to get feel for what we should expect the external chain config to cover, since we have an existing struct |
the idea of So for example:
means that this fork should enable code related to ecip1010, and pass options to it (anything custom, as kv map). ECIP-1010 is implemented in code, it's a change to difficulty formula. And this code will check if it's enabled or not for current block (chain config should be available from many places). Similar for
But this code is located in completely different place. So it's just a common place to make this configurations. Enabling a new gastable is another feature, which we already used for 2 upgrades. Prices itself are hardcoded and that's fine, we just need to enable price table by an Also keep in mind that
This config is proposing different structure and will require rewriting of different parts of app, like way to enable/disable current code for ECIP-1010, EIP155, and so on |
Another question: we now have an I'm imagining in this case a user could use either/both |
creates --chain flag to specify/name a chain migrates if necessary base datadir (</~/Ethereum> -> </~/EthereumClassic>) and migrates if necessary mainnet data to <.../mainnet> subdir addresses ethereumproject#65, ethereumproject#100, and ethereumproject#131
creates --chain flag to specify/name a chain migrates if necessary base datadir (</~/Ethereum> -> </~/EthereumClassic>) and migrates if necessary mainnet data to <.../mainnet> subdir branch now addresses ethereumproject#65, ethereumproject#100, and ethereumproject#131
Closing via #189. |
A json or yaml config for a chain.
I propose following structure:
Configs for mainnet and testnet should be compiled into geth binary, but user should be able to specify custom config file from command line
The text was updated successfully, but these errors were encountered: