* pruning and begin test
* comprehensive pruning tests
* add pruning on startup
* also prune source epochs bucket
* more testing
* greatly simplify pruning function
* pruning logic and comprehensive tests in
* att protection test
* gaz
* fix sneaky change
* rev
* documented and tested helper func
* begin migration logic
* wrote migration logic
* begin test file
* test for migration working
* gaz
* progressutil
* migration works even if partial data was written
* att sign validations
* eliminate old cached methods and use a simple approach in the db
* redefined db methods
* db package builds
* add multilock to attest and propose
* gaz
* removed concurrency tests that are no longer relevant
* add cache to db functions for attesting history checks
* passing
* add in feature flag --disable-attesting-history-db-cache
* remove lock
* Revert "remove lock"
This reverts commit b1a65020e406b9fa6e4f57c5cc6a5a0b2a11a240.
* comment
* gaz
* restore beacon node db
* revert image name
* move restore out of the kv folder
* remove files from kv folder
* go mod tidy
* Remove usage of prometheus testutil
* add yes/no to prompt text
* restore slasher db
* organize imports
* go mod tidy
* restore validator db
* close slasher db
* defer close backup db in tests
* simplify function literal
* Add getters and setters for source and target epochs
* Use the correct ImportStandardProtectionJSON
* Add tests
* Fix buckets
* Fix source to target
* Update validator/slashing-protection/local/standard-protection-format/import.go
* Fix bytesutil.BytesToUint64BigEndian will return 0 if input is less than 8 bytes
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* add in highest and lowest signed proposal
* begin adding tests
* add in db tests
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* minimal change to handle nil attesterHistoryByPubKey
* Revert "Always Update Attesting History If Not Slashable (#7935)"
This reverts commit 3cc2ebc5d5.
* remove unused functions
* move save before propose
* wait before go func
* move wait into the go routine
* handling map mutation
* remove map handling in this case
* log in case it is still not found
* fix log
* fix locks
* Update validator/client/attest_protect.go
* remove code duplication
* remove method extraction
* move metrics to their appropriate place
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Use new attestation protection
* tests fixes
* fix tests
* fix comment
* fix TestSetTargetData
* fix tests
* empty history handling
* fix another test
* mock domain request
* fix empty handling
* use far future epoch
* use far future epoch
* migrate data
* copy byte array to resolve sigbus error
* init validator protection on pre validation
* Import interchange json
* Import interchange json
* reduce visibility
* use return value
* raul feedback
* rename fixes
* import test
* checkout att v2 changes
* define import method for interchange format in its own package
* rename and made operations atomic
* eip comment
* begin amending test file
* finish happy path for import tests
* attempt the interchange import tests
* fixed tests
* happy and sad paths tested
* good error messages
* fix up comment with proper eip link
* tests for helpers
* helpers
* all tests pass
* proper test comment
* terence feedback
* validate metadata func
* versioning check
* begin handling duplicatesz
* handle duplicate public keys with potentially different data, first pass
* better handling of duplicate data
* ensure duplicates are taken care of
* comprehensive tests for deduplication of signed blocks
* tests for deduplication
* Update validator/slashing-protection/local/standard-protection-format/helpers_test.go
Co-authored-by: Shay Zluf <thezluf@gmail.com>
* Update validator/slashing-protection/local/standard-protection-format/helpers_test.go
Co-authored-by: Shay Zluf <thezluf@gmail.com>
* tests for maxuint64 and package level comment
* tests passing
* edge cases pass
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Immediate save of validator protection data
* fix error log
* separate delete from save
* remove logs
* rename delete into reset
* comment fix
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* write file and mkdirall analyzers
* include analyzer in build bazel
* comments to the single entrypoint and fix validator references
* enforce 600 for files, 700 for dirs
* pass validator tests
* add to nogo
* remove references
* beaconfuzz
* docker img
* fix up kv issue
* mkdir if not exists
* radek comments
* final comments
* Try to fix file problem
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
* remove unused cache states map
* correct typo
* Remove unused array
* Add lock around deposits cache chainstart pubkeys
* Copy attestation before grabbing lock. This may reduce lock contention time as other callers wanting the lock do not need to wait as long for the lock to become available.
* Copy attestation before grabbing lock. This may reduce lock contention time as other callers wanting the lock do not need to wait as long for the lock to become available.
* Set capacity to 1 since it is known that the slice will be 1 after insertion
* require validatorSlashingPreconditionCheck caller to hold lock
* Add lock for voluntary exits pool HasBeenIncluded
* Require rate limiter retrieveCollector to hold lock
* Add lock requirement assertions in sync
* Remove unused struct
* remove ClearCachedStates API
* field initSyncState is unused
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* import attestation to new data structure
* add tests
* add failure massages
* added signing root to data
* added signing root to data
* public keys 48 length
* remove redundant loop
* fix proposals
* fix manage dir name
* Omit redundant nil check on slices
* nishant feedback
* add test
* Import proposals protection db
* Import old proposal protection data structure to new one
* test empty slots
* Update validator/db/kv/new_proposal_history.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update validator/db/kv/new_proposal_history_test.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* store wallet pass on creation
* store wallet hash
* save hash to wallet dir
* initialize wallet hash
* gaz
* imports spacing
* remove mentions of hashed pass from db schema
* simplify the wallet hash code
* comment removal
* Merge branch 'master' into fix-password-override
* pass tests
* test fix
* Merge branch 'fix-password-override' of github.com:prysmaticlabs/prysm into fix-password-override
* remove extraneous printfs
* tests passing
* require auth for create wallet
* gaz
* fix signup logic
* Merge refs/heads/master into fix-password-override
* Merge refs/heads/master into fix-password-override
* Merge refs/heads/master into fix-password-override
* Merge refs/heads/master into fix-password-override
* Merge branch 'master' into fix-password-override
* Safer validator protection db dir
* handle old account structure
* Merge refs/heads/master into move_validator_protection_db
* Merge refs/heads/master into move_validator_protection_db
* Merge refs/heads/master into move_validator_protection_db
* Merge refs/heads/master into move_validator_protection_db
* fix e2e issue
* separate function
* Merge branch 'move_validator_protection_db' of github.com:prysmaticlabs/prysm into move_validator_protection_db
* Merge branch 'master' of github.com:prysmaticlabs/prysm into move_validator_protection_db
* Merge refs/heads/master into move_validator_protection_db
* Merge refs/heads/master into move_validator_protection_db
* Merge refs/heads/master into move_validator_protection_db
* Update shared/fileutil/fileutil.go
* Merge refs/heads/master into move_validator_protection_db
* prepare validator for web usage
* wallet exists func in rpc server
* only initialize wallet if feed exists and wallet also exists
* enabling web via a feed
* wallet creation works but needs to be able to recover from mnemonic via api
* ensure logic works
* Merge branch 'master' into validator-web
* fix up tests
* test file
* wallet rpc tests
* add all tests to create wallet
* Merge branch 'master' into validator-web
* imports
* Merge branch 'validator-web' of github.com:prysmaticlabs/prysm into validator-web
* Merge refs/heads/master into validator-web
* Merge refs/heads/master into validator-web
* begin on dynamic key rescan
* Merge branch 'master' into dynamic-rescan
* begin dynamic rescan
* fsnotify to listen for rescan dir changes
* recheck for slashing protection
* lint
* Merge branch 'master' into dynamic-rescan
* less aggressive recheck interval
* imports
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* resolve confs
* listen for file changes for accounts file
* reload accounts from keystore
* begin fixing rescan test
* add event feed
* fix confs
* fix conf
* fix broken tests
* Merge branch 'master' into dynamic-rescan
* simplify lines
* do nothing if no subscribers
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* fix tests
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* gaz
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* ident
* Update WORKSPACE
* gaz
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* add keys on service start
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* ensure debounce util works
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* complete refresh, debounce test, and ensure works at runtime
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* imports and remove log
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* Merge refs/heads/master into dynamic-rescan
* resolve confs
* fix up e2e tests
* Merge branch 'dynamic-rescan' of github.com:prysmaticlabs/prysm into dynamic-rescan
* fix up e2e
* Merge refs/heads/master into dynamic-rescan
* define auth endpoints
* add intercepter with tests
* auth functions
* fix up the auth functions
* add functions for storing and saving the hashed password from the validator db
* validate strong password input and simplify jwt claims
* tests for db funcs
* comments for db funcs
* wrap up the authentication tests
* register auth srv
* use proper db iface package and check if existing password
* fix broken tests and add new test to check if password already exists
* use roughtime
* rlock to check the auth paths
* Merge refs/heads/master into auth-rpc
* Merge refs/heads/master into auth-rpc
* Merge refs/heads/master into auth-rpc
* leave out the stream interceptor
* resolve confs
* Merge branch 'master' into auth-rpc
* confs
* Merge branch 'auth-rpc' of github.com:prysmaticlabs/prysm into auth-rpc
* Merge refs/heads/master into auth-rpc
* Merge refs/heads/master into auth-rpc
* Merge refs/heads/master into auth-rpc
* Merge refs/heads/master into auth-rpc
* Merge variable declaration and assignment
* Use result of type assertion to simplify cases
* Replace call to bytes.Compare with bytes.Equal
* Drop unnecessary use of the blank identifier
* Replace x.Sub(time.Now()) with time.Until(x)
* Function literal can be simplified
* Use a single append to concatenate two slices
* Replace time.Now().Sub(x) with time.Since(x)
* Omit comparison with boolean constant
* Omit redundant nil check on slices
* Nested if can be replaced with else-if
* Function call can be replaced with helper function
* Omit redundant control flow
* Use plain channel send or receive
* Simplify returning boolean expression
* Merge branch 'origin-master' into fix-antipatterns
* Merge branch 'master' into fix-antipatterns