Commit Graph

14 Commits

Author SHA1 Message Date
Preston Van Loon
855f5d2986
Add a configurable flag for gRPC retries (#4926)
* Add a configurable flag for gRPC retries
* Merge refs/heads/master into configurable-retry
* Merge refs/heads/master into configurable-retry
* Merge refs/heads/master into configurable-retry
* Merge refs/heads/master into configurable-retry
* Merge refs/heads/master into configurable-retry
* add in flag to usage
2020-02-24 18:00:22 +00:00
garyschulte
24a5a9c112
add prometheus metrics for validator accounts (#4724)
* add prometheus metrics for validator accounts:
  * gauge for balances
  * counters for attestations and failures
  * counters for aggregations and failures
  * counters for proposals and failures

put validator account metrics behind flag

* run gazelle to reorganize deps

* fix typo

Co-authored-by: garyschulteog <30323939+garyschulteog@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-02-05 11:49:27 -06:00
Jim McDonald
a78defcd26 Move to keymanager/keymanageropts command line parameters (#4590)
* Move to keymanager/keymanageropts command line parameters

* Add help for individual keymanagers

* gazelle

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-01-24 11:21:31 -06:00
Prince Sinha
888e8925ee cli: Added flag for GRPC max msg size (#4524)
* added grpc max msg size flag
* Merge branch 'master' into grpc-cli-flag
* Merge branch 'master' into grpc-cli-flag
* Merge branch 'master' into grpc-cli-flag
* Merge branch 'master' into grpc-cli-flag
2020-01-13 17:29:43 +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
metanull-operator
1222ebb6db Graffiti flag (#4213)
* Implementation of graffiti flag without tests.
* Updated to pass graffiti as string instead of []byte all the way to the ProposeBlock RPC call. This ensures that the ToBytes32() call is handled in ProposeBlock as opposed to relying on the caller to ensure that the value passed is only 32 bytes. This adds work by doing that conversion on each proposed block for a static value of graffiti, but it also helps protect against an RPC call to ProposeBlock that has more than 32 bytes for graffiti.
* Added test case for validator.
* Added GraffitiFlag to validate usage test.
* Updated data structures and logic to convert graffiti flag from string to byte array earlier in the process. Now converting when setting up ValidatorService.
* Updated test case to correctly set up validator using byte array.
* Merge branch 'master' into graffitiFlag
2019-12-07 19:13:56 +00:00
terence tsao
798bbbdc82 Cold start for interop (#3437)
* coldstart flags for validator

* WIP beacon node flags

* wip beacon chain, flag fix in validator, arg fix in validator

* checkpoint

* Added interop service

* working on mock chainstart

* save the state lol

* fix tests

* Save genesis validators

* gaz

* fix validator help flags

* WaitForChainStart actually waits for genesis time

* cold start fixes

* cache

* change back

* allow for genesis state too

* remove logs

* increase mmap size

* dont process if head doesn't exist

* add 10ms tolerance

* enable libp2p debug at debug, fix pubsub

* works with checkpt

* initialize justified and finalized in db

* Removed preloadStatePath from blockchain service

* Clean up

* Write to disk for now post state

* revert b466dd536f8eadbdae2264a545a755370223d917

* Builds

* Only RPC test fails now

* use minimal config, no demo config

* clean up branch

* Lint

* resolve lint

* more lint fixes

* lint

* fix viz

* Fixing RPC test

* skip before epoch 2

* RPC time out

* Fixed ordering

* rename

* remove some dbg statements

* ensure index is correct

* fix some panics

* getting closer

* fix tests

* Fix private key

* Fixed RPC test

* Fixed beacon chain build for docker

* Add interop.go to validator go_image

* Fixed docker build

* handle errors

* skip test, skip disconnecting peers

* Fixed docker build

* tolerance for attestation processing

* revert copy

* clearer err message parse

* fix launching from dep contract
2019-09-11 13:38:35 -05: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
skillful-alex
4bb5160817 added forgotten CertFlag flag processing (#2988) 2019-07-21 17:12:31 -04:00
Preston Van Loon
9f7f7d6cff
Tracing improvements (#2570)
* some improvements

* fix

* gazelle

* disable lostcancel
2019-05-11 17:43:55 -04:00
frederickalcantara
6ddb5fa81a Added flag to disable rewards/penatlty logging (#2319)
* Added flag to disable rewards/penatlty logging

* Added flag disable log info validator function

* Added flag to disable rewards/penatlty logging

* Changed value to not have it log when it is on and have it logged when it's off

* Added flag to disable rewards/penatlty logging

* Built for cli & types

* fixing flag issue

* Added ctxCli to the validator struct

* Accepted change

* Fixing conditionals and merge conflicts

* Added bracket

* fixed the return statement to its proper place

* Added validator conditional for logging penalties & rewards

* Added conditional for logging penality/reward info

* Making conditional command line log refactorable

* also part of the last commit

* Changed value variable to lowercase

* Fixed if conditional for penalty reward validation

* Synced with master

* Fixed bazel build

* Syncing with master

* Sync with master

* Added true values to logValidator Balances

* Changed values from true to false

* FIX WIP

* Added variables to the validators

* Added negation for logValidatorBalances variable

The name of the flag is DisablePenaltyRewardLogFlag. Since the name of the var is logValidatorBalances. We are assuming that the variable will have a positive. It makes more sense to negate the disable flag as a value rather than keep it positive.

Co-Authored-By: frederickalcantara <frederickaalcantara@gmail.com>

* fixed password

* Remove prevBalance line
2019-04-27 11:56:11 +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
Raul Jordan
7a83acf46d
Improve Validator Logging and Default Flags (#2013)
* improve validator logging significantly

* warn validator not yet assigned to epoch

* build added

* report validator logs

* validator performance logging

* all logging improvements

* validator attest better logs

* improved attester logging

* average balances

* dont hash useless hashes

* Update validator/client/validator_propose.go

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

* address some comments

* standardize with block root hash32, renamings

* gazelle

* builds

* improve average eth balance

* eth net gains/losses

* fix tests

* spacing

* goimports

* avg balance

* update pbs

* addressed preston comments

* imports

* gazelle
2019-03-18 09:45:28 -06:00
James Towle
cfbbc9c61a Implemented the flag grouping logic (#1756)
* Implemented the flag grouping logic

* Added a usage file to the validator binary and fixed style issues

* Ran gazelle fix to fix the CI tests that failed
2019-03-01 14:48:05 -05:00