* add recovery for initial sync
* add recovery for rpc
* adding to other services
* remaining services and tests
* fix test
* remove changes to rpc
* handle powchain
* handle in powchain
* abstract to shared package
* gazelle
* lint
* remove for operations
* add in more for operations
* travis
* fix lint
* begin using tree hash instead of hash for state and blocks
* replace with ssz
* rem references to vote cache
* replace all instances of state/block hash with root
* goimports
* almost every test in the world fails
* goimports
* all tests pass, tree hash across repo
* add fork choice helpers
* LMD GHOST basic implementation
* add todos
* add in the initial test and finalize rest of functions
* added tests
* more simulation, adding trivial case with only one option for a head
* panics
* begin helper function tests
* more helper tests
* higher vote wins
* LMD Ghost full test
* comment
* add types
* optimize
* prepared
* deposits for chain
* lint
* use the hash beacon block util
* rem unnecessary db methods
* comments
* setup works
* refactor repo to use protos
* removed block successfully in types
* db package updated
* db, core passing
* chain service done
* no more block instances
* all pass
* deprecate all block protos
* tests pass
* Persist Dag
* Add schema
* Add new message
* add mapping
* Adding check to save block
* Removing blocks mapping
* Make changes to block processing
* Change from mapping to a slice of hashes
* Adding tests to core
* adding more tests
* Fixing service test
* Add comments and fix bazel
* fix lint
* fix conflicts
* addressing review comments
* Removing references to active
* fixing tests with active state
* Protytype for #440: Persist blocks and latest state in DB
* simplify code
* removing block registry
* fix test
* adding block removal/iterator
* Addressing review comments
* Addressing comments
* removing extra line
* making vars private and adding canonical key
* fix lint
* splitting methods
* adding more changes
* lint
* improving coverage
* removing decodeslotnumber
* gazelle
* remove todos
* addressing preston's comments
* remove slotnumber
* lint
* begin with a block/state dag approach in prep for fork choice
* add TODOs for fork choice items, add data structure for forks
* remove syncing and processing states for incoming block sync
* simulator only broadcasts blocks now, no more state simulation
* fix sim tests, no more state sim
* bazel rerun
* naive fork choice
* split update head routine
* pesky race conditions
* fork choice rule works
* dag + fork choice working
* canonical head storage across sessions
* todo: save dag
* no more stalling after 10 blocks, using event feeds
* address review
* sync instead uses event feed
* refactored pure funcs into casper package
* tests pass
* fix lint
* refactor get blockhash
* refactor blockhashforslot
* event feed for incoming blocks in chainservice
* use config
* addressed all comments
* fix typo
* address yutaro comment
* using db interface
* check if parent hash in previous slot DAG
* works
* tests
* drop ffg suffix
* bazel gazelle
* full cov validators by height shard
* gazelle
* state tests
* all state tests
* 100% cov types and 99% cover casper
* cov up
* 80% blockchain cov
* fix lint
* sync functions for active and crystallized states
* make pb structure more semantic
* use run func to consolidate to one main routine
* remove mainchain package
* remove smc. yay!
* fixed NewSimulatedBackend
* added smc tests back
* race = off
* used latest commit from bazel-go-ethereum
* changed testoutput to all
* output test.log after failure
* disable race
* restore travis config to original state, add race=off to blockchain workspace
* added issue number and fixed typo
* Fix odd placement of import
* Puts all of NewGenesisBlock() into GenesisBlock()
Also removes the unneeded TODO
* Add error check for db retrieval
* Add missing bazel imports
* Add back NewGenesisBlock and create GenesisBlock in NewBeaconChian
* Fix GenesisBlock() to grab the block from memory db
* Fix according to requested changes
Fix GenesisBlock() to grab the block from memory db
Fix odd placement of import
Properly add ParentHash to Block
Remove no longer needed if statement condition
Puts all of NewGenesisBlock() into GenesisBlock()
Also removes the unneeded TODO
Add error check for db retrieval
Add case for if the beaconChain is missing a genesisBlock
Add missing bazel imports
Add back NewGenesisBlock and create GenesisBlock in NewBeaconChian
Remove duplicate code
Change genesis block timestamp to unix 0
Adds info log when a genesis block isn't found
* Provide fakeClock to pass tests with a mocked genesisBlock
* Fix unexpected log in test from addition of genesis block
* Add tests for clock