* send proposer data to config
* wip implementation with file and url based config import
* improving logic on get validator index
* fix function
* optimizing function for map and address bug
* fixing log
* update cache if it doesn't exist
* updating flags
* initial unit test scaffold
* fixing validator to call rpc call, removed temporary dependency
* adding the API calls for the runner
* fixing broken build
* fixing deepsource
* fixing interface
* fixing fatal
* fixing more deepsource issues
* adding test placeholders
* updating proposer config to add validation
* changing how if statement throws error
* removing unneeded validation, validating in a different way
* wip improving tests
* more unit test work
* fixing unit test
* fixing unit tests and edge cases
* adding unit tests and adjusting how the config is created
* fixing bazel builds
* fixing proto generation
* fixing imports
* fixing unit tests
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* updating flags based on comments, fixing unit tests
* fixing bazel
* removing unneeded function
* fixing unit tests
* refactors and unit test fixes based on comments
* fixing bazel build
* refactor the cache out fo the fee recipient function
* adding usecase for multiple fee recipient
* refactor burn name
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* fixing bug with validator index based on code review
* edited flag descriptions to better communicate usage
* fixing manual reference to flag name
* fixing code review comments
* fixing linting
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing comments and renaming functions
* fixing linting
* Update cmd/validator/flags/flags.go
* Update cmd/validator/flags/flags.go
* Update cmd/validator/flags/flags.go
* improving comments
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* keymanager-api
* import updates to standards
* adding in more unit tests and code fixes to improve api experience
* deleting accidently generated files
* deleting accidently generated files
* adding in more test coverage
* fixing linter issue
* removing incorrect unit tests
* improving logic for accounts import
* linter fix
* addressing review comments
* fixing based on comments
* fixing nonzero root
* fixing protos
* regen protos
* adjusting protos again
* updating api specs
* fixing code and unit tests after specs changed
* fixing imports
* adding in required changes for api middleware also adding unit tests to catch changes for protos
* fixing deepsource issues
* fixing linting
* seeing if using pointers helps
* addressing comments
* updating bazel build
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* save work
* current progress
* fix it more
* save progress
* fixes so far
* add signature test
* fix up changes so far
* change to latest
* update lighthouse version
* fix build
* fix again
* do one
* clean up
* fix build
* fix it
* fix test
* change tag
* remove e2e
* Update config/params/testnet_e2e_config.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* update
* Update sha
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
* initial commit for cli integration of web3signer
* resolving conflicts and execution
* remove aggregation slot from proto
* rem aggregation slot
* define a sync message block root struct
* fix sync message name
* sync message block root struct
* amend where sync committee block root is used
* altered switch statement to return correct json request by type
* fixing fork data import, types, and unit tests
* reverting unwanted changes
* reverting more unwanted changes
* fixing deepsource issues
* fixing formatting
* more fixes for deepsource and code clean up
* only want to fetch once for fetch validating public keys
* adding more comments
* new unit tests for requests and fixing a mapper issue
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/accounts/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* adjusting comment
* adjusting comment
* fixing import organization
* including more unit tests
* adding new cli edit
* adding in checks for wallet initialize
* adding web3signer flags to main.go
* some how resolved files did not save correctly
* adding in check to make sure web flag only works with types imported and derived
* Update validator/client/sync_committee.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/aggregate.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/accounts/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/main.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* reverting changes that accidently got checked in
* reverting
* reverting
* continuing to revert unintenteded changes
* reverting
* removing more unneeded changes
* addressing review comment
* initial refactor
* adding in more clarifying comments
* fixing mock
* resolving desource issues
* addressing gosec scan for helper go file
* addressing gosec
* trying to fix bazel build
* removal of interface to fix build
* fixing maligned struct
* addressing deepsource
* fixing deepsource
* addressing efficiency of type checking
* fixing bazel test failure
* fixing go linter errors
* gaz
* web changes
* add w3signer
* new kind
* proper use
* align
* adding prysm validator flags to help flags list
* addressing root comment
* ci lint
* fixing standardapi tests
* fixing accounts_test after removal of keymanager from rpc server
* fixing more unit tests
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/service.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/service.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing missed err checks
* fixing mock tests
* fixing gofmt
* unskipping minimal e2e test and removing related TODOs
* Update testing/endtoend/components/validator.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update testing/endtoend/components/validator.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* adding some error wrapers to clarify failure point
* fixing bazel build with new error checks
* taking preston's advice to make test fail faster to understand what's going on with the test
* checking if genesis validators root is not zero hash
* adding check for genesis validators root giving zero hash
* fixing missing dependency
* adding check for wallet
* log all
* fixing errors for http responses
* switching marshal to pretty print
* adding pretty sign request test
* fixing base url setting
* adding in check for web3signer and temporary wallet instead of having to open the wallet
* refactoring web3signer to not require wallet
* bazel build fix
* fixing gazelle build
* adding content type of request
* fixing more bazel
* removing unused code
* removing unused comments
* adding skip test back in
* addressing a validation and error message
* fix parse
* body
* fixing logic for datadir
* improving error handling
* show resp
* fix
* sign resp as str
* point of pointer remove
* sign resp
* unmarshal sig resp
* read body as str
* adding more verbose logging
* removing unused result
* fixing unit test
* reconfiguring files to properly nest code and mocks
* fix build issue
* using context when using client function calls
* fixing based on suggestion
* addressing comments
* gaz
* removing defined max timeout
* reverting json print pretty
* Update validator/accounts/wallet_edit.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* removing unneeded code restrictions
* should not introduce new code that may impact existing key manager types
* adjusting comments
* adding in json validation
* running go mod tidy
* some logging
* more logs
* fixing typo
* remove logs
* testing without byte trim
* fixing order or properties
* gaz
* tidy
* reverting some logs
* removing the confusing comments
* Update validator/client/aggregate.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/aggregate.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing pr comments
* editing bytes test
* Run gazelle update-repos
* run gazelle
* improving unit test coverage
* fixing text
* fixing a potential escaped error
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Delete deploy contract tool. Move mock to its own package as testonly with some helper functions
* gofmt contracts/deposit/mock/mock.go
* move stategen mock.go to its on testonly pkg
* move password_reader_mock.go to mock testonly package
* move mock keymanager to its own testonly package
* move attestations mock
* move voluntaryexits mock
* Move slashings mock to mock pkg
* move the slasher mock
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Rename BeaconStateMerge to BeaconStateBellatrix
* Rename version.Merge to version.Bellatrix
* Rename ComputeFieldRootsWithHasherMerge to ComputeFieldRootsWithHasherBellatrix
* Rename test names to Bellatrix
* Rename comments and strings to Bellatrix
* Fix formatting in a few files
* Revert wrong renaming in test name
* Revert renaming to Bellatrix in mainnet_config.go
* Revert renaming of db key without migration
* Regenerate from proto changes
* Rename new use of already renamed symbols
* gofmt and goimports after regenerating protofiles
* revert weird imports
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
* Value assigned to a variable is never read before being overwritten
* The result of append is not used anywhere
* Suspicious assignment of range-loop vars detected
* Unused method receiver detected
* Revert "Auxiliary commit to revert individual files from 54edcb445484a2e5d79612e19af8e949b8861253"
This reverts commit bbd1e1beabf7b0c5cfc4f514dcc820062ad6c063.
* Method modifies receiver
* Fix test
* Duplicate imports detected
* Incorrectly formatted error string
* Types of function parameters can be combined
* One more "Unused method receiver detected"
* Unused parameter detected in function
* Add a service for the monitor
* Do not block service start
* gaz
* move channel subscription outide go routine
* add service start test
* fix panic on node tests
* Radek's first pass
* Radek's take 2
* uncap error messages
* revert reversal
* Terence take 1
* gaz
* Missing locks found by Terence
* Track via bool not empty interface
* Add tests for every function
* fix allocation of slice
* Minor cleanups
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* rename
* gaz
* gaz
* Gaz
* rename
* edit
* gaz
* gaz
* build
* fix
* build
* fix up
* fix
* gaz
* cli import export
* gaz
* flag
* rev
* comm
* package renames
* radek
* begin powchain service refactor
* begin refactor
* powchain passes
* options pkg
* gaz
* rev
* rev
* comments
* move to right place
* bazel powchain
* fix test
* log
* contract addr
* happy path and comments
* gaz
* new service
* internal prefix in proto services
* half-baked inmplementation
* rename v1 to eth
* use router and remove old flag
* uncomment cors
* update v2 methods in proto services
* move adding path prefix after param processing
* remove unneeded code
* remove flag
* fix e2e
* uncomment sync committee e2e
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* add maxprocs
* add prereqs
* add tos and version pkg
* add in all runtime packages
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Remove verbatim strings with flag names on startup
* gzl
* fix visibility
* gaz
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* HTTP proxy server for Eth2 APIs (#8904)
* Implement API HTTP proxy server
* cleanup + more comments
* gateway will no longer be dependent on beaconv1
* handle error during ErrorJson type assertion
* simplify handling of endpoint data
* fix mux v1 route
* use URL encoding for all requests
* comment fieldProcessor
* fix failing test
* change proxy port to not interfere with e2e
* gzl
* simplify conditional expression
* Move appending custom error header to grpcutils package
* add api-middleware-port flag
* fix documentation for processField
* modify e2e port
* change field processing error message
* better error message for field processing
* simplify base64ToHexProcessor
* fix json structs
* Run several new endpoints through API middleware (#8922)
* Implement API HTTP proxy server
* cleanup + more comments
* gateway will no longer be dependent on beaconv1
* handle error during ErrorJson type assertion
* simplify handling of endpoint data
* fix mux v1 route
* use URL encoding for all requests
* comment fieldProcessor
* fix failing test
* change proxy port to not interfere with e2e
* gzl
* simplify conditional expression
* Move appending custom error header to grpcutils package
* add api-middleware-port flag
* fix documentation for processField
* modify e2e port
* change field processing error message
* better error message for field processing
* simplify base64ToHexProcessor
* fix json structs
* /eth/v1/beacon/states/{state_id}/validators
* /eth/v1/beacon/states/{state_id}/validators/{validator_id}
* /eth/v1/beacon/states/{state_id}/validator_balances
* /eth/v1/beacon/states/{state_id}/committees
* allow skipping base64-encoding for query params
* /eth/v1/beacon/pool/attestations
* replace break with continue
* Remove unused functions (#8924)
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Process SSZ-serialized beacon state through API middleware (#8925)
* update field names
* Process SSZ-serialized beacon state through API middleware
* revert changes to go.mod and go.sum
* Revert "Merge branch '__develop' into feature/api-middleware"
This reverts commit 7c739a8fd71e2c1e3a14be85abd29a59b57ae9b5, reversing
changes made to 2d0f8e012ecb006888ed8e826b45625a3edc2eeb.
* update ethereumapis
* update validator field name
* update deps.bzl
* update json tags (#8942)
* Run `/node/syncing` through API Middleware (#8944)
* add IsSyncing field to grpc response
* run /node/syncing through the middleware
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Return HTTP status codes other than 200 and 500 from node and debug endpoints (#8937)
* error codes for node endpoints
* error codes for debug endpoints
* better comment about headers
* gzl
* review comments
* comment on return value
* update fakeChecker used for fuzz tests
* fix failing tests
* Allow to pass URL params literally, without encoding to base64 (#8938)
* Allow to pass URL params literally, without encoding to base64
* fix compile error
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Process SSZ-serialized beacon state through API middleware (#8925)
* update field names
* Process SSZ-serialized beacon state through API middleware
* revert changes to go.mod and go.sum
* Revert "Merge branch '__develop' into feature/api-middleware"
This reverts commit 7c739a8fd71e2c1e3a14be85abd29a59b57ae9b5, reversing
changes made to 2d0f8e012ecb006888ed8e826b45625a3edc2eeb.
* update ethereumapis
* update validator field name
* update deps.bzl
* update json tags (#8942)
* Run `/node/syncing` through API Middleware (#8944)
* add IsSyncing field to grpc response
* run /node/syncing through the middleware
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Return HTTP status codes other than 200 and 500 from node and debug endpoints (#8937)
* error codes for node endpoints
* error codes for debug endpoints
* better comment about headers
* gzl
* review comments
* comment on return value
* update fakeChecker used for fuzz tests
* fix failing tests
* Allow to pass URL params literally, without encoding to base64 (#8938)
* Allow to pass URL params literally, without encoding to base64
* fix compile error
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* unused import
* Return correct status codes from beacon endpoints (#8960)
* Various API Middleware fixes (#8963)
* Return correct status codes from `/states` endpoints
* better error messages in debug and node
* better error messages in state
* returning correct error codes from validator endpoints
* correct error codes for getting a block header
* gzl
* fix err variable name
* fix nil block comparison
* test fixes
* make status enum test better
* fix ineffectual assignment
* make PR unstuck
* return proper status codes
* return uppercase keys from /config/spec
* return lowercase validator status
* convert requested enum values to uppercase
* validator fixes
* Implement `/beacon/headers` endpoint (#8966)
* Refactor API Middleware into more manageable code (#8984)
* move endpoint registration out of shared package
* divide main function into smaller components
* return early on error
* implement hooks
* implement custom handlers and add documentation
* fix test compile error
* restrict package visibility
* remove redundant error checking
* rename file
* API Middleware unit tests (#8998)
* move endpoint registration out of shared package
* divide main function into smaller components
* return early on error
* implement hooks
* implement custom handlers and add documentation
* fix test compile error
* restrict package visibility
* remove redundant error checking
* rename file
* api_middleware_processing
* endpoints
* gzl
* remove gazelle:ignore
* merge
* Implement SSZ version of `/blocks/{block_id}` (#8970)
* Implement SSZ version of `/blocks/{block_id}`
* add dependencies back
* fix indentation in deps.bzl
* parameterize ssz functions
* get block ssz
* update ethereumapis dependency
* gzl
* Do not reuse `Endpoint` structs between API calls (#9007)
* code refactor
* implement endpoint factory
* fix test
* fmt
* include pbs
* gaz
* test naming fixes
* remove unused code
* radek comments
* revert endpoint test
* bring back bytes test case
* move `signedBeaconBlock` to `migration` package
* change `fmt.Errorf` to `errors.Wrap`
* capitalize SSZ
* capitalize URL
* more review feedback
* rename `handleGetBlockSSZ` to `handleGetBeaconBlockSSZ`
* rename `IndexOutOfRangeError` to `ValidatorIndexOutOfRangeError`
* simplify parameter names
* test header
* more corrections
* properly allocate array capacity
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* moved validator/rpc/gateway under shared, validator/rpc/web is not visiable to the new shared gateway
* decided to have one lib with two methods if needed, status and stop are the same, however New and Start are not
* moved beacon's gateway to shared and moved the main func to its own /server folder
* goftm
* gofmt
* removed the extra loggin
* reduce visibility
* tighter visibilty of the shared lib for beacon and validator only for now
* fix patterns , ctx needs to be first param
* fix comments
* gofmt
* added enum for the caller id
* added unit test for gateway
* deprecated .WithDialer to .WithContextDialer
* changed the string callerId to uint8, and rearranged the Gateway struct based on the compiler
* fix 1 based on comment
* iota type
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* new prometheus metrics for client-stats metrics
* adds client-stats types beacause they are
used by some of the prometheus collection code.
* new prometheus collector for db disk size
* new prometheus collector for web3 client
connection status
* adds client-stats api push cli in cmd/client-stats
* adds api metadata to client-stats collector posts
* appease deepsource
* mop up copypasta
* use prysm assert package for testing
* jwt access token impl
* use secret or jwt
* rename
* separate method for splitting auth
* usage update
* Update beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/node/node.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* make things work
* removed unused code
* better, more flexible authorization
* move types and function to proper packages
* fix checking if endpoint is not set
* fix existing tests
* rename Endpoint field to Url
* Tests for HttpEndpoint
* better bearer auth
* tests for endpoint utils
* fix endpoint registration
* fix test build
* move endpoint parsing to powchain
* Revert "fix existing tests"
This reverts commit ceab192e6a78c106cf4e16a1bdf5399752a39890.
* fix field name in tests
* gzl
* add httputils dependency
* remove httputils dependency
* fix compilation issue in blockchain service test
* correct endpoint fallback function and tests
* gzl
* remove pointer from currHttpEndpoint
* allow whitespace in auth string
* endpoint equality
* correct one auth data Equals test case
* remove pointer receiver
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update rules_go and fix proto conflicts
* gaz
* Update generated code
* First pass inclusion of using baked states
* more emptypb fixes
* remove testnet genesis files, only embed mainnet
* Refactoring for SaveGenesisData, fix tests that use mainnet config but do not support mainnet genesis values
* a bit more refactoring, load genesis from a file. Needs tests still
* Add method to ensure an embedded genesis file also has the appropriate genesis block
* gofmt
* more clear error
* Check genesis fork version to ensure testnet config matches genesis file
* viz
* test for SaveGenesisData
* More genesis db method tests
* Merge
* Minor tweaks, lint, fmt, etc
* Add more test to genesis db methods
* Revert beacon-chain/state/stateV0/BUILD.bazel
* Update beacon-chain/db/iface/errors.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* PR feedback
* Update beacon-chain/db/kv/genesis.go
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* fmt.Errorf works better for nil errors
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* validator cmd
* imports
* more imports
* e2e viz
* alias
* use native alias
* add actual
* fix macro
* work on fix e2e
* add viz
* gaz
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Remove most of the remaining geth code and set up bazel for this
* chmod +x
* Add flake check
* better flake detection
Former-commit-id: 5c332ecbf2923943f646f1fe40befa95be883329 [formerly 99590fc354514584700e5ce8d7d30a8a7d541f29]
Former-commit-id: e5f919b553fe698e98090965d34eb721990b5693
Sharding:
* Sharding: add actor flag to sharding group for app help
* Sharding: ensure rpcClient is not nil before calling Close()
* Sharding: revert shardingcmd.go comments
* Sharding: more address Str() fixes
Former-commit-id: 0b3d8b73ac1b20eb5c018a71be1d935a1fb860ef [formerly 6cd1df472713e95f6b9f8a0a7b6bbd88a5dd2ca2]
Former-commit-id: 90c7e1a70d46c1f889576a7f2f253a02414c3654
Events with just 1 argument fail before this change
Former-commit-id: 69cbb51c56054208417e464dc6e46a94ccb3bbeb [formerly fbb03244929beb0ce8f9c607ce33d107e8319b89]
Former-commit-id: 984154c1ba79f1fe8bf0106a604b2765ea312079