Commit Graph

111 Commits

Author SHA1 Message Date
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
Preston Van Loon
67cbf774f5 Add nogo to introduce built time linting (#2317)
* Add nogo and fix lint issues

* Run gazelle

* better gazelle

* ignore external struct tags
2019-04-21 22:14:34 +08:00
shayzluf
0732012459 Validator-multiple key (#2069)
* first version - broken

* working proto changes

* resolve review remarks

* fix goimport issues

* fix service issues

* first logic version-broken

* first running version - no new tests

* fix validator client test

* add wait group to goroutines

* remove unused var in function call

* fix review remarks and tests

* merge master changes and fix conflicts

* gazzele fix

* fix prestonvanloon requested changes

* merge and some of terenc3t remarks addressed

* _,pk bug fix in log

* fix account file name suffix and filter not active validator out

* merge with master and fix missing parameters

* run over all public keys in hasvalidators

* add test for error when no all the validators has index in the db and hasvalidators is called

* fix runner tests fail due to timing issues

* goimports

* smaller sleep time in proposer tests

* fix UpdateAssignments loging

* fix goimports

* added && false commented TestUpdateAssignments_DoesNothingWhenNotEpochStartAndAlreadyExistingAssignments

* hasvalidators without missing publickeys list

* fix some of prestone review remarks

* fixes for prestone comments

* review changes applied

* expect context call in TestWaitForActivation_ValidatorOriginallyExists

* changed hasvalidators to return true if one validator exists

* fix init problem to getkeys

* hasvalidators requiers all validators to be in db

* validator attest assignments update

* fix ap var name

* Change name to hasallvalidators

* fix tests

* update script, fix any vs all validator calls

* fix wait for activation

* filter validator

* reuse the reply block

* fix imports

* Remove dup

* better lookup of active validators

* better filter active vlaidators, still need to fix committee assignment tests

* lint

* use activated keys

* fix for postchainstart

* fix logging

* move state transitions

* hasanyvalidator and hasallvalidators

* fix tests with updatechainhead missing

* add tests

* fix TestCommitteeAssignment_OK

* fix test

* fix validator tests

* fix TestCommitteeAssignment_multipleKeys_OK and TestWaitForActivation_ValidatorOriginallyExists

* fix goimports

* removed unused param from assignment

* change string(pk) to hex.EncodeString(pk) fix change requests

* add inactive validator status to assignments

* fix logging mess due to multi validator setup

* set no assignment to debug level

* log assignments every epoch

* logging fixes

* fixed runtime by using the right assignments

* correct activation request

* fix the validator panic

* correct assignment

* fix test fail and waitforactivation

* performance log issue fix

* fix goimports

* add log message with truncated pk for attest

* add truncated pk to attest and propose logs

* Add comment to script, change 9 to 8

* Update assignment log

* Add comment, report number of assignments

* Use WithError, add validator as field, merge block proposal log

* Update validator_propose.go

* fix

* use entry.String()

* fix fmt
2019-04-18 12:23:38 -05:00
Preston Van Loon
f3a2fc64f1 take first validator key (#2116) 2019-03-30 15:13:01 -05:00
shayzluf
fe247f6cc5 keystore and account support for multi key (#2054)
* keystore and account support for multi key

* fix service issues

* fix Potential file inclusion

* fix Potential file inclusion try2

* Update shared/keystore/keystore.go

remove security detection for file read

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

* getkeys uses map to pt multiple copies of the same key

* use 12 char of public key to differentiate file names

* use map in test

* fix changes from 2069 into here

* add // #nosec G304
2019-03-29 17:26:41 -05:00
Preston Van Loon
34f0241f32
Fix wait for activation (#1913)
* fix but no test

* ensure a canonical state is sent
2019-03-06 15:13:09 -05:00
Preston Van Loon
a19cb1864e Tracing additions (#1747) 2019-02-27 19:55:47 -08: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
Raul Jordan
61026103c6
Validator Attester Rewrite (#1487)
* initial validator attesthead rewrite based on proposer rewrite

* proceed with fetching committees and tree hashing the canonical head at assigned attester slot

* complete filling the properties of attestation data and all associated root hashes

* add when to attest todo

* finish entire attester client logic

* tests with mocks checked in

* tests passing in client

* stubbed out server implementation

* fixed build due to old property

* regen mocks with new mockgen version

* fixed broken tests

* complete bazel build fix

* address some review comments

* deep proto test

* tests passing after checking for empty committee and crosslink root

* address nishant comments
2019-02-06 10:20:38 -06: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