Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: ChainConfigurator, use interface for chain configuration #18

Closed
meowsbits opened this issue Feb 19, 2020 · 1 comment
Closed

Comments

@meowsbits
Copy link
Member

meowsbits commented Feb 19, 2020

Migrated from: etclabscore/multi-geth-fork#68
Original author: @meowsbits


Interfaces are currently used for several important data types:

  • ChainReader (implemented by core.HeaderChain and core.BlockChain)
  • Engine
  • core.BlockValidator, etc.

https://github.com/etclabscore/multi-geth/blob/master/consensus/consensus.go#L32

We should use an interface for chain configuration as well (eg type ChainConfigurator interface {...}. This is of particular importance for our growing chain config which has now far-overgrown the upstream implementation. The effort would be in order to establish common patterns of configuration implementation, to enable translation/conversion between configuration data types, and to further un-hardcode some of the configuration opinions.

Doing so would enable various Chain Configurations (ethereum/go-ethereum, parity, multi-geth, even Aleth, PyEthereum, Besu??...) to run "natively" w/o awkward adhoc conversion methods (https://github.com/etclabscore/multi-geth/blob/feat/x-chainspec-types-and-tests/params/convert/parity.go#L321, https://github.com/ethereum/go-ethereum/blob/master/cmd/puppeth/genesis.go#L366). It would also greatly simplify and validate some testing workarounds (https://github.com/etclabscore/multi-geth/blob/feat/x-chainspec-types-and-tests/tests/params.go#L136)

Essentially this helps us pay back some of the technical debt we've inherited from upstream opinions.

Rel #67

@meowsbits
Copy link
Member Author

Resolved, now quite a while ago. See

.

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

No branches or pull requests

1 participant