Commit Graph

5009 Commits

Author SHA1 Message Date
Potuz
15706a36cb
Allow exiting validators to attest (#7747)
* Allow exiting validators to attest

* Added regression test

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-09 18:01:38 +00:00
Nishant Das
5995d2394c
Pass By Value Instead Of Reference (#7710)
* change to value from reference

* fix up

* make it a pointer

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-09 10:08:08 +00:00
Potuz
1c5d533c93
Fix comment on DisableAccountMetricFlag (#7748) 2020-11-09 08:26:52 +00:00
Nishant Das
8cac198692
Keep Non Finalized States (#7742)
* keep non finalized states

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

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-07 18:18:29 +00:00
terence tsao
4dcae8707a
Startup routine to clean up dirty states in DB (#7729)
* Clean up dirty states in DB

* Add Passthrough

* Fix finalized check

* Add tests

* Remove unused test vars

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

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

* Use non-strict inequality

* Prevent overflow and test

* Use slotsPerArchivedPoint/3 to loosen criteria

* Update test

* Background

* Handle ctx cancellation

* Update beacon-chain/state/stategen/service.go

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

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

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

* Handle error

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-11-06 21:05:44 +00:00
Raul Jordan
b8644bdeb4
Minor Log Improvement to gRPC Server (#7722)
* small fix

* fix e2e

Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-06 19:18:56 +00:00
yorickdowne
d733f2781a
Add --mainnet no-op flag for easier docker tooling (#7737)
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-06 18:02:04 +00:00
Raul Jordan
20370e2017
Add DeepSource for Bash Files (#7741) 2020-11-06 17:04:48 +00:00
Victor Farazdagi
51796d77f6
Init-sync: backtracking to alternative forks (#7564)
* cherry-pick from previous commits

* use finalized checpoint instead of head slot

* add helpers

* add dedicated error for missing blocks

* add backtracking options to fetcher

* TestBlocksFetcher_alternativeSlotBefore regression test

* update peer block provider test

* update injected deps

* update round robing deps

* update fetcher

* patch status and stream handlers

* test template

* gazelle

* revert BestNonFinalized changes

* extract waitForBandwidth method

* extend test

* remove redundant code

* add flag

* update queue

* update thresholds

* upd inequality

* minor cleanup

* check for mode

* add backtracking queue test

* merge from master

* remove redundant test

* correct logging level

* fix tests

* remove test template

* Nishant's suggestion to parametrize magic number
2020-11-06 15:54:20 +00:00
Nishant Das
135ec5f247
Change To Mainnet Block Time (#7736) 2020-11-06 04:09:26 +00:00
Raul Jordan
d4b23e6821
Fix Pull Request Template Language (#7738) 2020-11-05 20:46:28 +00:00
Victor Farazdagi
6e21b7a623
Add one more assertion to fetcher test (#7733) 2020-11-05 19:48:49 +00:00
Victor Farazdagi
f6cbfd5e27
Init-sync fetcher: backtracking (#7704)
* fetcher: backtracking

* gazelle

* amend comments

* cleanup

* cleanup

* minor fixes

* simplify

* remove unrelevant test

* add TestBlocksFetcher_findAncestor

* more tests

* Address Nishant's feedback

* optimize backtracking

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-05 07:27:46 +00:00
Nishant Das
bafc7479b0
Add Backoff For Peer Dials (#7726)
* add tests

* Update beacon-chain/p2p/peers/status_test.go

* fix conditional

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-11-05 05:52:49 +00:00
Nishant Das
edf7ed614e
Reduce Hashing When Filling In Forkchoice Blocks (#7716)
* reduce hashing

* add in test

* Update beacon-chain/blockchain/process_block_test.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-05 01:33:45 +00:00
terence tsao
882d30c382
Remove duplicated --slots-per-archive-point in help menu (#7731)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-05 00:53:59 +00:00
Preston Van Loon
d2694ee198
Powchain: Minor fix for log statement (#7728)
* Minor fix for log statement

* Update beacon-chain/powchain/service.go
2020-11-05 00:10:37 +00:00
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
Radosław Kapka
3485f3b8b0
Check if all validators are exited on every slot (#7719)
* check if validators are exited in every loop iteration

* regression test

* fix mock validator

* handle context.WithValue key in a more idiomatic way

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-04 11:41:47 -08: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
Potuz
b996824446
call LogValidatorGainsAndLosses at end of epoch (#7708)
* call LogValidatorGainsAndLosses at end of epoch

* Reviewer fixes

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-03 23:47:12 +00: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
Nishant Das
cd00b6f594
fix herumi (#7706) 2020-11-02 21:28:38 -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
Raul Jordan
0b5db9d4a1
Update Dependencies for Bug Fixes and OSS Vulnerability Patching (#7646)
* dependency updates for OSS fixes

* tidy

* rem libp2p update

* more deps

* no workspace change

* tidy

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-02 18:50:55 +00: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
Raul Jordan
ddc8dc36f8
remove use of recover (#7683)
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2020-10-30 14:40:26 +08: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
Raul Jordan
581bed2017
Load in JSON Validators for Genesis State Generation (#7643)
* load in genesis state from JSON validators

* completed feature with tests

* bazel change

* fix docker image

* deep source
2020-10-29 22:37:16 +00:00