* use estimation instead
* fix test
* fixing another test
* fix tests and preston's comments
* remove unused var
* fix condition
* Revert "fix condition"
This reverts commit dee0e3112c01f68f30a2e50cd4eb35f29f672e1d.
* dont return error
* prune atts > one epoch old
* use VerifyAttestation instead
* added test to prune invalid att
* space
* added ctx
* fixed existing tests
* gaz
* gazelle
* first version - broken
* working proto changes
* resolve review remarks
* fix goimport issues
* fix service issues
* first logic version-broken
* first running version - no new tests
* fix validator client test
* add wait group to goroutines
* remove unused var in function call
* fix review remarks and tests
* merge master changes and fix conflicts
* gazzele fix
* fix prestonvanloon requested changes
* merge and some of terenc3t remarks addressed
* _,pk bug fix in log
* fix account file name suffix and filter not active validator out
* merge with master and fix missing parameters
* run over all public keys in hasvalidators
* add test for error when no all the validators has index in the db and hasvalidators is called
* fix runner tests fail due to timing issues
* goimports
* smaller sleep time in proposer tests
* fix UpdateAssignments loging
* fix goimports
* added && false commented TestUpdateAssignments_DoesNothingWhenNotEpochStartAndAlreadyExistingAssignments
* hasvalidators without missing publickeys list
* fix some of prestone review remarks
* fixes for prestone comments
* review changes applied
* expect context call in TestWaitForActivation_ValidatorOriginallyExists
* changed hasvalidators to return true if one validator exists
* fix init problem to getkeys
* hasvalidators requiers all validators to be in db
* validator attest assignments update
* fix ap var name
* Change name to hasallvalidators
* fix tests
* update script, fix any vs all validator calls
* fix wait for activation
* filter validator
* reuse the reply block
* fix imports
* Remove dup
* better lookup of active validators
* better filter active vlaidators, still need to fix committee assignment tests
* lint
* use activated keys
* fix for postchainstart
* fix logging
* move state transitions
* hasanyvalidator and hasallvalidators
* fix tests with updatechainhead missing
* add tests
* fix TestCommitteeAssignment_OK
* fix test
* fix validator tests
* fix TestCommitteeAssignment_multipleKeys_OK and TestWaitForActivation_ValidatorOriginallyExists
* fix goimports
* removed unused param from assignment
* change string(pk) to hex.EncodeString(pk) fix change requests
* add inactive validator status to assignments
* fix logging mess due to multi validator setup
* set no assignment to debug level
* log assignments every epoch
* logging fixes
* fixed runtime by using the right assignments
* correct activation request
* fix the validator panic
* correct assignment
* fix test fail and waitforactivation
* performance log issue fix
* fix goimports
* add log message with truncated pk for attest
* add truncated pk to attest and propose logs
* Add comment to script, change 9 to 8
* Update assignment log
* Add comment, report number of assignments
* Use WithError, add validator as field, merge block proposal log
* Update validator_propose.go
* fix
* use entry.String()
* fix fmt
* 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
* support multiple pubkeys
* a bit of refactoring to avoid calling db.state multiple times
* Add test for supporting multiple keys
* rename proto field
* 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
* 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
* 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>
* 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
* Verify signatures of attestations
* Implement BLS Signing for attestations
* Remove custody bit 0 from the attestation for now
* Fixes tests for attestations
* Fix tests to ensure they use proper attester indice
* Run gazelle
* Goimports
* Test attestation sigs in block operations
* Change formatting and make sure signatures are actually verified
* Fix duplicate import
* Fix duplicate import from merge
* Organize attestation sig to be conssitent with codebase
* Update to comments
* Change signatures to use aggregation
* Run gazelle
* Change function to return err instead of bool
Also gofmt
* Fix for comments
* Move createAggregationSignature to a function in attestations.go
* create wait for activation stream
* wait for activation server stream open
* complete server side logic
* formatting
* first test passing
* context closed test
* lint
* fix build failure
* imports
* eliminate unused cancel var
* add tests for cache
* changes to test
* add pruning and tests
* add fifo queue
* revamped key function
* fix all methods to use new fifo queue
* fix tests and gazelle
* refactor block cache
* lint
* add a bit more testing to service_test
* 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
* logging proposers
* use the update registry function
* outdated tests
* fixed check reg change
* gazelle
* tests pass
* registry change flag
* 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
* eth1 data comments
* eth1 data RPC server side impl
* logic is data objects is empty
* finished eth1 server logic
* update comments
* fmt
* big int comparisons
* begin adding eth1 data tests
* empty data votes test runs
* all tests complete with every code branch triggered, behavior correct
* fmt, imports
* address comments
* wrapped up tests
* addressed all comments
* correct attester view of chain head and prioritize proposer
* fix attempt not working
* revise with correct logic
* attester fixess to root fetching, spec did not make sense
* comments to match code
* fix attester responsibility
* comments
* 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
* using little endian and tests for encoding dep inputs
* use decode value and timestamp method in state
* updated comments to match serialization format
* latest compiled contract, abi, bytecode, and bindings
* to little endian everywhere
* fix all tests except for contract tests
* include contract changes
* address broken build
* compile with vyper v8
* update readme
* fix pkg name
* add skip chainstart delay
* skip chainstart delay tests pass
* to little endian timestamp
* 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
* server implementation logic
* attestation info tests
* completed passing tests, tree hash still blocked by error with nil fields unfortunately
* fix todo failure
* gazelle rerun and master merge
* testing full behavior of attestation info server
* finished all required server tests and implementation
* break loop
* fix tests due to genesis slot updates
* 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
* WIP - with TODOs
* interface w/ test
* basic test for broadcast
* Add computeStateRoot funciton
* remove custody challenge
* resolve TODO lint issues
* more TODOs
* revert new line in types.proto
* broadcaster comment
* one of several failure condition tests
* Add test cases
* handle compute state error test case
* fix config in validator helpers
* fix tests too
* fix conflict
* partial PR feedback
* remove p2p
* gazelle
* package comment
* Better godoc
* rpcHealth
* TestBadEndPoint not passed
* Crasher and TestCrasher()
* panic and recover
* assertPanic , TestBadEndPoint failed because of panic in goroutine
* log not found: Starting go routine
* TestLogger implementation
* Testlogger with map and overriden Fatalf
* rebased
* testLogger - modified the severity of message - added TestStatus - goimports
* fix test issues
* fmt
* 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
* begin reorder
* move into beacon server
* add proposer server
* fix
* add proposer server
* wrap up rpc reorder
* eliminated deprecated RPC endpoints
* formatted nicely
* RPC protos
* fix lint
* integrate hash proto
* autoclean
* deprecate all old code
* include the rest of methods mocks
* bazel run
* lint fixes
* implemented process pentalties and exit logic
* tests
* add MaxWithdrawalsPerEpoch to config
* preston's feedback, replaced index with idx
* s/e/penalizedEpoch
* removed blank line
* deposit definition according to latest spec
* ssz decode input data tests
* fix todo
* ignore XXX fields in struct
* fix
* timestamp
* gazelle run processing
* process deposit complete
* all logic complete
* verify merkle branch
* gazelle
* process deposit func
* diff cov 1005
* add todo"
* all test cases written down
* most tests complete
* ttl timestamp fail
* 100% code coverage in deposits
* fix params
* encode deposit data helper func
* state transition with no slots failing with panic at calcnewblockhashes
* smaller deposits for chain start
* state advancement benches
* ran go tests
* bazel
* improve the thing
* lint
* works works works
* all conflicts fixed
* edit readme to specify tests format
* edit readme to specify tests format
* skip slots works yay
* gazelle
* edit readme to specify tests format
* wrapped up all randao simulation
* fix
* passing
* goimports
* move to slices pkg
* deadcode
* deposit yaml tests
* created deposit trie implementation in Go
* created deposit trie implementation in Go
* gazelle
* merkle branch generation
* merkle branch generation
* more merkle debugging
* fix deposit trie
* include new merkle trie functions
* update all deposit operations
* capitalize
* advancing deposits fully works, grows the validator set
* wrap up time formatting
* lint fix
* include all information in the README
* edit conf
* revert
* clean up before merge
* successfully e2e test proposer slashings
* casper advancement
* wrap up casper slashings
* gazelle
* fix conf
* fix comments
* advance validator exits complete
* wrap up readme
* /healthz part1
* lint, fix
* lints and todos
* add p2p status test
* Add test for service registry Statuses
* fix my fake errors for the linter
* Test healthz handler
* Run gazelle
* first commit, remote att types
* no more agg attestation proto
* regen mock
* only attestations
* proto
* att process
* fix att references
* more tests passing
* use att protos
* complete
* change visibility
* use gogoprotobu
* first commit, remote att types
* no more agg attestation proto
* regen mock
* only attestations
* proto
* att process
* fix att references
* more tests passing
* use att protos
* complete
* Update dependency com_github_deckarep_golang_set to v1 (#1159)
* Update dependency com_github_edsrzf_mmap_go to v1 (#1160)
* Update dependency com_github_go_stack_stack to v1 (#1161)
* Update dependency com_github_rs_cors to v1 (#1162)
* Update dependency in_gopkg_urfave_cli_v1 to v1 (#1163)
* change visibility
* 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
* Standardize params for BeaconChain and Validator projects
* gofmt
* various changes to bring up to standards
* lint
* linter 2, not sure why travis complains
* revert service_test.go
* implementing basic proposer functionality
* checked in gomocks
* fix typo
* refactor using feeds
* use event feeds for assignment
* sending the latest beacon block over announcement chan
* 100 coverage, using feeds
* gazelle
* include parent hash from prev canonical block and slot number + 1
* including all other prop fields
* fix build
* proposer rpc method tests, implemented in beacon chain side
* godoc
* 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