Commit Graph

3905 Commits

Author SHA1 Message Date
terence tsao
4c2ed410b0
Invert state ref copy flag (#6015)
* Revert "Release state-ref-copy flag (#6012)"

This reverts commit ebf7122d6f.

* Invert state ref copy flag
2020-05-27 14:30:54 -05:00
terence tsao
ebf7122d6f
Release state-ref-copy flag (#6012)
* Release state ref copy flag
* Merge refs/heads/master into invert-flag1
2020-05-27 18:08:12 +00:00
terence tsao
b7c856af6f
Add skip to log (#6014) 2020-05-27 12:35:54 -05:00
Nishant Das
7be8942079
Fix Fork Data in Local Node (#5997) 2020-05-27 08:07:40 -07:00
Ivan Martinez
29e4594783
Fix long running E2E after v0.12 changes (#6008)
* Fix deposits in long run e2e

* Fix participation

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-27 08:28:01 -05:00
Victor Farazdagi
f4778048ac Init sync arbitrary batch length + full bandwidth utilization (#5978)
* allow to jump over 50K skipped slots
* more tests
* removes debug logs
* minor fixes
* re-arrage pid updates
* optimizes queue and fsm
* Merge branch 'master' into init-sync-arbitrary-batch-len
* fixes benchmark test
* Merge branch 'master' into init-sync-arbitrary-batch-len
* queue cleanup
* updates polling interval
* fsm test: allMachinesInState
* fsm test: highestStartBlock
* rest of fsm tests
* Merge branch 'master' into init-sync-arbitrary-batch-len
* Merge refs/heads/master into init-sync-arbitrary-batch-len
* Merge refs/heads/master into init-sync-arbitrary-batch-len
* Merge refs/heads/master into init-sync-arbitrary-batch-len
* Merge refs/heads/master into init-sync-arbitrary-batch-len
* Merge refs/heads/master into init-sync-arbitrary-batch-len
* parse machines in order
* Merge branch 'init-sync-arbitrary-batch-len' of github.com:prysmaticlabs/prysm into init-sync-arbitrary-batch-len
2020-05-27 09:13:41 +00:00
terence tsao
0c3586a8ea
Add debug proto array fork choice endpoint (#6003)
* Add proto array fork choice object to RPC
* Add pb
* Add pb
* Expose proto array store object
* Test
* Merge branch 'forkchoice-endpoint' of github.com:prysmaticlabs/prysm into forkchoice-endpoint
* s/Nodes/nodes
* Remove proto from gitignore
* More implementations of GetProtoArrayForkChoice
* Comments
* Use hex
* Gazelle
* GetForkChoice Test
* Remove pb.go
* Merge branch 'master' into forkchoice-endpoint
* Typo, thanks Raul!
* Merge branch 'forkchoice-endpoint' of github.com:prysmaticlabs/prysm into forkchoice-endpoint
2020-05-26 23:24:38 +00:00
Ivan Martinez
5afee4ba3a
Use SlotTickerWithOffset for StreamIndexedAttestations (#5999)
* Change streamindexed to slot ticker with offset
* Make 2/3rds
* Add test
* Merge branch 'master' of github.com:prysmaticlabs/prysm into ticker-offset
* Add check for offset
* Merge branch 'master' of github.com:prysmaticlabs/prysm into ticker-offset
* Fix test
* Merge refs/heads/master into ticker-offset
2020-05-26 19:34:09 +00:00
Ivan Martinez
0f7cf212a2
Prepare E2E for v0.12 (#5991)
* Prepare e2e for v0.12

* Fix e2e

* Comments

* Attempt 100% participation

* Fixes

* Fix

* Update readme

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-26 14:04:42 -05:00
Ivan Martinez
ecea979b60
Change StreamIndexedAttestations to use target root for state regen (#5971) 2020-05-26 09:21:17 -07:00
Raul Jordan
ad1d8074d0
Improve Deposit Data Account Creation Prompt (#5985)
* improve validator accounts create text
* Merge refs/heads/master into improve-deposit-data-promt
* Merge refs/heads/master into improve-deposit-data-promt
* Merge refs/heads/master into improve-deposit-data-promt
* Merge refs/heads/master into improve-deposit-data-promt
2020-05-26 13:24:46 +00:00
Victor Farazdagi
c70c52b40a
Runs go fmt and updates validator files (#5995)
* updates validator files
2020-05-26 11:13:12 +00:00
Martin Linkhorst
b724b20828
Add missing TLS-related flags to Beacon Chain and Slasher (#5984)
* beacon-chain: add missing slasher flags
* slasher: add missing tls-cert flag
* Merge branch 'master' into tls
* Merge branch 'master' into tls
2020-05-26 02:08:15 +00:00
rkapka
b3f005fe94
Fixed deferring of closing dbs (#5982)
* fixed deferring of closing dbs
* removed unnecessary slice pointer
* Merge branch 'master' into merge-defer-fix
* Merge branch 'master' into merge-defer-fix
2020-05-26 00:38:41 +00:00
terence tsao
3b65cb6d0b
Consistent BLS function inputs (#5969)
* Make function input consistent

* Change back

* Typo

* Fixed test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-25 16:08:12 -05:00
Raul Jordan
497307decd
Remove Warning on Using Default Mainnet Config (#5983)
* removed mainnet warn
2020-05-25 19:43:10 +00:00
Victor Farazdagi
f81c8c6825
Allow to jump over 50K+ skipped slots in init-sync (#5975)
* allow to jump over 50K skipped slots
* more tests
* removes debug logs
* minor fixes
* re-arrage pid updates
* Merge refs/heads/master into init-sync-50K-skipped-slots
2020-05-25 16:43:59 +00:00
rkapka
277fa3300a
Merge validator databases (#5968)
* merge functionality

* merge testing

* log info when merge completed successfully

* extracted private methods

* fixed linter errors

* fixed compilation errors

* build files clean-up

* fixed failing test

* corrected command description

* close sources inside defer

* corrected documentation of NewKVStore
2020-05-25 11:20:35 -05:00
Ivan Martinez
b810243f41
Reverse historical detection flag for slasher (#5958)
* Reverse historical detection flag
* Merge branch 'master' of github.com:prysmaticlabs/prysm into reverse-historical-flag
* Merge branch 'master' of github.com:prysmaticlabs/prysm into reverse-historical-flag
* Fix build
* Merge refs/heads/master into reverse-historical-flag
* Fix test
* Merge branch 'reverse-historical-flag' of github.com:prysmaticlabs/prysm into reverse-historical-flag
* Merge refs/heads/master into reverse-historical-flag
2020-05-23 06:40:15 +00:00
Preston Van Loon
5a3114cdc9
Update BLS to allow for spec v0.12 requirements (#5914)
* update bls

* Update BLS, has a minor issue with blsVerifyAggregatedHashWithDomainCast. See https://github.com/herumi/bls-eth-go-binary/issues/17

* update

* fix build
2020-05-23 10:50:02 +08:00
Ivan Martinez
f9d847991c
Add RemoveOldestFromCache and save span cache on exit (#5953)
* Add RemoveOldestFromCache
* Add log
* comment
* gaz
* Merge branch 'master' into prune-spancache-historical
* Merge refs/heads/master into prune-spancache-historical
* Merge refs/heads/master into prune-spancache-historical
* Fix span defer
* Merge branch 'prune-spancache-historical' of github.com:prysmaticlabs/prysm into prune-spancache-historical
* Merge refs/heads/master into prune-spancache-historical
* Update slasher/db/kv/kv.go
2020-05-22 19:44:48 +00:00
Ivan Martinez
6aabea2d80
Reverse broadcast-slashing flag to disable-broadcast-slashings (#5952)
* Reverse broadcast-slashings to disable-broadcast-slashings
* Fix tests
* Merge branch 'master' of github.com:prysmaticlabs/prysm into toggle-broadcast-flag
* Merge refs/heads/master into toggle-broadcast-flag
* Fix for comments
* Merge branch 'toggle-broadcast-flag' of github.com:prysmaticlabs/prysm into toggle-broadcast-flag
* Merge refs/heads/master into toggle-broadcast-flag
2020-05-22 17:19:45 +00:00
Ivan Martinez
230659467d
Only log attester slashing found for valid slashings (#5954)
* Improve logging for slasher

* Add case for sig verify

* Log out indices for failed slashings

* gaz

* Fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-22 10:19:10 -05:00
Victor Farazdagi
c875dd458b
Handles issue with empty dirs on validator accounts create (#5940)
* handles issue with empty dirs on validator accounts create
* better comments
* Merge refs/heads/master into fix-validator-accounts-create
* Merge refs/heads/master into fix-validator-accounts-create
* Terence's review
2020-05-22 11:00:41 +00:00
Nishant Das
6a9112bfae
remove byte mempool (#5951) 2020-05-21 20:39:06 -07:00
terence tsao
8eb7c7a0bc
Recover skipped archived point (#5950) 2020-05-21 18:15:16 -07:00
Ivan Martinez
4fb3307de3
Add Slasher double block detection to E2E (#5936)
* WIP double block slashings e2e
* Add double block detection to E2E
* Remove unused function
* Respond to feedback
* Remove unneeded util
* Merge branch 'master' of github.com:prysmaticlabs/prysm into e2e-double-block
* Add comments for clarity on conns
2020-05-21 06:02:40 +00:00
Raul Jordan
881ad77c52
Add Debug Block Endpoint + Return SSZ-Encoded (#5926)
* add block endpoint

* handle err

* check for nil block

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-20 20:36:05 -05:00
terence tsao
52988a0805
Return err instead of 0 for unavailable participation (#5934)
* Return err for unavailable participation

* Update     test
2020-05-20 18:47:40 -04:00
Ivan Martinez
5267fe607c
Fix slasher pool to not ignore valid slashings (#5927)
* Improve slashing pool handling to not reject valid slashings
* Undo testing stuff
* Merge refs/heads/master into fix-slasher-pool
* Add regression test for pool changes
* Merge branch 'fix-slasher-pool' of github.com:prysmaticlabs/prysm into fix-slasher-pool
* Merge refs/heads/master into fix-slasher-pool
* Merge refs/heads/master into fix-slasher-pool
* Merge refs/heads/master into fix-slasher-pool
* Merge refs/heads/master into fix-slasher-pool
* Merge refs/heads/master into fix-slasher-pool
2020-05-20 20:27:23 +00:00
Ivan Martinez
9fc6be8b74
Change ListIndexedAttestations to be more slasher friendly (#5930)
* Improve slasher beacon comms
* Fixes
* Add case for normal errors
* remove baz
* Merge branch 'master' into improve-slasher-beacon
* Merge refs/heads/master into improve-slasher-beacon
* Merge refs/heads/master into improve-slasher-beacon
* Feedback
* Merge branch 'improve-slasher-beacon' of github.com:prysmaticlabs/prysm into improve-slasher-beacon
* Merge refs/heads/master into improve-slasher-beacon
2020-05-20 19:52:18 +00:00
terence tsao
5f72d28057
Blockchain service provides IsCanonical getter (#5932)
* Export `NonExistentNode` and `Root`
* Add mapping `recentCanonicalBlocks`
* Add `updateRecentCanonicalBlocks`
* Use `updateRecentCanonicalBlocks`
* New tests
* s/Root/root
* Lint
* Merge branch 'master' into is-canonical
* Merge refs/heads/master into is-canonical
2020-05-20 19:16:56 +00:00
Preston Van Loon
020c481a46
Enable domain data cache by default (#5931)
* Enable domain data cache by default
* Merge refs/heads/master into enable-domain-data-cache-by-default
2020-05-20 18:46:03 +00:00
Nishant Das
e3d07489dc
Fix Flags in Create Subcommand (#5928)
* fix flag parsing
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into fixCreateconfig
* Merge refs/heads/master into fixCreateconfig
2020-05-20 18:19:30 +00:00
Nishant Das
49edcb099b
Log Active Validator Count (#5923)
* add more verbose deposit count
* Merge branch 'master' into addBetterCount
* Merge refs/heads/master into addBetterCount
* Update beacon-chain/powchain/log_processing.go

Co-authored-by: Shay Zluf <thezluf@gmail.com>
2020-05-20 16:24:51 +00:00
Shay Zluf
17169e5a2d
External slashing protection (#5895)
* slasher grpc client

* do not export

* slasher on a different package

* fix featureconfig

* change to rough time

* revert roughtime

* remove extra comma

* revert order change

* goimports

* fix comments and tests

* fix package name

* revert reorder

* comment for start

* service

* fix visibility

* external slasher validator protection implementation

* gaz

* fix comment

* add comments

* nishant feedback

* raul feedback

* preston feedback

* fix flags

* fix imports

* fix imports

* port 4002

* added tests

* fix log

* fix imports

* fix imports name

* raul feedback

* gaz

* terence comment

* change name

* runtime fixes

* add flag check

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-20 10:23:22 -05:00
Nishant Das
2de4f86277
Change To Debug Logs (#5917)
* debug
2020-05-20 04:57:24 +00:00
Raul Jordan
ea02edba29
Ensure We Use Request.Epoch in the Validator Duties Server Implementation (#5913)
* resolve bad epoch in duties
2020-05-19 21:26:14 +00:00
Victor Farazdagi
8241b7e20d
Re-arranges fetcher locks -> per peer level (#5906)
* fetcher locks -> per peer level
* typo
* removes redundant setting to nil
* Merge refs/heads/master into init-sync-rearrange-locks
2020-05-19 17:48:32 +00:00
Ivan Martinez
aa6190235a
Fix prysm.bat internet warning (#5908)
* Fix bat
* Remove %
* Merge branch 'master' into fix-bat
2020-05-19 17:24:47 +00:00
Preston Van Loon
5e6a5902ae
Invert --enable-account-metrics to remove user confusion. See #5883 (#5904) 2020-05-19 08:44:54 -05:00
Michael Huang
62b617fa9a
Command to fetch validator statuses + MultipleValidatorStatus (#5784)
* Add method to fetch account statuses
* Add status command
* gofmt
* Add comment about sorting
* Close conneciton when finished
* Fix error
* Refactor FetchAccountStatuses
* Add status_test.go
* Move sorting out of FetchAccountStatuses
* Remove unnecessary casting
* Expect ValidatorStatus to be called
* Wrap long comment
* Comment out sorting
* Add all necessary dial options
* Close connection before evaluating error from fetch
* Small changes
* Fix lint issues
* Merge branch 'master' into validator-client-account-statuses
* Update dependencies for docker images
* Rename multipleValidatorStatus to activationStatus
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Update commit hash for ethereumapis
* Implement MultipleValidatorStatus
* Tests for MultipleValidatorStatus
* Fix bugs
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Add export comment for MultipleValidatorStatus
* Run `go fmt` in prysm (#5815)

* go fmt
* Add fix for nil state in InitializeFromProto (#5817)

* Add nil check and tests
* Add unsafe test
* Update tools/genesis-state-gen/main.go
* Undo genesis state gen changes
* Merge branch 'proto-fuzz-fix' of github.com:prysmaticlabs/prysm into proto-fuzz-fix
* gaz
* Fix
* Add export comment for MultipleValidatorStatus
* Clean up comments
* Update mock files for beacon_node_validator_service
* Merge branch 'validator-client-account-statuses' of https://github.com/michaelhly/prysm into validator-client-account-statuses
* Run gazelle
* Fix mock issues
* Fetch statuses in batches
* Simplify public key generation for status_test
* Sort validator statuses by status type
* Format validator statuses and print to console
* Fix lint issues
* Delimit with commas
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Rename otheropts to extraopts
* Merge branch 'master' into validator-client-account-statuses
* Merge branch 'validator-client-account-statuses' of https://github.com/michaelhly/prysm into validator-client-account-statuses
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Clean up MultipleValidatorStatus tests
* Add sync checker to MultipleValidatorStatus
* Update formatting
* Prepend 0x to validator keys
* Check number of status blocks recieved in status_test
* Move sorting to goroutine
* Capitalize constants
* Fix typo
* Use mock reponses in sort test
* Remove byteutils
* Fix ugly format
* Add comment on MultipleValidatorStatus test
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Create entrypoint to run status command, and make unexported functions internal
* Move merge step into FetchAccountStatuses
* Revert service.go
* Remove responseToSortedMetadata
* Simplify mergeTwo
* Replace fmt output with logrus
* Fix typo
* Merge branch 'master' into validator-client-account-statuses
* Update comment
* Merge branch 'validator-client-account-statuses' of https://github.com/michaelhly/prysm into validator-client-account-statuses
* Return error on bad credentials
* Merge branch 'master' into validator-client-account-statuses
* Merge branch 'master' into validator-client-account-statuses
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Skip merge step on error
* Fix conflicts
* Fix mock paths
* Add comments
* Convert some sprintfs to wrapfs
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Rename ExtractPublicKeys to ExtractPublicKeysFromKeyStore and move to account.go
* Add support for keymanager
* Add supported flags to flags list
* Log warning on intermediary errors
* Update output
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Merge branch 'master' into validator-client-account-statuses
* Fix conflicts
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-client-account-statuses
* Merge branch 'validator-client-account-statuses' of https://github.com/michaelhly/prysm into validator-client-account-statuses
* Set context timeout for FetchAccountStatuses
* Remove deprecated grpc.WithTimeout
* gofmt
* Remove getters
* Remove parallel stuff
* Move grpc dialing out of status.go
* Update logging based on feedback
* Update validator/accounts/status.go
2020-05-19 05:13:37 +00:00
Ivan Martinez
aad1b93f70
Optimize slasher handling of duplicate attestations (#5886)
* Move data saving to listener service

* Map result data to attestations to prevent duplicate DB reads

* Gaz

* Fix tests

* Revert "Fix tests"

This reverts commit 499b205a88ad632e02238d65adc6698725195e53.

* Revert "Move data saving to listener service"

This reverts commit fd52938dbaccb0c374f9d2405f8a61f4d17f8709.

* Gaz

* Undo changes

* Imports

* Reorder parameters

* Fix error log

* Add test for mapReusltsToAtts

* Fix errorf

* Change to safer crypto

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-18 20:50:35 -04:00
Jim McDonald
fe7a123bd9
Allow wallet passphrases to be environment variables (#5879)
* Allow wallet passphrases to be environment variables
* Merge branch 'master' into wallet-env-passphrases
* Namespace environment variables and clear them at the end of the test.
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
* Merge branch 'master' into wallet-env-passphrases
2020-05-18 22:25:36 +00:00
rkapka
2a1a0ce43f
Change validator password (#5869)
* Created merge command
* Key merging
* Merge branch 'master' into db-manage-validators
* flag comments
* fixed compilation errors
* added comment to Merge function
* Tested that merging copies keys
* Created command to change password for keys
* Merge branch 'master' into change-validator-password
* Merge branch 'master' into change-validator-password
* cleanup after code review
* Merge remote-tracking branch 'rkapka/change-validator-password' into change-validator-password
* Merge branch 'master' into change-validator-password
* Merge branch 'master' into change-validator-password
* Merge branch 'master' into change-validator-password
* Merge branch 'master' into change-validator-password
2020-05-18 21:35:17 +00:00
terence tsao
c07f1600e9
Prevent parent block with same slot (#5842)
* Block must have a higher slot than parent state
* New tests and existing test
* Typo
* Fixed more existing test....
* Merge branch 'master' into sec0
* Merge branch 'master' into sec0
* Merge branch 'master' of github.com:prysmaticlabs/prysm into sec0
* Update spec tests to v0.11.3
* Merge branch 'sec0' of github.com:prysmaticlabs/prysm into sec0
* Update badge to v0.11.3
* Update badge to v0.11.3
* Merge refs/heads/master into sec0
2020-05-18 20:26:34 +00:00
terence tsao
678347e64b
Handle missing archived index (#5899)
* Make `archivedRoot` handle missing root case
* Regression tests
* Fixed existing tests
* Removed debug log
* Merge refs/heads/master into handle-missing-archived-index
* Merge refs/heads/master into handle-missing-archived-index
* More comments on the look back
* Merge branch 'handle-missing-archived-index' of github.com:prysmaticlabs/prysm into handle-missing-archived-index
* Merge refs/heads/master into handle-missing-archived-index
2020-05-18 19:46:06 +00:00
Victor Farazdagi
ca26745720
Implements WRR in init-sync, full bandwidth utilization (#5887)
* implements weighted round robin in init-sync
* protection against evil peer
* reshuffle
* shorten flag
* deterministic order of wrr
* Merge branch 'master' into init-sync-wrr
* Merge refs/heads/master into init-sync-wrr
* Merge refs/heads/master into init-sync-wrr
* allow peers with the same capacity to pe selected at random
* Merge branch 'init-sync-wrr' of github.com:prysmaticlabs/prysm into init-sync-wrr
* adds wrr to e2e tests
* Merge refs/heads/master into init-sync-wrr
* Merge refs/heads/master into init-sync-wrr
* Merge refs/heads/master into init-sync-wrr
2020-05-18 18:59:03 +00:00
Ivan Martinez
52105e6083
Fix silent internet error in prysm.sh (#5877)
* Add check for internet in prysm.sh
* Make script fail
* End script early
* Merge branch 'master' into add-internet-check
* Fix order of ops
* Merge branch 'add-internet-check' of github.com:prysmaticlabs/prysm into add-internet-check
* Merge refs/heads/master into add-internet-check
* Merge refs/heads/master into add-internet-check
* Merge refs/heads/master into add-internet-check
* Merge refs/heads/master into add-internet-check
* Merge refs/heads/master into add-internet-check
* Merge refs/heads/master into add-internet-check
* Merge refs/heads/master into add-internet-check
* Add check for internet to bat script
* Merge branch 'add-internet-check' of github.com:prysmaticlabs/prysm into add-internet-check
* Merge refs/heads/master into add-internet-check
2020-05-18 18:30:19 +00:00
Nishant Das
eb77f56d8a
Sort Blocks Before Returning them To Peer (#5894)
* add tests and check
* lint
* Merge refs/heads/master into sortBlocks
2020-05-18 17:58:20 +00:00