Commit Graph

3863 Commits

Author SHA1 Message Date
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
Nishant Das
e16f384286
fix (#5893)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-18 20:16:27 +08:00
Ivan Martinez
5d8b5a3c30
Remove DB check for receiving p2p slashings (#5892)
* Removes DB check for receiving p2p slashings
* Fix bad logic
* Merge refs/heads/master into p2p-remove-db-check
* Whoops
* Merge branch 'p2p-remove-db-check' of github.com:prysmaticlabs/prysm into p2p-remove-db-check
2020-05-18 07:36:37 +00:00
Nishant Das
5bb9278a88
make them debug (#5891) 2020-05-18 02:27:18 -04:00
terence tsao
343bee35bc
Make SlotsPerArchivedPoint configurable (#5888)
* Make slots per archived point configurable

* 256 -> 2048

* Use beaconconfig
2020-05-17 16:40:41 -04:00
Nishant Das
590016085d
More Verbose Logs for Incoming Blocks (#5884)
* add logging
* truncate root
2020-05-17 09:07:21 +00:00
Victor Farazdagi
d79950ab3b
Optimizes FSM event triggering (#5881)
* Optimizes machine triggering
* updates queue
* Merge branch 'master' into init-sync-fsm-optimizations
* gazelle
* Merge branch 'init-sync-fsm-optimizations' of github.com:prysmaticlabs/prysm into init-sync-fsm-optimizations
2020-05-16 20:26:00 +00:00
terence tsao
337ae6941f
Enhancing block tree viewer (#5880) 2020-05-16 12:29:21 -07:00
Nishant Das
150f8beccd
Revert "Add cache to Eth1 RPC functions (#5347)" (#5876)
* Revert "Add cache to Eth1 RPC functions (#5347)"

This reverts commit 159ef3d702.
2020-05-16 02:56:09 +00:00
Raul Jordan
8b168aa450
Add RPC Debug Server, Toggle Logging via gRPC (#5873)
* add in rpc debug server
* sets the valid debug level
* builds
* make post
* Merge branch 'master' into debuglog
* Merge refs/heads/master into debuglog
* caps
* Merge branch 'debuglog' of github.com:prysmaticlabs/prysm into debuglog
* comment
2020-05-15 21:54:53 +00:00
Victor Farazdagi
1cc7d67025
Adds rate limiting tests to beaconBlocksByRangeRPCHandler (#5866)
* overflow/nooverflow tests
* formatting
* check peer disconnecting
* more tests
* Merge branch 'master' into sync-rate-overflow-tests
* formatting
* Merge branch 'sync-rate-overflow-tests' of github.com:prysmaticlabs/prysm into sync-rate-overflow-tests
2020-05-15 20:51:23 +00:00
Raul Jordan
272f794868 Add Suggestion to Paste in Deposit Data into Prylabs/Participate (#5872)
* added instructions for account
2020-05-15 20:24:25 +00:00
terence tsao
5515c20ffd
Add skip-regen-historical-states flag (#5871)
* Add feature flag

* Comments to clairfy a few things

* Use feature flag

* Update state gen resume

* More comments

* Remove from dv
2020-05-15 14:49:13 -05:00
Ivan Martinez
9333ede9a1
Unify generated mocks into shared/mock (#5862)
* Add validator mocks to script

* Add more mocks

* Generate all the mocks for Ivan

* Change script to use relative paths and gofmt

* bazel

* Remove duplicates

* Remove duplicated interfaces

* change to shared/mock

* Fix script and build

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-05-15 12:27:46 -05:00
Nishant Das
320bb46f35
More Handshake Cleanup (#5863)
* change to debug log

* disconnect on wrong fork

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-15 11:08:42 -05:00
Raul Jordan
007a98b711
Fix Stream Duties Server + Get Duties Before ChainStart (#5849)
* beacon node stream duties fixes

* comment

* fix critical seconds bug

* back to 12

* config changes

* Update beacon-chain/sync/initial-sync/service.go

* revert config

* Update beacon-chain/rpc/validator/assignments.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-05-15 10:25:43 -05:00
Victor Farazdagi
f461f586a1
Refactors redundant global variables from sync (#5860)
* refactors global variables from sync
* gazelle
* Merge branch 'master' into sync-remove-globals
* better spacing
* Merge branch 'sync-remove-globals' of github.com:prysmaticlabs/prysm into sync-remove-globals
* Merge branch 'master' into sync-remove-globals
2020-05-15 08:53:19 +00:00
Ivan Martinez
52c302307a
Remove out of date scripts and fix mockgen script (#5859) 2020-05-14 17:11:52 -05:00
Michael Huang
a7b441270d
Update GetValidatorPerformance to support validator indices (#5687)
* add test for stream duties
* rem gomock
* Merge branch 'master' into stream-duties
* context cancelation test
* use interface for epoch ticker in duties
* fix build
* compute duties on first call
* pass tests for streams
* gaz
* ss stream duties
* Merge branch 'master' into stream-duties
* ensure only stream across epoch-wide reorgs
* regen mock for validator
* Update beacon-chain/blockchain/head.go
* Update RPC method GetValidatorPerformance to use validator indices
* Merge refs/heads/master into stream-duties
* Merge refs/heads/master into stream-duties
* Update beacon-chain/rpc/validator/server.go
* Merge branch 'master' into stream-duties
* Update commit hash for com_github_prysmaticlabs_ethereumapis
* Aggregate validator indices before appending performance summaries
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-performance-by-indices
* Merge stream-duties
* Make function more test friendly
* Add indices tests
* fixup
* Fix conflicts
* Update gateway max resv size to 16MB (#5756)

* Update max resv size to 16MB
* Merge refs/heads/master into 5752
* Use GrpcMaxCallRecvMsgSizeFlag for beacon node
* Merge branch '5752' of github.com:prysmaticlabs/prysm into 5752
* Typo
* Fix server
* Merge refs/heads/master into 5752
* Merge refs/heads/master into 5752
* Merge refs/heads/master into 5752
* Merge refs/heads/master into 5752
* Update beacon-chain/gateway/server/main.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into 5752
* Rebase to origin/master
* Rebase to origin/master
* Merge remote-tracking branch 'origin/master' into validator-performance-by-indices
* Apply suggestions from code review
* Merge branch 'master' into validator-performance-by-indices
* Fix conflict
* fixup
* Fix tests
* Revert workspace file
* gofmt
* Revert executable permissions on beacon-chain/rpc/beacon/validators.go
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Add SyncChecker to tests
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Update beacon-chain/rpc/beacon/validators_test.go
* Update beacon-chain/rpc/beacon/validators_test.go
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-performance-by-indices
* Add comment
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
* Merge branch 'master' into validator-performance-by-indices
2020-05-14 20:52:42 +00:00
terence tsao
2f27966b44
Fix state gen migration (#5858)
* Remove useless `currentSplitSlot == 0`
* Increase slots per archived point to 2048
* Don't delete last archived state
* Revert back to 256
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-migration-delete-latest-state
* Don't delete last archived state
* Regression test
* Revert
2020-05-14 20:03:14 +00:00
Ivan Martinez
7a8e85af9e
Add testing for EnableFieldTrie in state_trie.go (#5820)
* Add testing for EnableFieldTrie
* Merge branch 'master' into test-field-trie
* Merge branch 'master' into test-field-trie
* Merge refs/heads/master into test-field-trie
* goimports
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Merge refs/heads/master into test-field-trie
* Add tests for generic HTR
* Merge refs/heads/master into test-field-trie
2020-05-14 17:38:34 +00:00
Ivan Martinez
6e9839f987
Validate slashings upon pool exit (#5848)
* Validate slashings upon pool exit
* Change in implementation
* Fix test
* Merge branch 'master' into validate-slashing
* Merge refs/heads/master into validate-slashing
* Merge refs/heads/master into validate-slashing
* Merge refs/heads/master into validate-slashing
* Undo e2e changes
* Merge branch 'validate-slashing' of github.com:prysmaticlabs/prysm into validate-slashing
* Merge refs/heads/master into validate-slashing
2020-05-14 17:11:28 +00:00
terence tsao
f6d8633965
Revert "Check Whether Block Is Already Processed" (#5856)
* Revert "Check Whether Block Is Already Processed (#5850)"

This reverts commit 7630f1852f.
2020-05-14 16:37:58 +00:00
Nishant Das
20c2d78731
add new methods and tests (#5852)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-14 22:44:03 +08:00
Nishant Das
7630f1852f
Check Whether Block Is Already Processed (#5850)
* check for missing blocks
* error log
* add test
* fix lint
* fix test
* terence's review
* do not mess with on block
* Merge refs/heads/master into addCheck
2020-05-14 14:11:35 +00:00
Victor Farazdagi
471779e4fc
Fixes bug with excessive rate limiting (#5853)
* fixes bug with excessive rate limiting
2020-05-14 13:43:36 +00:00
Nishant Das
34c02ffd34
Allow a Larger Allowance for Peer Faults (#5847)
* allow larger allowance
* change to 5
* Merge branch 'master' into allowLargerAllowance
* test
2020-05-14 03:08:58 +00:00
Preston Van Loon
f831a799c5
Ensure proper block slot for process block header (#5846)
* Ensure proper block slot
* Merge refs/heads/master into extra-validation
2020-05-14 00:31:58 +00:00
terence tsao
dc20f3d72b
Regen historical using ArchivedPointRoot then State (#5845)
* Regen from ArchivedPointRoot and State
* Merge branch 'master' into fix-regen-historical-states
2020-05-14 00:10:36 +00:00
terence tsao
70c6dbeb68
Delay atts until subsequent slot (#5833) 2020-05-13 15:46:39 -07:00
terence tsao
8ce01acbcf
Check seed before shuffle (#5841) 2020-05-13 14:25:36 -07:00
Shay Zluf
ffa08f5a85
Stream p2p agg attestation (#5809)
* stream aggreagted attestations from p2p network to indexed attestation stream

* remove excessive log

* fix test

* handle nil attestation as well

* Update beacon-chain/sync/subscriber_beacon_aggregate_proof.go

* Update beacon-chain/sync/subscriber_beacon_aggregate_proof.go

* Update beacon-chain/sync/subscriber_beacon_aggregate_proof_test.go

* terence feedback

* sort imports

* sort imports

* Change to received buffer

* preston feedback

* error log

* raul feedback

* more logging changes

* fix duplicate package name

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-05-13 12:21:53 -05:00
Nishant Das
08762af5a2
Revert "Use A Single State in Sync (#5764)" (#5837)
This reverts commit d5f43a8214.
2020-05-13 19:57:59 +08:00
Ivan Martinez
ca7e057ca7
Move cheaper operations earlier into code path (#5835)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-13 14:37:24 +08:00
Raul Jordan
578703fa05
Properly Divide SecondsPerSlot Into Milliseconds (#5821)
* use util for dividing slot durations

* fix places with dividing slot duration

* more dividers fixed

* format import

* fix formatting in validator test

* fix slot test tolerance

* nishant suggestions

* imports

* resolve e2e

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-13 11:28:17 +08:00
Nishant Das
d5f43a8214
Use A Single State in Sync (#5764)
* change this stuff

* Update beacon-chain/blockchain/process_block_helpers.go

* Update beacon-chain/blockchain/process_block_helpers.go

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-05-13 07:49:15 +08:00
Ivan Martinez
6488ab4a26
Add fast function for comparing attestation data (#5834)
* Add function for comparing attestation datas

* Fix imports

* Apply beneficial spots

* Gaz
2020-05-12 16:55:17 -04:00
Ivan Martinez
cd1a4f18f4
Fix historical detection for the slasher (#5831)
* Fix historical detection for the slasher
* More fixes
* Fix
* Run historical detection sequentially
* Add context err handler
* Add return
* Fixes
* Merge branch 'master' into slasher-fixes
2020-05-12 18:32:42 +00:00
terence tsao
9ffc6b71d6
Update spec tests to v0.11.2 (#5832) 2020-05-12 12:44:17 -05:00
Connor Stein
4242581f1e
Test EnterPassword function in shared/cmd (#5822)
* test

* fix golint

* more lint

* gazelle

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-05-12 10:01:02 -05:00
Nishant Das
ab23fadc5e
Revert Change Added in #5811 (#5828)
* revert

* remove
2020-05-12 21:39:36 +08:00
Victor Farazdagi
baf9ec60eb
Adds BlockBatchLimitBurstFactor flag (#5825)
* adds BlockBatchLimitBurstFactor flag
* Merge branch 'master' into burst-factor-flag
2020-05-12 11:31:10 +00:00
Victor Farazdagi
79ce15df63
Removes deprecated flag from config (#5824)
* removes deprecated flag from config
2020-05-12 10:53:24 +00:00