Commit Graph

5015 Commits

Author SHA1 Message Date
dv8silencer
b4bce7c726
Correct how AllValidatorsAreExited creates status request (#7758)
* fix and regression test

* address feedback

* gofmt

* improve test -- feedback

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
2020-11-10 04:46:28 +00:00
Preston Van Loon
9e9a913069
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=deps.bzl%prysm_deps (#7759) 2020-11-09 19:48:21 -08:00
Preston Van Loon
93c11e0e53
Update rules_go (#7202)
* Update rules_go

* go 1.15

* try with v0.24.2

* Update Mac OS X SDK

* gaz

* update SDK in toolchain config

* -I flag

* another -I flag

* Update rules_go, gazelle, bazel version

* regen, update rules_docker

* Revert "another -I flag"

This reverts commit 9255133d99bee1e94560a64316a4a7539a363935.

* Revert "-I flag"

This reverts commit 2954a41d76adc81ccb6281af243f4be1f79152e9.

* giving up

* Use OS X 10.12

* Use OS X 10.12

* Revert "Use OS X 10.12"

This reverts commit 4f60d5cb807b2ccccd484a85a6a7477a5fd13e28.

* Revert "Use OS X 10.12"

This reverts commit a79177fab7182ad792d1cee7fb61214ef8bd73ab.

* osx toolchain tweaks necessary to work with 10.15 mac sdk

* Update docker image, regen

* gaz

* test using custom image

* Revert "test using custom image"

This reverts commit 95b8666810a254f16061c99e2ea0ae4d020b2f2d.

* explicit go version

* Clean up docker image rules with new definitions. gazelle

* please the linter

* Update protobuf compiler to 3.13.0, run gazelle

* Update gazelle to fix empty build files. https://github.com/bazelbuild/bazel-gazelle/pull/926

* update skylib

* fix herumi fuzz build

* remove comment from tools/cross-toolchain/regenerate.sh

Co-authored-by: rkapka <rkapka@wp.pl>
Co-authored-by: SuburbanDad <gts.mobile@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-10 03:01:56 +00:00
terence tsao
1b9911ccc3
Batch verify aggregated attestation signatures (#7744)
* First take. Got benchmark numbers

* Remove benchmark test

* Final clean up

* Failing to verify aggregator index should be reject
2020-11-10 00:54:44 +00:00
terence tsao
be40e1a3b9
Update delete state(s) functions (#7754) 2020-11-09 15:37:36 -08:00
Raul Jordan
d4c954648c
Prevent Usage of Stdlib File/Dir Writing With Static Analysis (#7685)
* write file and mkdirall analyzers

* include analyzer in build bazel

* comments to the single entrypoint and fix validator references

* enforce 600 for files, 700 for dirs

* pass validator tests

* add to nogo

* remove references

* beaconfuzz

* docker img

* fix up kv issue

* mkdir if not exists

* radek comments

* final comments

* Try to fix file problem

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-11-09 14:27:03 -06:00
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