Commit Graph

2703 Commits

Author SHA1 Message Date
Victor Farazdagi
c5a8363998
Remove redundant error return from filterPeers() (#7730) 2020-11-04 23:29:50 +00:00
Victor Farazdagi
7acd73e1fe
Refactor p2p requests: extract BeaconBlocksByRangeRequest and BeaconBlocksByRootRequest (#7718)
* extract SendBeaconBlocksByRangeRequest

* adds extra processing

* extract SendBeaconBlocksByRootRequest

* extract into rpc_send_request.go

* add tests

* more tests

* gazelle

* remove redundant import

* for consistency

* for consistency

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-04 20:09:19 +00:00
terence tsao
3a06f6e228
Update genesis time and deposit contract (#7727)
* Update genesis time and deposit contract

* Remove medalla as default config

* Update default case to use mainnet

* Update contract deployment block

* Update contract deployment block in flag

* Update shared/featureconfig/config.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-11-04 17:36:31 +00:00
Nishant Das
8661eb356f
Fuzz: sigp/beaconfuzz#91 (#7725) 2020-11-04 14:05:48 +00:00
Nishant Das
090b71bec5
clean up better (#7723) 2020-11-04 15:24:29 +08:00
terence tsao
f1e6aba34e
Fix GetValidatorParticipation slot to epoch conversion (#7721)
* Fix current slot conversion

* Update tests

* Use a higher epoch number
2020-11-04 10:54:56 +08:00
Raul Jordan
0b0d77dd0c
Include Multilock for GetAttPreState With Tests (#7669)
* multilock addition with tests and special clean logic on unlock

* bazel changes

* multilock key string concat

* Update beacon-chain/blockchain/process_attestation_helpers.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

* presto feedback

* revert in prog cache

* defer unlock

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-11-03 21:18:15 +00:00
Potuz
1a03dad6bc
Include exiting and slashing as active in metrics (#7713)
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-03 20:40:25 +00:00
Raul Jordan
5d93ee1843
Use Atomic Booleans in Sync Service (#7682)
* use atomic bool in tests as well

* gaz

* wrapped up tests

* fix test

* shadowing fix

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-03 19:12:24 +00:00
terence tsao
2da1ec8052
Remove expensive validators only method (#7717)
* Remove validators only method

* Gazelle
2020-11-03 12:47:21 -06:00
Nishant Das
c949913822
start from finalized checkpoint (#7715) 2020-11-03 22:43:06 +08:00
terence tsao
d22f48f84d
Update which state to use for participation endpoint (#7702)
* Update GetParticipation

* Use head state for prev epoch

* Update test
2020-11-02 20:26:51 -06:00
terence tsao
19ac6782c9
Use batch verify signature for a signle block (#7687) 2020-11-02 15:27:29 -08:00
Nishant Das
40368bedd3
Allocate Fewer Large Slices (#7698)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-02 18:04:15 +00:00
Raul Jordan
51b39420dc
Avoid Setting State to Nil In Process Deposit (#7681)
* avoid setting state to nil

* add other nil check
2020-11-02 17:12:05 +00:00
Raul Jordan
d2ae1b9286
Continue In ProcessPreGenesisDeposits (#7678)
* return error properly

* add in test

* reset

* Apply suggestions from code review

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: nisdas <nishdas93@gmail.com>
2020-11-02 10:34:37 -06:00
Nishant Das
4bc7cb6959
exit better (#7697) 2020-11-02 13:25:44 +08:00
Victor Farazdagi
3584bcba8e
Fix param naming in BestNonFinalized (#7693) 2020-11-01 00:03:44 +00:00
Victor Farazdagi
926d3b9b34
Init-sync: more tests + minor refactoring (#7692)
* cherry-pick commits

* re-arrange calls
2020-10-31 21:33:57 +00:00
terence tsao
817c16a2f4
Use a short cut in migration step (#7686)
* Don't generate state if it's already in DB

* Use proper missing root

* Update logic for clarity
2020-10-31 19:01:05 +00:00
terence tsao
92b6e0b6af
Add and use HasStateInCache (#7691) 2020-10-31 11:38:01 -07:00
Raul Jordan
b3155a04f5
Revert "Revert "Add In Progress Checker For Checkpoint Cache"" (#7690)
This reverts commit 46c04b98d9.
2020-10-31 15:59:50 +00:00
Nishant Das
df762bbfee
cleaner logging (#7689) 2020-10-31 19:10:08 +08:00
terence tsao
f79b168ab2
Update to correct odering (#7688) 2020-10-31 10:08:22 +08:00
Nishant Das
211d9bc0b9
Update BLST And Herumi (#7632)
* fix build from source

* clean up

* update again

* change everything

* workaround for now

* fix versioning

* all passing now

* fix build issues

* clean up

* revert use of MulVerify

* gaz

* stub

* Apply suggestions from code review

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* fix all

* fix test

* todo

* fix stub

* revert back

* make deep source happy

* Update shared/bls/herumi/public_key.go

* Update shared/bls/blst/signature.go

* Update shared/bls/blst/signature_test.go

* imports

* move iface to common, export errors

* rm iface build

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-10-30 19:06:33 +00:00
terence tsao
386bfdd6eb
Remove deprecated headstate method in DB (#7680)
* Remove head state in DB

* Clean up tests

* Fix pow tests

* Add stateGen to pow service
2020-10-30 15:11:08 +00:00
Preston Van Loon
99f15943a8
Fuzz: sigp/beaconfuzz#78 (#7684)
* Add failing test to verify https://github.com/sigp/beacon-fuzz/issues/78

* revert beacon-chain/core/blocks/spectest/attestation_test.go

* Describe bug in comments, fix bug

* 1
2020-10-30 02:06:53 +00:00
terence tsao
fb2dfec1f4
Use state by root to get finalized state (#7677) 2020-10-29 14:04:06 -05:00
Nishant Das
2e4dee5aeb
Stategen Bug Fixes (#7674)
* bug fixes

* fix

* terence's review

* Make comments more explicit

* Update variable names

* Update tests

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-10-29 16:14:57 +00:00
Nishant Das
46c04b98d9
Revert "Add In Progress Checker For Checkpoint Cache" (#7672)
This reverts commit 37bf6617c0.

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-10-29 14:35:30 +00:00
terence tsao
301499d134
Fill in blocks to fork choice store during init (#7665)
* Fill in blocks to fork choice store during init

* Use format option

* Use format option

* Use correct head block. Thanks Nishant

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-29 05:27:30 +00:00
Victor Farazdagi
4fc0a50569
Turn init-sync FSM logs to trace level (#7670)
* trace

* go fmt

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-29 04:55:07 +00:00
Preston Van Loon
c1c0b53c25
validateCommitteeIndexBeaconAttestation: Reorder boolean logic to reduce db calls (#7671)
* reorder boolean logic to shortcut

* same issue, in another place

* refactor for the greater good
2020-10-29 04:14:16 +00:00
Nishant Das
37bf6617c0
Add In Progress Checker For Checkpoint Cache (#7659)
* add inprogress checker

* fix test

* fix

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-29 01:21:49 +00:00
Preston Van Loon
149d3b84fa
Check attestation target checkpoint epoch matches attestation slot (#7667)
* Check attestation target checkpoint is within current or previous epoch

* reject bad att where slot does not match target

* Add test, reduce redundant check
2020-10-29 00:52:18 +00:00
Preston Van Loon
5092093389
Revert "Remove redundant checks in processAttestation" (#7666)
This reverts commit 3b34954e75.
2020-10-28 22:46:26 +00:00
terence tsao
3b34954e75
Remove continue checks (#7663) 2020-10-28 13:04:28 -07:00
Preston Van Loon
ec5e59e212
remove unused and untested method (#7662)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-10-28 12:03:30 -07:00
Preston Van Loon
5f80754013
Revert "Remove Top Jaeger Span Offenders" (#7657)
This reverts commit ec8eab21ae.

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-28 06:07:14 +00:00
Raul Jordan
d9e4084d6d
Remove Lock Contention in getAttPreState (#7656)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-28 05:42:54 +00:00
Raul Jordan
ec8eab21ae
Remove Top Jaeger Span Offenders (#7655) 2020-10-28 05:14:54 +00:00
terence tsao
0cbd8bc03d
Use root + slot for skip slot cache key (#7654)
* Update skip slot cache's key

* Add tests

* Refactor into its own function

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-10-28 03:09:05 +00:00
Nishant Das
4f5726b3af
Initialize State Correctly In Powchain (#7648)
* fix bug

* Update beacon-chain/powchain/service.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

* return error

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-27 17:50:46 +00:00
Preston Van Loon
424488bf8a
Deprecate db.HeadState (#7653)
* Deprecate db.HeadState

* Deprecate db.HeadState
2020-10-27 16:25:52 +00:00
Victor Farazdagi
dbbbc7586f
Remove redundant attribute in validator test (#7649)
* remove redundant attribute in validator test

* remove other attribs
2020-10-27 12:15:35 +00:00
Preston Van Loon
fcbb168c76
Code health: review map usage (#7635)
* 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>
2020-10-26 21:17:07 +00:00
Nishant Das
f1bce1001d
Restrict Proposer Lookup to the Current Epoch (#7542)
* checkpoint

* add test

* Update beacon-chain/core/helpers/committee_test.go

* preston's review

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-10-26 13:40:38 -07:00
terence tsao
ec77196197
Remove checkpoint info cache and usages (#7642)
* Remove checkpoint info cache and usages

* Gazelle
2020-10-26 14:09:19 -05:00
Raul Jordan
a468a12ef0
Allow Specifying Output Directory When Creating DB Backups (#7630)
* move flags

* backup db output dir flag

* fix build

* fix up broken backup test

* Radek's feedback

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-26 18:20:54 +00:00
Victor Farazdagi
e6d688f6d5
Init-sync: re-arrange tests (#7641)
* move tests

* formatting

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-26 08:54:06 +00:00