* add state bucket content display test case
* save work
* state db disection methods
* fix go.mod
* gazel fix
* pass the testcase if the db is not present. for CI
* get db path from env. optimize code
* update deps.bzl
* go mod tidy
* revery deps.bzl
* moved bucket content inspection to exploredb tool
* satisfy deepsource and tidy go.mod
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* checkpoint changes
* Update beacon-chain/rpc/validator/status.go
Co-authored-by: Potuz <potuz@potuz.net>
* Update beacon-chain/rpc/validator/status.go
Co-authored-by: Potuz <potuz@potuz.net>
* add in client side tests
* add ordering
* add all new test cases
* gate feature
* handle edge case
* add one more test case
* fatal error
* zahoor's review
* Update validator/client/validator.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/client/validator.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* doppelganger not doppleganger
* preston's review
* add in comment
* change comment
* Fix e2e to only run new flags on the current version
* Fix bug where zero byte public keys were always sent in the request when attestation history existed. Still some tests to fix due to another bug in attester protection AttestationHistoryForPubKey.
* go mod tidy, gazelle
* Increase test size
* fix timeout, change size back to small
Co-authored-by: Potuz <potuz@potuz.net>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* exploredb tool
* bucket stats tool
* bucket stats tool
* satisfy deepsource
* format error
* add flag to get the db file
* revert go get og humanize
* gazel fix
* fix merge errors
* remove bucket-stats
* satisfy deepsource
Co-authored-by: Raul Jordan <raul@prysmaticlabs.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>
* Replace github.com/dgrijalva/jwt-go with github.com/form3tech-oss/jwt-go, including security fix
* Fix to include go cast in deps.bzl and go mod
* Add gocast stub for go.mod / deps.bzl trick
* revert some changes
* Remove ignore tag
* gaz
* go mod tidy
* add build exclusion
* Go mod?
* go mod tidy
* regenerate ssz types w/ variable-len bounds checks
using the code in this PR:
https://github.com/ferranbt/fastssz/pull/45
* updating with improved bounds checking
* updating pinned fastssz dependency to newest
* removing redundant higher bounds checks
* regenerate again w/ new fastssz
* Remove gogoproto compiler
* Remove more gogoproto
* Improvements
* Fix gengo
* More scripts
* Gazelle, fix deps
* Fix version and errors
* Fix gocast for arrays
* Fix ethapis
* Fixes
* Fix compile errors
* fix go.mod
* //proto/... builds
* Update for protov2
* temp fix compilation to move on
* Change everything to emptypb.empty
* Add grpc to proto/slashings
* Fix almost all build failures
* Oher build problems
* FIX THIS FUCKING THING
* gaz literally every .bazel
* Final touches
* Final final touches
* Fix proto
* Begin moving proto.Marshal to native
* Fix site_data
* Fixes
* Fix duplicate gateway
* Fix gateway target
* Fix ethapis
* Fixes from review
* Update
* Fix
* Fix status test
* Fix fuzz
* Add isprotoslice to fun
* Change DeepEqual to DeepSSZEqual for proto arrays
* Fix build
* Fix gaz
* Update go
* Fixes
* Fixes
* Add case for nil validators after copy
* Fix cast
* Fix test
* Fix imports
* Go mod
* Only use extension where needed
* Fixes
* Split gateway from gengo
* gaz
* go mod
* Add back hydrated state
* fix hydrate
* Fix proto.clone
* Fies
* Revert "Split gateway from gengo"
This reverts commit 7298bb2054d446e427d9af97e13b8fabe8695085.
* Revert "gaz"
This reverts commit ca952565701a88727e22302d6c8d60ac48d97255.
* Merge all gateway into one target
* go mod
* Gaz
* Add generate v1_gateway files
* run pb again
* goimports
* gaz
* Fix comments
* Fix protos
* Fix PR
* Fix protos
* Update grpc-gateway and ethapis
* Update ethapis and gen-go-cast
* Go tidy
* Reorder
* Fix ethapis
* fix spec tests
* Fix script
* Remove unused import
* Fix fuzz
* Fix gomod
* Update version
* Error if the cloned result is nil
* Handle optional slots
* ADd more empty checks to clone
* Undo fuzz changes
* Fix build.bazel
* Gaz
* Redo fuzz changes
* Undo some eth1data changes
* Update go.mod
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Undo clone beacon state
* Remove gogo proto more and unused v1_gateway
* Add manual fix for nil vals
* Fix gaz
* tidy
* Tidy again
* Add detailed error
* Revert "Add detailed error"
This reverts commit 59bc053dcd59569a54c95b07739d5a379665ec5d.
* Undo varint changes
* Fix nil validators in deposit test
* Commit
* Undo
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* added Czech from go-bip39
* go mod tidy
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@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
* Update rules_go and fix proto conflicts
* gaz
* Update generated code
* more emptypb fixes
* gaz
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* update ethereumapis deps
* V1AttToV1Alpha1 migration
* Implementation plus happy path test
* fix root variable names
* Invalid attestation test
* gzl
* mod tidy
* use a single append to concatenate two slices
* remove outdated comment from attestation processing
* invoke ProcessAttestationNoVerifySignature when validating attestations
* implement missing PoolMock members
* use new VerifyAttestationNoVerifySignature function
* Update to go 1.16
* Also update go.mod
* rm go.sum then run go mod tidy
* go mod tidy with go 1.16
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Use ValidtorIndex across Prysm. Build ok
* First take at fixing tests
* Clean up e2e, fuzz... etc
* Fix new lines
* Update beacon-chain/cache/proposer_indices_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/rewards_penalties.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/shuffle.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/graffiti/parse_graffiti_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Raul's feedback
* Fix downcast int -> uint64
* Victor's feedback
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Use types.CommitteeIndex
* Go fmt
* Update validator pkg
* Fix e2e
* Happy fuzz tests
* Sync with upstream ethereumapi
* Go mod tidy
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>