Commit Graph

5311 Commits

Author SHA1 Message Date
Radosław Kapka
015102c2d5
Implement GetSyncStatus in the node API (#8241)
* Implement GetSyncStatus in the node API

* gazelle

* add HeadSlot function to fuzz tests' fakeChecker

* use HeadFetcher to get head slot

* remove useless code

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 17:17:20 +00:00
Radosław Kapka
aa69e5edcc
Allow to create an empty imported wallet (#8251)
* reload keys into empty wallet

# Conflicts:
#	validator/accounts/accounts.go

* removed warning on wallet creation

* export AccountsKeystoreRepresentation type

* rename error message variable

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 16:52:01 +00:00
Radosław Kapka
5dda2ca328
Replace HTTP code with gRPC code in GetHealth API endpoint (#8249)
* Replace HTTP code with gRPC code in GetHealth API endpoint

* gazelle

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 16:20:20 +00:00
Raul Jordan
470d5aa491
Cleanup Attester DB Protection Files and Add Back Save Lowest Epochs Functionality (#8232)
* cleanup for att protection

* rename to deprecated

* rem old item

* imports
2021-01-12 09:32:13 -06:00
Raul Jordan
d2bd954a6c
Remove Snappy from Validator Slashing Protection DB (#8248)
* no snappy

* Update validator/db/kv/migration_optimal_attester_protection.go

* fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 01:10:11 +00:00
Ivan Martinez
e5556db49d
Add DepositMessage in preparation to remove go-ssz (#8244)
* Add DepositSigningData

* gaz

* Add to ssz tests

* Rename to DepositMessage

* Remove deprecated comment

* Remove return

* Fixes from review

* Fixes

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 00:45:11 +00:00
Raul Jordan
d97596348e
Add Back New Attester Protection DB Logic (#8242)
* Revert "Revert New Attester Protection DB Logic (#8237)"

This reverts commit 6738fa3493.

* Batch Attestation Records and Flush All at Once in Validator DB (#8243)

* begin flushing logic

* finalize logic before starting tests

* make code DRY

* better log fields

* gaz

* tweak parameter

* rename

* clarifying comment on error handling in event feed

* comprehensive tests

* more comments

* explain parameters in comments

* renamed consts

* Apply suggestions from code review

* gaz

* simplify

* typo

* comments
2021-01-11 23:59:17 +00:00
terence tsao
323eac6d6c
Remove timeout debug log (#8247)
* Disallow request epoch to be out of bound

* Remove debug log

* Revert "Disallow request epoch to be out of bound"

This reverts commit d2dc7db594a8565ee6a613d1ee8cd0bcf84c72ff.
2021-01-11 22:23:13 +00:00
Radosław Kapka
5fd03f8fb0
Unify the pattern of using a package-level logger (#8245)
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-01-11 20:03:28 +00:00
terence tsao
18bb86754a
Hydrate signed block helper (#8246)
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-01-11 19:27:30 +00:00
Preston Van Loon
97320a0a8e
Remove snappy compression migration for attestation history (#8238)
* Remove snappy compression migration for attestation history

* gofmt

* remove more snappy stuff

* revert validator/db/kv/historical_attestations.go
2021-01-11 09:28:34 -08:00
terence tsao
9a1866b735
Hydrate header test helper (#8234)
* Hydrate headers and fix tests

* Gazelle

* Fix a slashing test

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-01-09 16:45:45 +00:00
Raul Jordan
6738fa3493
Revert New Attester Protection DB Logic (#8237)
* Revert "Optimize Migration for new Attester Protection DB (#8231)"

This reverts commit c4ab67832f.

* Revert "Integrate New Slashing Protection DB Methods at Runtime (#8219)"

This reverts commit 3858068201.

* Revert "DB Migration for Optimal Local Slashing Protection (#8212)"

This reverts commit dd3ac6c2ed.
2021-01-09 04:00:56 +00:00
terence tsao
35ed01e36c
Add timely attest flag to fix #8185 (#8235) 2021-01-08 17:54:46 -08:00
Raul Jordan
c4ab67832f
Optimize Migration for new Attester Protection DB (#8231)
* migrate using tx commit

* add improvement

* fixed up test

* rem fmt

* gaz

Co-authored-by: nisdas <nishdas93@gmail.com>
2021-01-08 17:31:54 +00:00
Nishant Das
0ff2a53b2f
Add Peer Logger (#8226)
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-01-08 11:08:11 +00:00
Preston Van Loon
25bba9f43f
Fuzzing: conditional BLS enabled via environment variable (#8229)
* Read whether or not to enable BLS via environment variable

* Read whether or not to enable BLS via environment variable
2021-01-08 05:31:24 +00:00
Raul Jordan
3858068201
Integrate New Slashing Protection DB Methods at Runtime (#8219)
* integrate at runtime and revamp tests

* historical att

* Update validator/db/iface/interface.go

* deepsource

* import

* log the slashing kind

* gaz

* create a slashutils

* integrate new slashutil

* imports
2021-01-07 23:30:25 +00:00
Raul Jordan
0d5e2cfb27
Prune Validator Attester Records Older than Weak Subjectivity Periods (#8221)
* pruning and begin test

* comprehensive pruning tests

* add pruning on startup

* also prune source epochs bucket

* more testing

* greatly simplify pruning function

* pruning logic and comprehensive tests in

* att protection test

* gaz

* fix sneaky change

* rev

* documented and tested helper func
2021-01-07 15:40:37 -06:00
terence tsao
bc650c82b4
Hydrate attestation for tests (#8228) 2021-01-07 21:00:21 +00:00
Nishant Das
a855f282c6
Fix to TLS v1.3 (#8222)
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-07 19:56:51 +00:00
Raul Jordan
4253888a36
Update Bitfield Dependency (#8227)
* bitfield updates

* tidy

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-07 18:12:49 +00:00
Nishant Das
fb9f4e828d
Update FastSSZ To Latest Commit (#8225)
* update fast-ssz

* fix

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-07 17:08:41 +00:00
terence tsao
9ff825a570
Update variable names that are same as imports (#8220)
* Fix names that are same as import name

* Review feedbacks
2021-01-07 10:42:03 -06:00
Victor Farazdagi
d20065218c
Max-cover: remove redundant dedup routine (#8224)
* Attestation aggregration: remove redundant dedup routine

* fix func call

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-07 14:18:29 +00:00
Radosław Kapka
353c1f6387
Multiple discovery addresses (#8203)
* multiple discovery addresses

* ipv6 fix

* make len test more robust

* create enr node for testing

* use local node for test

* use mockListener

* remove unused type alias
2021-01-07 13:35:42 +00:00
pinglamb
1b6a0703e3
Show number of user pubkeys for attesting and proposing in "Next duty" log output (#8187)
* Show attesting and proposing counts in "Next duty" log output

* Use map to store all the counts instead of magic reset

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-01-07 10:22:38 +00:00
pinglamb
9135774720
Block Fetching with Graceful Retry (#8182)
* Added tooMuchDataRequestedError func

* Added multiplicative decrease and additive increase

* Code review changes

* Renaming the new constants

* Return a different error in graceful retry

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-01-07 06:21:44 +00:00
Potuz
e52c3d48cf
Start from last valid root in loadStateBySlot (#8218)
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-01-06 18:41:44 -06:00
terence tsao
ba9b563e6e
Fix Attest early if valid block is received before 4 seconds (#8197)
* Better int -> string conversion

* First take

* More tests

* Gazelle

* Remove validator subpackage visiblity

* Remove span

* Update validator/client/attest.go

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

* Update validator/client/attest.go

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

* Update stream blocks call to use verified only

* Rename to waitOneThirdOrValidBlock

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-06 21:10:26 +00:00
Raul Jordan
dd3ac6c2ed
DB Migration for Optimal Local Slashing Protection (#8212)
* begin migration logic

* wrote migration logic

* begin test file

* test for migration working

* gaz

* progressutil

* migration works even if partial data was written
2021-01-06 20:41:31 +00:00
Radosław Kapka
9b3e1eb643
Implement GetHealth in the node API (#8217)
* Implement GetHealth in the node API

* repair fuzz mock

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-06 20:11:20 +00:00
Victor Farazdagi
da59fdd22b
Attestation Aggregation: optimize attestation list validation (#8213)
* optimize candidate validation on att aggregation

* restore test

* fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-06 19:26:19 +00:00
Shay Zluf
f014374de2
Move attestation protection call after signing (#8216)
* Move validator protection after signing

* fix tests

* remove unused code
2021-01-06 11:41:00 -06:00
Radosław Kapka
392e61fbee
Revert changes to sync service status check (#8215) 2021-01-06 11:19:53 +00:00
Radosław Kapka
7135a8542f
Check if initial sync service has been initialized (#8214) 2021-01-06 10:45:22 +00:00
Raul Jordan
c354871762
Optimal Local Slashing Protection DB Schema (#8211)
* add new approach for slashing protection

* benches

* tests passing

* gaz

* all tests passing

* comment
2021-01-06 03:04:46 +00:00
Radosław Kapka
bc2cd29d4b
Implement GetVersion in the node API (#8207)
* initial implementation

* implement GetVersion

* remove implementation of GetIdentity

* remove MetadataProvider from server

* gzl
2021-01-05 21:06:51 +00:00
terence tsao
023e258f6a
Stream verified block (#8206) 2021-01-05 12:40:11 -08:00
Victor Farazdagi
9d737d60f4
Declare err in loop to limit its scope (#8200)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-05 13:55:23 +00:00
Victor Farazdagi
1abe92fd8b
Remove redundant parentheses around nil values (#8199)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-05 13:29:46 +00:00
Victor Farazdagi
e5c69bd387
Add space at the start of comments (#8202)
* add space at the start of comments

* undo case change
2021-01-05 13:09:41 +00:00
Victor Farazdagi
318f83957a
Fix data races in tests accessing beacon config concurrently (#8190)
* add mutex to params/config

* split config files into test/prod

* add tags checker

* add regression test

* remove debug info

* update bazel config

* go fmt

* make sure that conditional file is kept by gazelle

* update build tag: test -> develop

* gazelle

* remove redundant import

* fix data race in TestService_ReceiveBlock
2021-01-05 04:51:25 +00:00
Raul Jordan
f67f8dd6df
Configurable Interval for Debouncing Keystore Reloading in Validator Client (#8149)
* configurable keystores debounce interval

* use a time duration flag instead

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-05 00:52:12 +00:00
Jeff Widmer
0e5da504f4
Fix for prysm.bat issue 'Validator' is not recognized as an internal or external command (#8097)
Fix for the issue where if either the beacon, validator, or slasher are already up to date, then the message:
"'Validator/Beacon/Slasher' is not recognized as an internal or external command, operable program or batch file."
The issue was that the message  "Validator/Beacon/Slasher is up to date." is not echoed to the console but it is trying to be run as a command.

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-01-04 23:27:38 +00:00
Cipio
f6af79f415
Fix file permission checks for Windows (#8164)
* Does bitwise compare for MKDIR

* Implemented a more global solution to windows permission issues

* Remove unneeded line I added earlier.

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-01-04 22:48:42 +00:00
Radosław Kapka
af2c36ec40
Add names to certain return values in accounts (#8159)
* add names to certain return values

* remove redundant

* rename selected public keys

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 21:44:15 +00:00
terence tsao
5dc8eb45d3
Add slot in epoch field for `Attestation schedule..." log (#8166)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 21:10:32 +00:00
Victor Farazdagi
b54743edbf
Add mutex to params/config (#8160)
* add mutex to params/config

* split config files into test/prod

* add tags checker

* add regression test

* remove debug info

* update bazel config

* go fmt

* make sure that conditional file is kept by gazelle

* update build tag: test -> develop

* gazelle

* remove redundant import

* update deps.md (per Nishant's suggestion)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 20:48:39 +00:00
Victor Farazdagi
04b2e0776d
Fix import shadowing of state package (#8191)
* update shadowed var name

* update var names

* remove unnecessary delta

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 20:07:12 +00:00