plugeth/core
Felix Lange 37dd9086ec core: refactor genesis handling
This commit solves several issues concerning the genesis block:

* Genesis/ChainConfig loading was handled by cmd/geth code. This left
  library users in the cold. They could specify a JSON-encoded
  string and overwrite the config, but didn't get any of the additional
  checks performed by geth.
* Decoding and writing of genesis JSON was conflated in
  WriteGenesisBlock. This made it a lot harder to embed the genesis
  block into the forthcoming config file loader. This commit changes
  things so there is a single Genesis type that represents genesis
  blocks. All uses of Write*Genesis* are changed to use the new type
  instead.
* If the chain config supplied by the user was incompatible with the
  current chain (i.e. the chain had already advanced beyond a scheduled
  fork), it got overwritten. This is not an issue in practice because
  previous forks have always had the highest total difficulty. It might
  matter in the future though. The new code reverts the local chain to
  the point of the fork when upgrading configuration.

The change to genesis block data removes compression library
dependencies from package core.
2017-03-23 15:58:43 +01:00
..
asm cmd/evm, core/asm: add EVM assembler (#3686) 2017-03-01 01:11:24 +01:00
state core/state: expose CommitTo 2017-03-23 15:58:42 +01:00
types core: refactor genesis handling 2017-03-23 15:58:43 +01:00
vm core/vm: use uint64 instead of *big.Int in tracer (#3805) 2017-03-22 15:32:51 +01:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
block_validator_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
block_validator.go all: swap out the C++ ethash to the pure Go one (mining todo) 2017-03-09 15:50:14 +01:00
blockchain_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
blockchain.go les: implement request distributor, fix blocking issues (#3660) 2017-03-22 20:44:22 +01:00
blocks.go core, core/state: fixed consensus issue added touch revert 2016-11-24 22:12:54 +01:00
chain_makers_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
chain_makers.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
chain_pow_test.go all: swap out the C++ ethash to the pure Go one (mining todo) 2017-03-09 15:50:14 +01:00
chain_pow.go all: swap out the C++ ethash to the pure Go one (mining todo) 2017-03-09 15:50:14 +01:00
dao_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
dao.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
database_util_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
database_util.go all: next batch of log polishes to contextual versions 2017-02-28 15:03:20 +02:00
error.go Merge pull request #1889 from karalabe/fast-sync-rebase 2015-10-21 11:44:22 -07:00
events.go core/vm: move Log to core/types 2017-01-06 14:15:22 +01:00
evm.go core, core/vm: implemented a generic environment (#3348) 2016-12-06 02:16:03 +01:00
fees.go Merge pull request #1515 from fjl/license-fixes 2015-07-28 04:29:42 -07:00
filter_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
gaspool.go all: update license information 2016-04-15 09:48:05 +02:00
gen_genesis_account.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
gen_genesis.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
genesis_alloc.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
genesis_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
genesis.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
headerchain.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
helper_test.go cmd/geth, cmd/utils, core, rpc: renamed to blockchain 2015-10-04 01:13:56 +02:00
mkalloc.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
state_processor.go all: next batch of log polishes to contextual versions 2017-02-28 15:03:20 +02:00
state_transition.go all: next batch of log polishes to contextual versions 2017-02-28 15:03:20 +02:00
tx_list_test.go core: abstract out a sorted transaction hash map 2016-09-02 14:15:40 +03:00
tx_list.go all: fix spelling errors 2017-01-06 19:44:35 +02:00
tx_pool_test.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
tx_pool.go Merge pull request #3723 from karalabe/logger-updates-2 2017-02-28 16:55:37 +02:00
types.go core/vm: move Log to core/types 2017-01-06 14:15:22 +01:00