Commit Graph

2007 Commits

Author SHA1 Message Date
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
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
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
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
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
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
terence tsao
96219fc9fa
Add metric for reorg count (#5819)
* Add reorg counter metric
* Merge branch 'master' into reorg-metric
* Merge branch 'master' into reorg-metric
2020-05-12 05:48:16 +00:00
Nishant Das
edfb32021b
Validate Finalized Root in Status RPC Requests (#5811)
* additional status validation

* changes

* clean up

* Update beacon-chain/db/kv/finalized_block_roots.go

* Update beacon-chain/sync/rpc_status.go

* Update beacon-chain/sync/rpc_status.go

* Update beacon-chain/sync/rpc_status.go

* terence's review

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-12 11:22:01 +08:00
Preston Van Loon
40591924c2
Add attestation inclusion histogram (#5818)
* Add attestation inclusion histogram
* Merge branch 'master' into attestaiton-inclusion-histogram
2020-05-12 02:00:42 +00:00
Ivan Martinez
946a2caafd
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
2020-05-12 00:23:05 +00:00
terence tsao
b5e7f9dd6d
Run go fmt in prysm (#5815)
* go fmt
2020-05-11 22:03:15 +00:00
terence tsao
4c9ff7012c
Reduce state copies for SubmitAggregateSelectionProof (#5813)
* `GetValidatorPerformance` return `Unavailable` when syncing
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Reduce state copies for SubmitAggregateAndProof
* Merge branch 'master' into reduce-state-copies
2020-05-11 16:21:34 +00:00
Nishant Das
1110a5caab
minor fix (#5810) 2020-05-11 19:36:42 +08:00
Nishant Das
6840afb45e
Fix Issues With Peer Handshakes (#5799)
* add check

* make handshake better

* fix a lot of things

* Update beacon-chain/p2p/handshake.go

* Update beacon-chain/p2p/handshake.go

* fix things

* fix

* fix handshake

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-11 12:29:23 +08:00
terence tsao
34f28a31b1
No magic number for BlockBodyRoot (#5803)
* `GetValidatorPerformance` return `Unavailable` when syncing

* Use proper config values for BlockBodyRoot

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-11 11:45:31 +08:00
Preston Van Loon
bfe694c4f3
Check for pending deposits and exit early, if possible (#5802)
* Check for pending deposits and exit early, if possible
2020-05-11 02:38:41 +00:00
terence tsao
c000509bdb
GetValidatorPerformance return Unavailable when syncing (#5795) 2020-05-10 13:08:45 -07:00
Victor Farazdagi
e53452a437
Moves connectPeers to common test setup file (#5800)
* moves connectPeers
2020-05-10 14:47:05 +00:00