Commit Graph

5054 Commits

Author SHA1 Message Date
Fabrice Cheng
16bccf05cf
[Feature] enable/disable validator accounts (#7746)
* add --enable --disable flags for validator accounts

* refactor DeleteAccountConfig into AccountConfig to be used for enable and disable feature

* add `disable` flag for validator accounts

* [wip] add method to disable account

* refactor account delete

* add disable & enable with proper filters

* fix keymanager unit tests

* update DisabledPublicKeys to be a string instead of [][]byte

* fix FetchValidatingPrivateKeys to only fetch active keys with new string format

* fix FetchValidationPrivateKeys with new DisabledPublicKeys format (as a string)

* rename file + update AccountsConfig to include Disable, Enable and Delete distinct attributes

* rename accounts_activation -> accounts_enable_disable

* revert changes from using string to [][]byte for DisabledPublicKeys

* add FetchAllValidatingPublicKeys to preserve the functionality for accounts list, backup and delete

* fix unit tests

* convert publickeys from [][]byte to str before passing it to pb message

* add unit tests for disable keys

* add unit tests for EnableAccounts

* revert WORKSPACE LLM for now

* ran gazelle

* move function to convert KeymanagerOpts to Config inside rpc and run gazelle

* add unit tests for FetchAllValidatingPublicKeys

* fix keymanageropts for InteropKey

* Fix mistake for enable accounts

* add docstring to DisableAccountsCli and EnableAccountsCli

* remove previous testnet and add toledo & pyrmont
2020-11-13 10:06:24 -06:00
Nishant Das
8dcdfea2a8
Make Blst the Default Library (#7805)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-11-13 15:25:05 +00:00
Nishant Das
244d9633af
Update Go-Ethereum Dependency (#7804)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-13 14:52:27 +00:00
Nishant Das
d281ef9c56
Clean Up GoodByes (#7790)
* clean up

* cleanup

* fix

* fix tests

* change

* deepsource

* fix test
2020-11-13 12:58:13 +00:00
Nishant Das
58fcb52220
Fix Windows Builds For Blst (#7803)
* checkpoint

* fixWindowsBuils add transitive includes to mingw toolchain

* comment

Co-authored-by: SuburbanDad <gts.mobile@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-13 07:17:39 +00:00
Preston Van Loon
8d50fa10e6
Remove testnets prior to spec v1.0.0 (#7802) 2020-11-13 06:42:33 +00:00
Preston Van Loon
21d4c8f3f8
Update rules_go, prune unused go_repositories (#7800) 2020-11-13 04:32:15 +00:00
terence tsao
5fdb916b4f
Align to spec v1.0.0 (#7469)
* Update eth1data params to double

* Update spec tests tags and state field for fssz gen

* Update more spec test sha tags

* Update slashing params

* Update slashing precompute to use config instead of hardcoded 3

* Update slashing test values due to config changes

* Update configs for slashedless test

* Go mod tidy

* Add toledo config (#7743)

* Update genesis delay to one week (#7782)

* Add Pyrmont config (#7797)

* Add Pyrmont config

* Fix config

* Update genesis time to the correct value

* Remove TestExecuteStateTransition_FullBlock

* Add back missing comments

* Update spectests to v1.0.0

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-11-13 01:00:05 +00:00
Shay Zluf
18be4a4e3e
Immediate Slashing Protection Data Storage (#7789)
* Immediate save of validator protection data

* fix error log

* separate delete from save

* remove logs

* rename delete into reset

* comment fix

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-12 22:07:32 +00:00
Raul Jordan
e9136e9679
Remove Outdated Keystore Cryptography (#7796)
* remove outdated dependency

* fix up eip tests

* tidy
2020-11-12 21:16:41 +00:00
Preston Van Loon
5f9239595b
Mitigate potential overflow. ethereum/eth2.0-specs#2129 (#7795) 2020-11-12 20:28:19 +00:00
Shay Zluf
47daedaf11
Warn missing protection db (#7792)
* Warn user for missing protection db

* better warning message

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-12 19:22:11 +00:00
terence tsao
52d850f355
Change connect/disconnect logs to debug (#7794)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-12 18:46:51 +00:00
terence tsao
d1b9f12a1e
Fix and tests (#7793) 2020-11-12 12:17:54 -06:00
Nishant Das
56fd535dd5
Add Gossip Scoring For Peers (#7184)
* add gossip scoring

* fix

* clean up

* remove

* add new topics

* clean up gossip scoring

* clean up

* fix

* gaz

* remove true

* comment better

* remove from dev
2020-11-12 08:08:07 +00:00
Victor Farazdagi
79d19ea438
Enable head sync only during period of non-finality (#7784)
* enable head sync only during long period of non-finality

* Terence's suggestion

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-12 02:21:59 +00:00
terence tsao
ec2e677668
Update to not return state (#7786) 2020-11-11 16:40:43 -08:00
Raul Jordan
8e3c6e45ef
Add EIP-2333 Conformity Tests (#7783)
* begin spec test for eip

* confirmity tests

* gaz
2020-11-11 21:24:08 +00:00
Ivan Martinez
a21a2c9e95
Add configurable deposit amounts to testutil (#7775)
* Add other functions to deposit helpers for configurable balance

* rename and comment

* Use secret key cache and test

* Gaz

* fmt
2020-11-11 14:47:26 -06:00
Potuz
25118fb8dc
Stop early PendingExits (#7772)
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-11 18:55:52 +00:00
Radosław Kapka
06902c667d
Fix readme typo (#7779)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-11 14:40:24 +00:00
Potuz
d3ca9985eb
log validator index in verifyExitConditions (#7773)
* log validator index in verifyExitConditions

* Fix missing symbol

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2020-11-11 12:55:33 +01:00
Raul Jordan
bd506bf4e8
Add Go Report Card to Prysm (#7778)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-11 09:03:13 +00:00
terence tsao
1a05fcae3c
Use requested epoch for GetValidatorParticipation (#7768)
* Ensure request epoch is used

* Update test

* Comment

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-11 08:17:20 +00:00
Ivan Martinez
3c5bf9bf72
Remove unused chainStartPubKeys logic (#7777)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-11 07:37:34 +00:00
Raul Jordan
24457e1aae
Fix Up Exits Pool Logic (#7774)
* Fix up exits logic

* comments

* tests for malformed exits

* comment fix

* add yet another unit test, check pending list with binary search

* simplify

* add test for favoring earlier exit epoch

* gaz

* removal of superficial map check
2020-11-11 06:52:58 +00:00
Raul Jordan
660ed2d9a8
Remove Recursive Read Lock in Shared/Rand (#7776) 2020-11-11 05:59:44 +00:00
Raul Jordan
4290ba416c
Fix Prysm Runtime Data Races (#7770)
* handle state trie data races

* race fixes

* added proper locks

* fix gaz

* use thread-safe refs() function
2020-11-10 20:57:07 -06:00
terence tsao
9e9a172248
Add chain info tests (#7771) 2020-11-10 23:45:27 +00:00
Victor Farazdagi
2f11e55869
Use t.TempDir() in tests (#7769)
* use t.TempDir()

* remove redundant delete

* simplify setupDB()

* simplify db/testing/setup_db

* fix tests
2020-11-10 22:45:17 +00:00
Raul Jordan
7f7d18e910
Miscellaneous Keystore Fixes (#7756)
* remove v2 accounts rewrite

* warn users to ensure accounts are deleted

* radek feedback
2020-11-10 22:13:09 +01:00
Potuz
e22dd3758d
Attestation performance metrics (#7709)
* call LogValidatorGainsAndLosses at end of epoch

* Reviewer fixes

* Reviewer fixes

* Reviewer fixes

* Export Inclusion Distance to Prometheus

* changed default value to 1

* removed default value

* Added other performance metrics

* add slot

* get rid of inclusion_slot

* Fix fmt test

* Reviewer changes

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-10 20:13:36 +00:00
Nishant Das
8638e2c0b5
Fix Blst Build For OSX (#7760)
* blst build

* Update stub.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-10 18:14:09 +00:00
Jim McDonald
0fb465ba07
Honor the --max-msg-size option in the gRPC service. (#7762)
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-10 17:02:10 +00:00
Victor Farazdagi
09e3f0360e
Remove redundant calls to os.exit() in TestMain (#7761)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-10 14:56:47 +00:00
Shay Zluf
7b0ee3adfe
Use new attestation protection (#7605)
* Use new attestation protection

* tests fixes

* fix tests

* fix comment

* fix TestSetTargetData

* fix tests

* empty history handling

* fix another test

* mock domain request

* fix empty handling

* use far future epoch

* use far future epoch

* migrate data

* copy byte array to resolve sigbus error

* init validator protection on pre validation

* raul feedback

* rename fixes

* nishant feedback

* map with values

* fix tests

* lock and add test

* add and fix concurrency tests

* added tests error msg

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-10 14:14:11 +00:00
Nishant Das
f57bab78aa
Don't Terminate Log Processing Early (#7757)
* don't terminate log processing

* fix all test

* add a better test var
2020-11-10 13:21:36 +00:00
Preston Van Loon
ce75b2f684
Add more validation to AllValidatorsAreExited (#7755)
* Add more validation to AllValidatorsAreExited

* gofmt

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2020-11-10 11:07:35 +00:00
Nishant Das
742808c6cf
Fix Seen Cache Interval (#7751)
* fix

* var

Co-authored-by: Raul Jordan <raul@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-10 05:39:17 +00:00
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