* Begin adding Deposit Index to beacon state
* Move deposit index increment to ProcessDeposit
* Fix initial deposits bug
* Fix bug in RPC
* More bug fixes
* Fix RPC bug, ensure deposits are processed in the right order
* Fix tests
* Fix merge
* Attempt to fix pruning deposits on regular sync
* Fix pending deposits on node restart
* Fix test
* Fix tests properly
* Gofmt
* Remove unneeded logs
* Fix build
* update protos
* Revert "Use DB to Fetch Justified Block (#2172)"
This reverts commit 60c254d818.
* use justified root and previous justified root across the repo
* change attester server to use state justified root
* remove commented code
* fix build issues
* fix test
* fix all tests
* fix merge issues
* headRoot is a better name
* yay merged with master
* fixed attester server returning incorrect attestation field values
* revert stupid mock changes
* fixed and updated all the tests
* uncomment
* head start should handle skip blocks
* Raul's feedback
* Add initial test
* chkpt
* add failing test
* add span to historical state lookup
* use db.HighestBlockSlot()
* fix comment
* update comment
* i wrote a test like a good programmer.
* add test back
* add assertion and unskip test, something new failing tho
* trying to fix test
* remove -1, not sure if i need it yet
* Revert "remove -1, not sure if i need it yet"
This reverts commit 2cfcbb8108b28bb3d7135a993d9053150d5f1e6e.
* save historical state on every save state
* fix hsitorical states
* set historical state in initialize state
* change to a bool
* fix error with empty retrieval of states
* Add missing import
* fix test
* lock in receive block
* remove state generator
* Revert "lock in receive block"
This reverts commit 151b10829d70b2dad3055a8db36d0e1269a853f2.
* Fix Initial Sync Not Processing Canonical Block to Produce Canonical State (#2152)
* fix init sync
* fatal if highest observed root does not match
* proto fields
* Update beacon-chain/sync/initial-sync/service.go
* confirm canonical state root
* fix most tests
* failing test
* fix PR tests
* lint
* no simbackend changes
* logf revert
* add todo
* fix off by one
* fix test with deleted property
* merge #2157
* passing tests :)
* refactor initial sync to prevent reorg infinite loops
* lint
* fixed build
* passing tests
* tests passing
* terence suggestion
* new attempt
* clean up and refactor sync service
* complete the new initial sync logic
* revert head
* init sync working
* config for blockchain receive block
* all works
* builds
* fix a few more tests
* init sync tests pass
* revert scripts
* revert accounts changes
* lint
* lint2
* travis lint
* fix build
* fix single use argument
* any peer
* imports spacing
* imports
* ready for a rolling restart
* add todo
* fork choice in blocks when exiting sync
* readd finalized state root to requests
* successful build
* revert blockchain config
* old config reversion
* initial sync tests pass
* initial sync full test works
* lint
* use the new block processing api
* new proto defs
* init sync functions again
* remove sync polling
* tests fixed
* fixed catching up with chain
* tests pass
* spacing
* lint
* goimports
* add changes
* add lock and conditional to prevent multiple goroutines
* make reg sync synchronous
* add
* fixed the parent block issue
* fix errors in chain service
* tests pass
* check nil block
* typo
* fix nil state
* merge & conflicts
* revert synchronus reg sync
* add more spans to state db
* fix lint
* lint
* plug forkchoice to blockchain service's block processing
* fixed tests
* more fixes...
* clean ups
* fixed test
* Update beacon-chain/blockchain/block_processing.go
* merged with 2006 and started fixing tests
* remove prints
* fixed tests
* lint
* include ops service
* if there's a skip slot, slot--
* fixed typo
* started working on test
* no fork choice in propose
* bleh, need to fix state generator first
* state gen takes input slot
* feedback
* fixed tests
* preston's feedback
* fmt
* removed extra logging
* add more logs
* fixed validator attest
* builds
* fixed save block
* children fix
* removed verbose logs
* fix fork choice
* right logs
* Add Prometheus Counter for Reorg (#2051)
* fetch every slot (#2052)
* test Fixes
* lint
* only regenerate state if there was a reorg
* better logging
* fixed seed
* better logging
* process skip slots in assignment requests
* fix lint
* disable state root computation
* filter attestations in regular sync
* log important items
* better info logs
* added spans to stategen
* span in stategen
* set validator deadline
* randao stuff
* disable sig verify
* lint
* lint
* save only using historical states
* use new goroutine for handling sync messages
* change default buffer sizes
* better p2p
* rem some useless logs
* lint
* sync tests complete
* complete tests
* tests fixed
* lint
* fix flakey att service
* bug fixes
* Update beacon-chain/sync/initial-sync/service.go
* Update beacon-chain/sync/initial-sync/service.go
* reenable shuffle
* enable shuffle
* plug forkchoice to blockchain service's block processing
* fixed tests
* more fixes...
* clean ups
* fixed test
* Update beacon-chain/blockchain/block_processing.go
* merged with 2006 and started fixing tests
* remove prints
* fixed tests
* lint
* include ops service
* if there's a skip slot, slot--
* fixed typo
* started working on test
* no fork choice in propose
* bleh, need to fix state generator first
* state gen takes input slot
* feedback
* fixed tests
* preston's feedback
* fmt
* removed extra logging
* add more logs
* fixed validator attest
* builds
* fixed save block
* children fix
* removed verbose logs
* fix fork choice
* right logs
* Add Prometheus Counter for Reorg (#2051)
* fetch every slot (#2052)
* test Fixes
* lint
* only regenerate state if there was a reorg
* better logging
* fixed seed
* better logging
* process skip slots in assignment requests
* fix lint
* disable state root computation
* filter attestations in regular sync
* log important items
* better info logs
* added spans to stategen
* span in stategen
* set validator deadline
* randao stuff
* disable sig verify
* lint
* lint
* save only using historical states
* use new goroutine for handling sync messages
* change default buffer sizes
* better p2p
* rem some useless logs
* lint
* sync tests complete
* complete tests
* tests fixed
* lint
* fix flakey att service
* PR feedback
* undo k8s changes
* Update beacon-chain/blockchain/block_processing.go
* Update beacon-chain/sync/regular_sync.go
* Add feature flag to enable compute state root
* add comment
* gazelle lint fix
* Fix assignments bug where validators don't retry for assignments on failure
* synch only please
* trying to fix state issues
* trying random stuff
* do not explode
* use ctx
* working build, failing tests
* broadcast local addrs as well as relay addrs
* fixed p2p tests, more tests to fix still
* another test fixed, log warning instead of throw error
* Fix last tests
* godoc
* add test for broadcast in apply fork choiec
* remove unneeded code
* remove tracer adapter, not needed
* remove extra stuff
* remove any
* revert addr_factory
* revert addr_factory
* Revert "revert addr_factory"
This reverts commit e93fb706494a1070158b8db31e67146d6b0648ad.
* Revert "revert addr_factory"
This reverts commit dedaa405559cc818698870c4e4570953367f1e3c.
* revert removal of this code
* unused param
* update FFG check points in service
* where do stategenerators go?
* commented out state_generator_test for now
* moved state generator back to appropiate location
* fixed block processing with state generator
* fmt
* import circle bad commit
* fix
* taking preston's fix
* gaz
* save justified/finalized objs during beacon chain init
* update FFG check points in service
* where do stategenerators go?
* commented out state_generator_test for now
* moved state generator back to appropiate location
* fixed block processing with state generator
* fmt
* import circle bad commit
* fix
* taking preston's fix
* gaz
* refactor chain service
* restructure service and lint
* all calls to receive block in chain service are now blocking
* begin fixing tests
* refactored blockchain tests
* builds correctly
* blockchain tests pass again
* lint
* sync and rpc tests pass again
* done
* add in open tracing
* span in fork choice
* Update beacon-chain/blockchain/block_processing.go
Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
* remove hash field for state request
* change to finalized state root
* refactor code for bug
* add in saving of finalized state
* add method to db
* adding finalized state root
* add new changes
* add in new changes
* add in return vars
* goimports
* review comments
* error message
* fix broken build
* fix cache state tests
* lint
* implemented all the merkle func signatures
* branch indices complete
* check for index out of range in generating merkle proof
* completed full tests for sparse merkle trie impl
* lint
* formatting
* gazelle
* commentary
* ivan comments
* fmt
* get rid of the deposit trie
* recalculate trie when eth1 data changes
* default data response recalculates tree
* update merkle trie to use raw bytes
* use the new verify merkle root func
* builds
* if default data response historical deposits are empty, return the deposit root at the contract at the time
* work on trie
* trying again with more logging
* keep track of merkle trie indices, use correct big int ops
* use uint for merkle idx
* add todo
* update ticker correctly
* fix config and remove unnecessary logs
* readd plus one fix
* clarify some details
* weird imports spacing
* gazelle, lint
* fix tests using the new deposit trie
* builds but tests still fail
* rpc tests
* lint
* tests pass
* bazel lint
* rem commented block
* revert att slot fix
* preston comments
* comments
* fix build
* address last comment
* use counter
* imports
* 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
* adding check for chainHead
* add batch block limit
* adding state root
* removing genesisHash
* removing setBlockForInitialSync
* fixing tests
* remove obsolete check
* changing to check for state initialization
* changing var name
* fix test
* add in tests
* fix all tests
* lint
* reduce test time
* merge fixes
* gazelle
* fix current boundary issue
* gazelle
* test fix
* deprecate old epoch processing justified hash indices
* finality fixes
* fmt
* pseudocode
* underflow conditions
* add back att fix
* remove off by one fix
* fix most tests
* fix all tests
* fatal if impossible to receive chainstart
* fix tests
* fix
* custom delay
* completed custom delay
* errors
* better logs, nothing at genesis
* use demo in val
* add gazelle
* log
* starting to log stuff
* pass in ops
* avoid printing the large #s for debug, still working on tests..
* all around better logging
* fixed build error in epoch process
* fixed state transiton tests
* fixed block tests
* lint
* verify sigs in randao
* ready for inclusion falg
* only print waiting when slot is not valid
* fix build
* mod config
* fixed last justified slot issue
* fix inclusion
* fixed attestation issue
* using zero hash from params instead
* fix tests
* update balance
* removed swp
* more `- genesis_slot` for logs
* rem unused log
* fix broken tests
* account for skip slots in state root computation
* fixes done
* validator guide bug fixes - 671
* epoch boundary at the last slot of the epoch
* fix epoch issue
* more balance cal logs for debugging
* greater balance
* attestaton fixes
* fixes
* addressed testrun
* fixed ejection balance
* fix tests with far future epoch
* revert sync change
* revert initial sync change
* fix changes
* off by one att fix
* revert the att fix
* address comments
* format
* fix build
* rem file
* clean up test
* adding test setup
* add chainstart check to sync querier
* goimports
* goimports
* backend cleanup
* adding getters
* lint
* moving to db
* gazelle
* adding more services setup
* adding more changes
* adding different test setups
* other merge issues
* imports
* fixing keys
* get intial sync able to be set up
* new changes and gazelle
* use simulated p2p
* everything finally works
* unexport fields
* revert changes from merge
* remove mock server
* add documentation
* gazelle
* add another node
* review comments
* fix tests
* 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 state initialized feed to send to rpc service
* rpc tests pass by using mock initializer
* verifies the chain start send and receive
* chain start chan sub test
* goimports
* fix bug in eth1 data vote count increases
* updating attester slashings
* is double vote and attester pseudocode
* attester slashing revamp complete
* exits processing complete
* all block operations aligned to spec
* completed test revamp
* builds properly
* all done FINALLY
* deprecate all instances of old randao logic
* fix all broken tests and cleanup randao references across repo
* builds but tests failing
* fixing broken chaintests
* only chaintests fail now
* randao fully updated
* add bls todo
* lint
* travis
* fix unresolved property in struct
* remove used randao var
* initial validator attesthead rewrite based on proposer rewrite
* proceed with fetching committees and tree hashing the canonical head at assigned attester slot
* complete filling the properties of attestation data and all associated root hashes
* add when to attest todo
* finish entire attester client logic
* tests with mocks checked in
* tests passing in client
* stubbed out server implementation
* fixed build due to old property
* regen mocks with new mockgen version
* fixed broken tests
* complete bazel build fix
* address some review comments
* deep proto test
* tests passing after checking for empty committee and crosslink root
* address nishant comments
* able to bazel build beacon chain.. yay
* fixed package validator tests
* fixed a few more package tests (epoch, blockops, forkchoice)
* fixed all the tests! and lint. Woohoo
* moving committee helpers to own package
* more fixes at epoch processing
* fixed rewards and penalties tests
* fixed rest of the tests. yay
* tests passing once again in db package
* fixed all tests
* revert some weird p2p changes made accidentally
* fix repeated code
* build fixed
* fix p2p
* fix all tests
* update proto fileds
* Start writing ProcessETH1Data function
* More progress on tests
* Continue more work on tests
* Fix almost all the tests
* Fix all tests
* Fix everything
* Fix after rebase
* Fix for suggestions and fix per-epoch operation
* Remove method usage
* Fix build
* Fix suggestions
* Fix merge issues and suggestions
* Fix rebase issues
* Remove the error from ProcessETH1Data
* WIP write test
* Update test to reach crosslinks
* Revert "Update test to reach crosslinks"
This reverts commit 5ff9177f96c12c98c54eafffcfb385bd966b0888.
* Revert "WIP write test"
This reverts commit f7e7ed715c4af6b7e3c95643f7ebf85830caf638.