* Add a copy of github.com/x-cray/logrus-prefixed-formatter with fixes for our static analysis
* gazelle and add failing test
* fix it
* fix link
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* replace eth2 types
* replace protos
* regen proto
* replace
* gaz
* deps
* amend
* regen proto
* mod
* gaz
* gaz
* ensure build
* ssz
* add dep
* no more eth2 types
* no more eth2
* remg
* all builds
* buidl
* tidy
* clean
* fmt
* val serv
* gaz
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* add changes
* fix CI
* wait here
* Fix gazelle with the correct directive for libp2p
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Add static analysis for unsafe uint casting
* Fix violations of uintcast
* go mod tidy
* Add exclusion to nogo for darwin build
* Add test for math.Int
* Move some things to const so they are assured not to exceed int64
* Self review
* lint
* fix tests
* fix test
* Add init check for non 64 bit OS
* Move new deps from WORKSPACE to deps.bzl
* fix bazel build for go analysis runs
* Update BUILD.bazel
Remove TODO
* add math.AddInt method
* Add new test casts
* Add case where builtin functions and declared functions are covered
* Fix new findings
* cleanup
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.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>
* Check in go-ethereum crypto/sepc256k1 package with proper build rules
* gaz
* Add karalabe/usb
* viz improvement
* Remove bazel-go-ethereum, use vendored libraries only
* move vendor stuff to third_party so that go mod wont be mad anymore
* fix geth e2e flags
* fix geth e2e flags
* remove old rules_foreign_cc toolchain
* Update cross compile docker image to support os x
* works for geth build
* remove copy of sepc256k1
* revert changes in tools/cross-toolchain
* gaz
* Update go-ethereum to 1.10.10
* Revert "revert changes in tools/cross-toolchain"
This reverts commit 2e8128f7c3a2d20a16e50b88ec7e5b69c70ddf2b.
* revert tags changes
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.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>
* 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>