Commit Graph

27 Commits

Author SHA1 Message Date
Preston Van Loon
2ab4b86f9b
Allow setting flags via yaml config file. (#4878) 2020-03-19 14:46:44 -07:00
Nishant Das
300d072456
Add Config Change for Validator (#5038)
* add config for validator
* gaz
* Merge refs/heads/master into configureValidator
* Merge refs/heads/master into configureValidator
2020-03-08 06:45:36 +00:00
Ivan Martinez
4ab0a91e51
Validator Slashing Protection DB (#4389)
* Begin adding DB to validator client

Begin adding ValidatorProposalHistory

Implement most of proposal history

Finish tests

Fix marking a proposal for the first time

Change proposalhistory to not using bit shifting

Add pb.go

Change after proto/slashing added

Finally fix protos

Fix most tests

Fix all tests for double proposal protection

Start initialiing DB in validator client

Add db to validator struct

Add DB to ProposeBlock

Fix test errors and begin mocking

Fix test formatting and pass test for validator protection!

Fix merge issues

Fix renames

Fix tests

* Fix tests

* Fix first startup on DB

* Fix nil check tests

* Fix E2E

* Fix e2e flag

* Fix comments

* Fix for comments

* Move proposal hepers to validator/client to keep DB clean

* Add clear-db flag to validator client

* Fix formatting

* Clear out unintended changes

* Fix build issues

* Fix build issues

* Gazelle

* Fix mock test

* Remove proposal history

* Add terminal confirmation to DB clearing

* Add interface for validatorDB, add context to DB functions

* Add force-clear-db flag

* Cleanup

* Update validator/node/node.go

Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>

* Change db to clear file, not whole folder

* Fix db test

* Fix teardown test

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-01-08 13:16:17 -05:00
Jim McDonald
5ff9ae2108 Validator keymanager refactor (#4340)
* Move to keymanager
* Move to keymanager
* Merge branch 'keymanager' of github.com:mcdee/prysm into keymanager
* Lint
* Fix visibility
* Bazel fix
* Merge remote-tracking branch 'upstream/master' into keymanager
* logrus->log
* Merge branch 'master' into keymanager
* Merge remote-tracking branch 'upstream/master' into keymanager
* Merge branch 'master' into keymanager
* Merge branch 'master' into keymanager
* Merge branch 'master' into keymanager
* Merge branch 'master' into keymanager
* Fix test after merge
* Merge branch 'master' into keymanager
* And again
2020-01-04 03:51:53 +00:00
Nishant Das
9b008522b8 Refactor Validator Start Routine (#3594)
* make demo default

* make minimal config a flag

* lint

* initialize config at the start

* gaz

* make main method cleaner

* remove interop.go

* fix test

* lint

* gaz

* Update validator/accounts/interop.go

Co-Authored-By: terence tsao <terence@prysmaticlabs.com>

* fix docker build

* fix docker build
2019-09-26 13:23:25 -05:00
Raul Jordan
7beafa159d
Support Starting Validator Binary from Unencrypted Keys JSON (#3308)
* next compatible, tests pass

* terence feedback

* skip comment

* fixes

* misc fix

* on block

* parse from unencrypted keys json

* mod val client

* launching unencrypted workssss

* fix broken build

* fix up build

* rem prints

* resolve lint

* bls comment

* fix docker deps

* gaz
2019-08-26 16:07:09 -05:00
Preston Van Loon
953c59a302 Wrap errors (#3123) 2019-08-01 19:27:38 -07:00
Raul Jordan
5374350a1c
Standardize Flags at Top Level and Remove Deprecated Utils (#3046)
* move shuffling to core

* remove old utils

* move flags to top level

* package lvl comment removal

* fix up references to flags

* revert node.go

* revert p2p_config.go

* revert main.go

* revert validator node.go

* revert validator main.go

* add flags pkg

* viz

* goimports
2019-07-23 08:58:20 -05:00
Preston Van Loon
dfc64121c6
Remove unused feature flags (#3002)
* remove a few feature flags that are no longer needed

* remove other unused flags

* forgot a few more
2019-07-19 21:27:35 -04:00
Preston Van Loon
f12fdfda0f Complain about improperly sized tests (#2873) 2019-06-30 09:00:22 -07:00
shayzluf
6c1740eefc Add Caching to Tree Hashing Algorithm (#1929)
* added todo to hash file in ssz

* params and copy of block cache

* start hash cache

* Hash cache implementation

* fixed some comments

* fixed promatheus duplicate counter name

* removed TODO

* change to use special expiration cache

* function name fixes junk object generator

* naming changes

* gazzle fix

* added pruning last read data test

* fixed gometallinter errors

* fix benchmarks and no int64 not serializable

* move struct from test

* add feature flag

* fix merge issues

* add featureflag to beacon and validator

* featureflag init for tests

* added feature flag to all ssz dependent tests

* remove setter func

* replace k8s tweaked expiration cache to https://github.com/karlseguin/ccache

* remove else

* change request by preston

* added init featureflags to genesis_test

* Update shared/ssz/hash_cache.go

add dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/ssz/hash_cache.go

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/ssz/hash_cache.go

remove extra space

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/params/config.go

add dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/featureconfig/config.go

remove dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* Update shared/featureconfig/config.go

remove dot

Co-Authored-By: shayzluf <thezluf@gmail.com>

* remove powchain from prometheus hash cache name

* fixes fron change requests

* fix change requests

* remove faulty merge test

* gazelle fix

* fix fmt.sprintf

* remove debug binary

* fix gazelle
2019-04-24 13:39:02 +08:00
Ivan Martinez
ca90acca77 Create feature config for selective testing (#1997)
* Create a feature flagging system

* Refactor how featureflags works and improve docs

* Gazelle and final touches

* Refactor, new flags in the package

* Remove old flags since they have been moved

* Fix bazel

* Update to comments

* Full coverage

* Fix formatting

* Align code with numbers

* Run bazel and fix docs

* Fix test for flag
2019-03-20 22:57:25 -04:00
Preston Van Loon
a19cb1864e Tracing additions (#1747) 2019-02-27 19:55:47 -08:00
Raul Jordan
e19920aec1
Miscellaneous Runtime Fixes & Improvements - Raul (#1674)
* fatal if impossible to receive chainstart

* fix tests

* fix

* custom delay

* completed custom delay

* errors

* better logs, nothing at genesis

* use demo in val

* add gazelle

* log

* starting to log stuff

* pass in ops

* avoid printing the large #s for debug, still working on tests..

* all around better logging

* fixed build error in epoch process

* fixed state transiton tests

* fixed block tests

* lint

* verify sigs in randao

* ready for inclusion falg

* only print waiting when slot is not valid

* fix build

* mod config

* fixed last justified slot issue

* fix inclusion

* fixed attestation issue

* using zero hash from params instead

* fix tests

* update balance

* removed swp

* more `- genesis_slot` for logs

* rem unused log

* fix broken tests

* account for skip slots in state root computation

* fixes done

* validator guide bug fixes - 671

* epoch boundary at the last slot of the epoch

* fix epoch issue

* more balance cal logs for debugging

* greater balance

* attestaton fixes

* fixes

* addressed testrun

* fixed ejection balance

* fix tests with far future epoch

* revert sync change

* revert initial sync change

* fix changes

* off by one att fix

* revert the att fix

* address comments

* format

* fix build

* rem file
2019-02-24 20:09:45 -06:00
Raul Jordan
281e5d1cfd
Provide Real Keystore to Validator Service for Public/Private Key Access at Runtime (#1570)
* provide validator with real keystore public key

* fmt

* build errors buildkite

* readd imports removed by goimport

* gazelle

* address broken tests

* make reference to filename a param

* fmt

* imports

* gazelle

* os remove all

* Use better Temp storage for tests

* testmain approach to avoid repeating expensive operation for each test

* travis lint

* fix test

* nokeystore in status test

* passing

* fix goimports
2019-02-13 17:49:06 -06:00
Preston Van Loon
4b27b8408b
Fix travis (#1493)
* fix travis

* test 2

* goimports

* Remove unused p2p config

* remove unused var
2019-02-05 10:46:32 -05:00
Raul Jordan
ec9240106e
Implement WaitForChainStart RPC Server and Client (#1421) 2019-01-30 13:28:53 +01:00
Preston Van Loon
0becb6dc01 Simplified validator workflow - first pass (#1362)
* Add attestation p2p messages

* first pass refactor

* lint

* viz fix

* comment unused const for now

* Add opentracing spans

* PR feedback
2019-01-23 10:52:39 +08:00
Preston Van Loon
3398d2ee78 Install prometheus service in the validator node (#1305)
* install prometheus service in the validator node

* simplify
2019-01-12 23:01:11 -08:00
Preston Van Loon
b23ca60efd
Add simple version to binaries via golink (#1286)
* Add version linking to binaries via --workspace_status_command=./scripts/workspace_status.sh

* dont export some things

* lint and better date

* even better date
2019-01-09 23:19:33 -05:00
Preston Van Loon
10f45744d6
Use gogo protobuf as the protoc compiler (#1165)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* change visibility

* use gogoprotobu
2018-12-23 15:34:59 -05:00
Nishant Das
37bc1c67be
Adding Basic Private Key Management (#671)
* adding flags

* adding modified key utils

* adding more funcs

* more changes

* more changes

* documentation

* changes to node

* gazelle

* fixing bazel build

* gazelle

* adding tests

* more tests

* addressing terence's feedback

* adding geth header

* test

* changes

* fixedd it

* fixed marshalling

* adding more to tests

* gazelle

* adding more tests

* lint

* add cov

* cov

* fix imports
2018-11-08 11:22:31 +08:00
Nishant Das
f9a5d277e8
Add Ability for Validator Client to Provide Public Key (#567)
* Adding pubkey to validators

* Adding test

* Addressing Review
2018-09-26 11:27:52 +08:00
Divyank Katira
2a51ed3f39 P2P Message Execution Tracing (#517)
* Request execution tracing initial commit

* Resolve linter issues

* Run gazelle

* Make trace sampling configurable, clean up, update doc

* Document trace span creation

* Fix linter issue
2018-09-20 07:46:35 -04:00
Preston Van Loon
db1138ae1f
Fix p2p issues in #465 (#489) 2018-09-09 18:15:24 -04:00
Preston Van Loon
b02042dbe9 shared: Split P2P Topics And Introduce Middleware (Adapters) (#421) 2018-08-29 11:32:54 -05:00
terence tsao
7c8331e9d3
Renamed Client to Validator (#428) 2018-08-22 12:15:21 -07:00