* Add a service for the monitor
* Do not block service start
* gaz
* move channel subscription outide go routine
* add service start test
* fix panic on node tests
* Radek's first pass
* Radek's take 2
* uncap error messages
* revert reversal
* Terence take 1
* gaz
* Missing locks found by Terence
* Track via bool not empty interface
* Add tests for every function
* fix allocation of slice
* Minor cleanups
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Add sync committeee contributions to monitor
* gaz
* Raul's review
* Added lock around TrackedValidators
* add comment to trackedIndex
* add missing locks because of trackedIndex
* Terence fixes 2
* moved TrackedValidator to service from config
* Terence comment fix
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* quick lazy balance cache proof of concept
* WIP refactoring to use lazy cache
* updating tests to use functional opts
* updating the rest of the tests, all passing
* use mock stategen where possible
reduces the number of test cases that require db setup
* rename test opt method for clear link
* Update beacon-chain/blockchain/process_block.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* test assumption that zerohash is in db
* remove unused MockDB (mocking stategen instead)
* fix cache bug, switch to sync.Mutex
* improve test coverage for the state cache
* uncomment failing genesis test for discussion
* gofmt
* remove unused Service struct member
* cleanup unused func input
* combining type declaration in signature
* don't export the state cache constructor
* work around blockchain deps w/ new file
service_test brings in a ton of dependencies that make bazel rules
for blockchain complex, so just sticking these mocks in their own
file simplifies things.
* gofmt
* remove intentionally failing test
this test established that the zero root can't be used to look up the
state, resulting in a change in another PR to update stategen to use the
GenesisState db method instead when the zero root is detected.
* fixed error introduced by develop refresh
* fix import ordering
* appease deepsource
* remove unused function
* godoc comments on new requires/assert
* defensive constructor per terence's PR comment
* more differentiated balance cache metric names
Co-authored-by: kasey <kasey@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* save stuff
* fix in v1
* clean up more
* fix bugs
* add comments and clean up
* add flag + test
* add tests
* fmt
* radek's review
* gaz
* kasey's review
* gaz and new conditional
* improve naming
* Validator monitor process slashings
* Preston's comment
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* add test for tracked index
* Prestons requested changes
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* begin powchain service refactor
* begin refactor
* powchain passes
* options pkg
* gaz
* rev
* rev
* comments
* move to right place
* bazel powchain
* fix test
* log
* contract addr
* happy path and comments
* gaz
* new service
* weak subjectivity verification refactor
This separates weak subjectivity verification into a
distinct type which does not have a dependency on
blockchain.Service
* remove unused variable
* saving enqueued init blocks before ws verify
* remove TODO, handled in previous commit
* accept suggested comment change
start comment w/ name of function NewWeakSubjectivityVerifier
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* update log w/ Raul's suggested language
* explicit zero value for clarity
* add comments clarifying how we adhere to spec
* more clear TODO per Raul's feedback
* gofmt
Co-authored-by: kasey <kasey@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>