Commit Graph

4046 Commits

Author SHA1 Message Date
terence tsao
640bba8a6c
Avoid active validator count cache for genesis (#6292)
* Add helper to prevent zero hashes

* Test

* Don't use cache if it's genesis

* Regression test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 19:48:10 -05:00
terence tsao
6781bd643b
Fix getting att pre state in sync (#6295) 2020-06-17 16:44:43 -07:00
terence tsao
802bdf5561
Fix GetValidatorPerformance before/after balances (#6293)
* Add helper to prevent zero hashes

* Test

* Fix precompute validators to have before/after balances

* Update tests to use correct values

* Even better test setups

* Gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 13:46:42 -05:00
terence tsao
523fc621d9
First part of block chain service cleanup (#6286)
* Add helper to prevent zero hashes
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Remove ReceiveBlockNoPubsubForkchoice and rename ReceiveBlockInitialSync
* Apply feature flag to process_block.go
* Update mock and tests
* Update beacon-chain/blockchain/process_block.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
* Fix mock ReceiveBlockInitialSync. Thanks Victor!
* Merge branch 'bc-pkg-cleanup' of github.com:prysmaticlabs/prysm into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
2020-06-17 17:11:21 +00:00
Shay Zluf
472fbd3949
Less restrictive block stream for slashing detection (#6269)
* verify sig in stream

* state cache used

* fix import

* fix import

* fix tests

* add log for proposer slashing

* fix e2e

* use chain head to verify sig

* revert fix

* remove extra line

* add line

* revert extra log

* fix tests

* terence feedback

* fix

* fix test

* remove extra setup

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 12:38:07 -04:00
Ivan Martinez
cd439adfc7
Implement flat spans cache into DB (#6248)
* Implement flat spans cache DB

* Fix interface

* Fix db func

* Gaz

* Update slasher/detection/attestations/types/epoch_store_test.go

* Fix tests

* Fix

* Fix for comments

* Fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-17 10:26:08 -05:00
Raul Jordan
0bfa1ecd03
Clarify Insecure gRPC Connection Logs (#6276)
* clarify insecure conn
* fix up broken test
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
2020-06-17 14:32:13 +00:00
terence tsao
af3122a9e8
Fork choice avoids redundant call to get_ancestor (#6282)
* Add helper to prevent zero hashes

* Test

* Add cacheJustifiedStateBalances

* Cache justifed balances

* Use cached justified balances

* Remove unncessary justification checks during initial syncing

* Test

* Proper locking

* Use getter

* Add CheckPointIsEqual helper

* Test CheckPointIsEqual helper

* Update finalizedImpliesNewJustified

* Better tests for finalizedImpliesNewJustified

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 08:50:10 -05:00
Preston Van Loon
4740f7ed57
pre-allocate memory for AggregateVerify (#6285)
* pre-allocate memory for AggregateVerify
2020-06-16 23:21:31 +00:00
Preston Van Loon
213be4cfbe
Verify many block attestations at once (#6277) 2020-06-16 14:19:10 -07:00
Preston Van Loon
5fa3bbb991
Add --initial-sync-verify-all-signat as a dev flag. Issue #5176. (#6283) 2020-06-16 11:06:32 -07:00
terence tsao
fe2f8a1c04
Use justified balances for fork choice (#6272) 2020-06-16 08:10:34 -07:00
Nishant Das
ed883c9fff
More Fixes For Powchain (#6278)
* fix issues

* add check

* Update beacon-chain/powchain/service.go

* Update beacon-chain/powchain/service.go

* Update beacon-chain/powchain/service.go

* Update beacon-chain/powchain/service.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-06-15 21:07:20 -05:00
terence tsao
4c143f4ed4
Fix underflow in resyncIfBehind (#6274) 2020-06-15 16:46:36 -07:00
Preston Van Loon
8097eea607
Fix underflow in SlotsSinceGenesis (#6275)
* Fix an underflow in genesis time calculation
* goimports
2020-06-15 21:56:11 +00:00
Ivan Martinez
4b4a7459d9
Fix windows DB path error and make errors more concise (#6270)
* Make DB errors more verbose, fix windows path error
* Merge branch 'master' into windows-err
* Merge refs/heads/master into windows-err
* Merge refs/heads/master into windows-err
2020-06-15 20:00:35 +00:00
Ivan Martinez
bf548d1670
Fix validator creation path (#6271)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-15 12:27:45 -07:00
terence tsao
e59ee2f203
Fix validator summary reporting (#6267)
* Add helper to prevent zero hashes
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Update validator summary
* Update existing tests to work with new indices
* Remove extra log
* Gazelle
* Merge branch 'master' into fix-validatory-summary
* Merge refs/heads/master into fix-validatory-summary
* Merge refs/heads/master into fix-validatory-summary
2020-06-15 17:25:58 +00:00
Raul Jordan
83d1aa8fa2
Default BeaconRPCProvider for Validator Should Match Beacon Node's Host (#6268)
* default bind to localhost for validator
* Merge branch 'master' into validator-localhost
2020-06-15 16:52:15 +00:00
Victor Farazdagi
9d42148b93
Go mod tidy (#6264)
* updates go.sum
* go mod tidy checker
* reverts go.sum
* updates apk command
* fixes path
* show git status
* more debug info
* more debug info
* minor test
* get rid of git
* multiple checks
* test reset
* change order of checkers
* mod verify
* broken sum
* Merge refs/heads/master into go-mod-tidy
* better info
* Merge branch 'go-mod-tidy' of github.com:prysmaticlabs/prysm into go-mod-tidy
* better info
* reset
* run go mod tidy to fix
2020-06-15 16:15:54 +00:00
Nishant Das
87084ec9f1
fix issues (#6265) 2020-06-15 10:43:45 -05:00
Victor Farazdagi
ebd45ba336
updates go.sum (#6262) 2020-06-15 06:37:07 -07:00
Nishant Das
9d8420b20c
Fix Discovery Panic (#6261)
* fix dv5 panic
* add back
2020-06-15 04:22:29 +00:00
terence tsao
a9070ad725
ActiveValidatorCount to use cache (#6254)
* Add helper to prevent zero hashes

* Test

* Add ActiveIndicesCount getter for committee cache

* ActiveIndicesCount test

* ActiveValidatorCount to use cache

* Update cache on miss

* Update tests
2020-06-14 15:24:49 -07:00
terence tsao
f4e9e2f49c
Minor clean up to 6249 (#6253)
* Add helper to prevent zero hashes

* Test

* Comments

* Comments
2020-06-14 10:43:25 -07:00
Nishant Das
1dfeb645b6
Filter Peers Properly With Connection Gater (#6251)
* add new filtering
* add new tests
* gaz
* shay's review
* Merge branch 'master' into fixFiltering
2020-06-14 14:47:58 +00:00
Nishant Das
933ab6808b
mark peer as bad (#6250) 2020-06-14 07:10:18 -07:00
Nishant Das
f9d80e4a28
Fix Genesis Justified Checkpoints (#6249)
* handle zero hash
2020-06-14 09:02:56 +00:00
Ivan Martinez
f6ecf66d1a
Fix pubkey used in validator metrics (#6246)
* Fix validator metrics pubkey
* Merge branch 'master' into val-metrics
2020-06-14 08:28:26 +00:00
Nishant Das
caf61bd824
Use Connection Gater to Manage Peer Connections (#6243)
* use gater
* Merge branch 'master' into connGater
* Update beacon-chain/p2p/testing/p2p.go
* fmt
* gaz
2020-06-14 07:35:05 +00:00
terence tsao
87ba5a5993
Fix ancestor to return most recent root in the case of skip slot (#6242)
* Revert "remove excess copies (#6142)"

This reverts commit c956905cf0.
* Update ancestor function to handle skip slot
* Test
* Revert "Revert "remove excess copies (#6142)""

This reverts commit f1222b5e77f9356dd370182808d9c1e5fc3f5e12.
* Merge refs/heads/master into fix-ancestor
2020-06-14 06:58:36 +00:00
Nishant Das
0067e52b1e
Revert "Remove Excess State Copies" (#6240)
* Revert "remove excess copies (#6142)"

This reverts commit c956905cf0.
2020-06-14 06:34:33 +00:00
Shay Zluf
4c66edf2c2
Add cache for flan spans (#6199)
* flat span cache

* Plug cache into kv

* Add comments

* Fix

* Add doc.go

* Gaz

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-13 22:51:54 -04:00
terence tsao
c29cccf78e
Don't regen parent state for genesis state (#6237) 2020-06-13 11:04:04 -07:00
Raul Jordan
298955c92b
Add a Log for Newly Connected gRPC Clients in the Beacon Node (#6233)
* interceptor disable logging via feature flag
* Merge branch 'master' into validator-connection-logs
2020-06-12 20:41:05 +00:00
Raul Jordan
de45a54991
Do Not Ignore Max Gateway Size gRPC (#6232)
* do not ignore max message size in gateway
* fix build
2020-06-12 20:02:20 +00:00
Raul Jordan
87ca73d605
Countdown Until Genesis (#6231)
* added in logic
* latest countdown
* fixed up formatting and add tests
* ready for review
* Merge branch 'master' into countdown-genesis
* no log if after genesis
* Merge branch 'countdown-genesis' of github.com:prysmaticlabs/prysm into countdown-genesis
* countdown
* smarter logging
* added buffer period for countdown
* Merge refs/heads/master into countdown-genesis
2020-06-12 18:47:18 +00:00
terence tsao
bc76c95d62
Skip proposer duty calculation for slot 0 (#6228)
* Skip proposer assignment for slot 0

* Test

* Clear cache before test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-12 11:20:50 -07:00
Preston Van Loon
c461c72777
Add dockerhub image endpoints (#6230)
* Add dockerhub image endpoints
2020-06-12 17:06:12 +00:00
Nishant Das
c725a9c8f2
Sort Duplicate Blocks In Response (#6222)
* sort out new blocks
* add unit test
* Merge refs/heads/master into sortDuplicates
* victor's review
* Merge branch 'sortDuplicates' of https://github.com/prysmaticlabs/geth-sharding into sortDuplicates
* Merge refs/heads/master into sortDuplicates
2020-06-12 13:50:07 +00:00
Nishant Das
412da8e7cc
Follow Up to #6225 (#6226)
* don't wait
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into dontWait
* revert some changes
* bring back
2020-06-12 13:23:29 +00:00
Nishant Das
82f4d6a14a
Do Not Wait Till Genesis (#6225)
* don't wait
2020-06-12 11:44:04 +00:00
Preston Van Loon
89762492c8
Reduce JSON-RPC queries (#6221)
* Delete unused client property
* Only update the logs every 5 minutes
* Merge branch 'master' into reduce-json-rpc-calls
* Merge refs/heads/master into reduce-json-rpc-calls
* Merge refs/heads/master into reduce-json-rpc-calls
* PR feedback from @nisdas
* gofmt
* Merge branch 'reduce-json-rpc-calls' of github.com:prysmaticlabs/prysm into reduce-json-rpc-calls
2020-06-12 04:05:40 +00:00
Nishant Das
1a6edbbaa2
Fix Proposer Bug in Prysm (#6213)
* advance slots instead of setting slots
* Merge branch 'master' into fixProposerBug
* comment
* Merge branch 'fixProposerBug' of https://github.com/prysmaticlabs/geth-sharding into fixProposerBug
* Refactor `packAttestations` to utilize same advanced state
* Merge branch 'master' into fixProposerBug
* Merge branch 'master' into fixProposerBug
* Merge branch 'master' into fixProposerBug
* Merge refs/heads/master into fixProposerBug
* Merge refs/heads/master into fixProposerBug
* Update beacon-chain/rpc/validator/proposer.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into fixProposerBug
2020-06-11 23:05:10 +00:00
SjonHortensius
409b167899
Provide some feedback to user when creating an account (#6212)
* Provide some feedback to user when creating an account

on my 1y old server the first step took 2 minutes, the second took 4
minutes. Provide at lease _some_ feedback we are doing something
intensive
* Merge branch 'master' into master
* Merge branch 'master' into master
* Merge branch 'master' into master
* Merge branch 'master' into master
2020-06-11 22:36:08 +00:00
Raul Jordan
abec538fda
Prevent Whistleblower Index Bug (#6219)
* resolve proposer panic

* proposer is whistleblower

* import

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-11 15:08:26 -05:00
Shay Zluf
898cd8b42b
No sig slasher rpc (#6174)
* detect slashable attestations and blocks without db update
* lint fixes
* fix mock
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* preston feedback
* Merge branch 'no_sig_slasher_rpc' of github.com:prysmaticlabs/prysm into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* nishant and ivan feedback
* Merge branch 'no_sig_slasher_rpc' of github.com:prysmaticlabs/prysm into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Merge refs/heads/master into no_sig_slasher_rpc
* Apply suggestions from code review
2020-06-11 18:50:12 +00:00
Ivan Martinez
ec6309a928
Cleanup flat spans implementation (#6150)
* Flat spanner improvements

* Fix tests, add more to ES type

* Move types to detection/types

* Fix

* Fix comments

* Fixes

* 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

* 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>

* Small fixes for slasher  (#6021)

* Small fixes for slasher

* Remove useless log

* Fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>

* Add voluntary exit processing to E2E (#6016)

* Add voluntary exit to E2E

* Fix long urnning e2e

* Fix for comments

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>

* Change slashing pool to use spec code  (#6030)

* Change slashing pool to use more spec code

* Fix test

* Undo unneeded changes

* Make sure to catch regression

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>

* Fix long-running E2E (#6047)

* Fixes for long running E2E
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-e2e
* Move metrics check up
* Merge refs/heads/master into fix-e2e

* E2E Improvements (#6091)

* Some fixes
* Merge branch 'master' into e2e-fixes
* Add another small delay
* Merge branch 'e2e-fixes' of github.com:prysmaticlabs/prysm into e2e-fixes
* Remove genesis test, make normal e2e run longer
* Gaz
* more fixes
* Merge branch 'master' into e2e-fixes
* Merge refs/heads/master into e2e-fixes
* Fix comment
* Merge refs/heads/master into e2e-fixes

* Begin changing tests

* Start work on tests

* Redo tests for EpochStore

* Add test for highest index

* Fixes

* Gaz

* Fix

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-11 14:17:44 -04:00
Raul Jordan
2fb485598b
Resolve Nil Validator Panic (#6218)
* resolve proposer panic
* Merge refs/heads/master into panic-proposer-slashed
2020-06-11 17:38:03 +00:00
terence tsao
cf3260b948
Revert "Send blocks that fails validation to slasher" (#6217)
* Revert "Send blocks that fail p2p validation to slasher (#6164)"

This reverts commit f40a7575de.
* Merge branch 'master' into revert-6164-slasherP2P
2020-06-11 17:11:28 +00:00