* New byteutils for state gen
* Added empty slice and nil checks
* Merge branch 'master' into bit-utils
* SetBit to extend bit
* Merge branch 'bit-utils' of github.com:prysmaticlabs/prysm into bit-utils
* Comment
* Add HighestBitIndexBelow
* Test for HighestBitIndexBelow
* another test and better test fail output
* Feedback
* Merge branch 'bit-utils' of github.com:prysmaticlabs/prysm into bit-utils
* Feedback
* Preston's feedback, thanks!
* Use var
* Use var
* Merge refs/heads/master into bit-utils
* 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
* 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>
* Move to keymanager/keymanageropts command line parameters
* Add help for individual keymanagers
* gazelle
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* 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>
* 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
* Added the panic capture so that information about it gets into the log file
* Printf -> Errorf
* Update validator/main.go "run time" -> "Runtime"
Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/main.go "run time" -> "Runtime"
Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>
* 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
* 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
* Added the 'enable-upnp' flag to the list of supported command line arguments.
If the user specifies this feature flag (adds --enable-upnp as an argument) - the Beacon-chain and Validator services, when started, will initialize libp2p with the UPNP options.
* Added the new arg to usage.go due to test failure
* Update shared/p2p/service.go
Changed the logging according to Preston's recommendation.
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Code review changes:
1. File formatting.
2. Command line arg more detailed description.
* added file log feature
* moved the logic to one central location (shared/logutil/logutil.go), removed new line chars from file logs
* removed a resdundant temp file refrences that went into beachon-chain/BUILD.bazel by mistake
* Update shared/cmd/flags.go
Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update shared/cmd/flags.go
Co-Authored-By: shayzluf <thezluf@gmail.com>
* manually added loguitl dep to the go image target
* Manaully added the logutil dep to the go image target
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: terence tsao <terence@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: terence tsao <terence@prysmaticlabs.com>
* syntax and styling changes required by code reviewers
* Update beacon-chain/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update beacon-chain/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* changed the return type of 'ConfigurePersistentLogging' from bool, error to error based on recommendation from code review
* ran goimports in beacon-chain/main.go after tests have failed
* Update beacon-chain/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update beacon-chain/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update beacon-chain/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update shared/logutil/logutil.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/main.go
Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
* Changes requested by code reviewer
* Added a mandatory comment (linter required) to the 'Fire' event
* Changed the beacon-chain and validator to support only same format stdout and file logging due to complications in the outputs when using different formats.
* Had to run gazelle --fix due to check failure
* 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
* 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
* 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
* 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
* clean up test
* adding test setup
* add chainstart check to sync querier
* goimports
* goimports
* backend cleanup
* adding getters
* lint
* moving to db
* gazelle
* adding more services setup
* adding more changes
* adding different test setups
* other merge issues
* imports
* fixing keys
* get intial sync able to be set up
* new changes and gazelle
* use simulated p2p
* everything finally works
* unexport fields
* revert changes from merge
* remove mock server
* add documentation
* gazelle
* add another node
* review comments
* fix tests
* 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
* Add version linking to binaries via --workspace_status_command=./scripts/workspace_status.sh
* dont export some things
* lint and better date
* even better date
* start sequence for node to connect to bootstrap nodes
* lint
* maybe warning is more appropiate?
* fix gazelle
* preston's feedback
* add go-ipfs-addr to workspace
* move flag to shared
* removed routed host