Radosław Kapka
63c2b3563a
Optimize GetDuties VC action ( #13789 )
...
* wait groups
* errgroup
* tests
* bzl
* review
2024-03-22 09:50:19 +00:00
james-prysm
d6ae838bbf
replace receive slot with event stream ( #13563 )
...
* WIP
* event stream wip
* returning nil
* temp removing some tests
* wip health checks
* fixing conficts
* updating fields based on linting
* fixing more errors
* fixing mocks
* fixing more mocks
* fixing more linting
* removing white space for lint
* fixing log format
* gaz
* reverting changes on grpc
* fixing unit tests
* adding in tests for health tracker and event stream
* adding more tests for streaming slot
* gaz
* Update api/client/event/event_stream.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* review comments
* Update validator/client/runner.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/beacon_api_validator_client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* addressing radek comments
* Update validator/client/validator.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* addressing review feedback
* moving things to below next slot ticker
* fixing tests
* update naming
* adding TODO comment
* Update api/client/beacon/health.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* addressing comments
* fixing broken linting
* fixing more import issues
* fixing more import issues
* linting
* updating based on radek's comments
* addressing more comments
* fixing nogo error
* fixing duplicate import
* gaz
* adding radek's review suggestion
* Update proto/prysm/v1alpha1/node.proto
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* preston review comments
* Update api/client/event/event_stream.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* Update validator/client/validator.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* addressing some more preston review items
* fixing tests for linting
* fixing missed linting
* updating based on feedback to simplify
* adding interface check at the top
* reverting some comments
* cleaning up intatiations
* reworking the health tracker
* fixing linting
* fixing more linting to adhear to interface
* adding interface check at the the top of the file
* fixing unit tests
* attempting to fix dependency cycle
* addressing radek's comment
* Update validator/client/beacon-api/beacon_api_validator_client.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* adding more tests and feedback items
* fixing TODO comment
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2024-03-13 13:01:05 +00:00
Radosław Kapka
ee9274a9bc
REST VC metrics ( #13588 )
...
* REST VC metrics
* validator status is not used
* refactor
* remove test
* server-side
* server-side per endpoint
* cleanup
* add config endpoints
* add proper HTTP methods to endpoints
* initialize missing fields
2024-03-05 18:15:46 +00:00
Dhruv Bodani
e100fb0c08
Add support for sync committee selections ( #13633 )
...
* add support for sync committee selections
* go mod tidy
* remove unused fields
* fix build
* fix build
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-02-23 13:53:42 +00:00
Sammy Rosso
4ff91bebf8
Switch gomock library ( #13639 )
...
* Update gomock
* Update mockgen
* Gaz
* Go mod
* Cleanup
* Regenerate gomock
* Manually fix import
2024-02-21 18:37:17 +00:00
terence
5a66807989
Update to V5 ( #13622 )
...
* First take at updating everything to v5
* Patch gRPC gateway to use prysm v5
Fix patch
* Update go ssz
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2024-02-15 05:46:47 +00:00
Dhruv Bodani
55a29a4670
Implement beacon committee selections ( #13503 )
...
* implement beacon committee selections
* fix build
* fix lint
* fix lint
* Update beacon-chain/rpc/eth/shared/structs.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/beacon_committee_selections.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/beacon_committee_selections.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/beacon_committee_selections.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* move beacon committee selection structs to validator module
* fix bazel build files
* add support for POST and GET endpoints for get state validators query
* add a handler to return error from beacon node
* move beacon committee selection to validator top-level module
* fix bazel
* re-arrange fields to fix lint
* fix TestServer_InitializeRoutes
* fix build and lint
* fix build and lint
* fix TestSubmitAggregateAndProof_Distributed
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-02-05 15:43:51 +00:00
Radosław Kapka
e3ce1bde45
Move API structs to api module ( #13577 )
2024-02-03 11:57:01 +00:00
Radosław Kapka
204de13c86
REST VC: Subscribe to Beacon API events ( #13453 )
...
* Revert "Revert "REST VC: Subscribe to Beacon API events (#13354 )" (#13428 )"
This reverts commit 8d092a1113 .
* change logic
* review
* test fix
* fix critical error
* merge flag check
* change error msg
* return on errors
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2024-01-18 14:27:41 +00:00
Radosław Kapka
8d092a1113
Revert "REST VC: Subscribe to Beacon API events ( #13354 )" ( #13428 )
...
This reverts commit e68b2821c1 .
2024-01-06 21:36:42 +00:00
Radosław Kapka
e68b2821c1
REST VC: Subscribe to Beacon API events ( #13354 )
...
* Initial code for head event streaming
* handle events and error
* keepalive event
* tests
* generate new mock
* remove single case select
* cleanup
* explain eventByteLimit
* use 2 channels in test
* review
* more review
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2024-01-04 17:14:45 +00:00
Radosław Kapka
d0bf03e863
Simplify error handling for JsonRestHandler ( #13369 )
...
* Simplify error handling for `JsonRestHandler`
* POST
* reduce complexity
* review feedback
* uncomment route
* fix rest of tests
2023-12-22 22:39:20 +00:00
Radosław Kapka
4c47756aed
HTTP endpoints cleanup ( #13251 )
...
* remove validation package
* structs cleanup
* merge with apimiddleware removal
* more validation and Bls capitalization
* builder test fix
* use strconv for uint->str conversions
* use DecodeHexWithLength
* use exact param names
* rename http package to httputil
* change conversions to fmt.Sprintf
* handle query paramsd and route variables
* spans and receiver name
* split structs, move bytes helper
* missing ok check
* fix reference to indexed failure
* errors fixup
* add godoc to helper
* fix BLS casing and chainhead ref
* review
* fix import in tests
* gzl
2023-12-08 20:37:20 +00:00
Radosław Kapka
a0ca4a67b0
Remove API Middleware ( #13243 )
...
* remove api/gateway/apimiddleware
* fix errors in api/gateway
* remove beacon-chain/rpc/apimiddleware
* fix errors in api/client/beacon
* fix errors in validator/client/beacon-api
* fix errors in beacon-chain/node
* fix errors in validator/node
* fix errors in cmd/prysmctl/validator
* fix errors in testing/endtoend
* fix all other code
* remove comment
* fix tests
---------
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-12-04 11:55:21 +00:00
Radosław Kapka
a7edec9b98
Better error handling in REST VC ( #13203 )
2023-11-21 17:42:55 +01:00
Radosław Kapka
a536612c39
HTTP Beacon APIs for node ( #13010 )
2023-10-11 22:18:49 +02:00
Dhruv Bodani
2806326155
integrate validator count endpoint in validator client ( #12912 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-10-11 15:23:02 +02:00
Preston Van Loon
8eb82dd378
Update rules_go and gazelle to 0.42 & 0.33 (latest releases) ( #13021 )
...
* Provide @go_googleapis, update gazelle
* fix pb build failures
Fix build issues with grpc-gateway
2023-10-10 12:50:29 +08:00
Radosław Kapka
f37301c0c0
Remove remote slashing protection feature ( #12989 )
...
* Remove remote slashing protection feature
* test fix
* remove mock from tests
---------
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-10-04 04:15:06 +00:00
Radosław Kapka
3bc9ac37f6
Add Content-Type header to VC POST requests ( #12942 )
2023-09-21 17:21:06 +00:00
james-prysm
b0423a94af
REST implementation of /eth/v1/beacon/states/{state_id}/fork ( #12835 )
...
* fork state endpoint
* removing generated files
* fixing linting
* fixing tests using old type
* moving the response object to a new file under shared
* fixing test
* gaz
* fixing generated code
* gaz
* fixing linting
* rolling back some changes
* reverting generated changes
* fixing spacing
* linting
* updating protos after develop merged
* addressing radek's comments
* addressing more radek comments
2023-09-11 18:57:17 +00:00
james-prysm
6c16e90fe9
deneb - validator beacon rest apis ( #12871 )
...
* wip
* adding tests for deneb
* adding deneb to get block
* Update validator/client/beacon-api/get_beacon_block.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/propose_beacon_block.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/propose_beacon_block.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/propose_beacon_block.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/client/beacon-api/propose_beacon_block.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-09-11 16:50:55 +00:00
james-prysm
4d520460e0
REST implementation of /eth/v1/validator/register_validator ( #12758 )
...
* migrating v2 to http native url
* removing old code
* gaz
* updating beacon api validator client code
* fixing tests
2023-08-21 15:42:43 +00:00
anukul
46c72798c7
HTTP Beacon API: /eth/v1/validator/attestation_data ( #12634 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-08-14 17:56:36 +03:00
Radosław Kapka
049e608c75
HTTP Beacon API: /eth/v1/validator/sync_committee_subscriptions ( #12689 )
...
* HTTP Beacon API: `/eth/v1/validator/contribution_and_proofs`
* add comment to invalid test case
* fix validation and test
* review
* in progress
* implementation
* remove test file
* remove duplicate
* tests
* HTTP Beacon API: `/eth/v1/validator/sync_committee_subscriptions`
* pointers, pointers everywhere
* fix
* fix after merge
* review
* James' review
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2023-08-08 22:54:04 +00:00
Sammy Rosso
4ac4d00377
Implement GetValidatorPerformance beacon chain client ( #12581 )
...
* Add http endpoint for GetValidatorPerformance
* Add tests
* fix up client usage
* Revert changes
* Implement GetValidatorPerformance
* refactor to reuse code
* Move endpoint + move ComputeValidatorPerformance
* Radek's comment change
* Add Bazel file
* Change endpoint path
* Add server for http endpoints
* Fix server
* Create core package
* Gaz
* Update + add broken test
* Gaz
* fix
* Fix test
* Create const for endpoint
---------
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com >
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-07-18 08:57:54 +00:00
Patrice Vignola
9214364c5e
Add REST API endpoint for beacon chain client's ListValidators ( #12228 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-04-05 13:00:49 +02:00
Patrice Vignola
83ccb15e66
Add REST API endpoint for node client's GetGenesis ( #12168 )
...
* Add REST API endpoint for node client's GetGenesis
* Remove unused parameter
* Fix test name
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-03-28 11:36:41 +00:00
Patrice Vignola
7c49277e83
Add REST API stubs for beacon chain, node and slasher clients ( #12094 )
...
* WIP
* WIP
* Remove duplicate mock
* WIP
* Revert "WIP"
This reverts commit a8010057fe .
* Fix build break
* Remove unused variable
* Fix build break
* Rename validator_mock to validatormock
* Fix failing test
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-03-20 16:32:32 +00:00
terencechain
d17996f8b0
Update to V4 🚀 ( #12134 )
...
* Update V3 from V4
* Fix build v3 -> v4
* Update ssz
* Update beacon_chain.pb.go
* Fix formatter import
* Update update-mockgen.sh comment to v4
* Fix conflicts. Pass build and tests
* Fix test
2023-03-17 18:52:56 +00:00
Dhruv Bodani
bc643f8872
Add REST implementation for SubmitAggregateSelectionProof ( #11980 )
...
* add implementation of submit aggregate selection proof
* add tests
* handle head optimistic case
* fix imports
* address deepsource errors
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-02-14 11:25:21 +00:00
Patrice Vignola
791110f795
Add REST implementation for Validator's StreamBlocksAltair ( #11974 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-02-13 14:22:11 +01:00
Patrice Vignola
55f311eb73
Add REST implementation for Validator's SubscribeCommitteeSubnets ( #11804 )
...
* WIP
* Add REST implementation for Validator's SubscribeCommitteeSubnets
* Remove redundant test
* Initialize dutiesProvider
* Remove duplicate import
* Fix build break
* Address PR comments
* Remove file committed by mistake
* Fix broken test
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-01-18 21:21:07 +00:00
Manu NALEPA
0f90bacac9
Add REST implementation for CheckDoppelGanger ( #11835 )
...
* Add REST implementation for `MultipleValidatorStatus`
* Fix PR comments
* Address PR comments
* Add REST implementation for `CheckDoppelGanger`
* Use context
* Fix comments
* Fix PR comments
* Fix PR comments
* remove blank lines
* Fix comments
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2023-01-18 16:13:45 +00:00
Dhruv Bodani
7c9bff489e
Add REST implementation for GetSyncCommitteeContribution ( #11875 )
...
* add REST implementation for GetSyncCommitteeContribution
* fix imports
* Update validator/client/beacon-api/sync_committee.go
Co-authored-by: Radosław Kapka <radek@prysmaticlabs.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-01-17 16:43:22 +00:00
Patrice Vignola
81b9eceb50
Add Capella support for Validator's REST API ProposeBeaconBlock and GetBeaconBlock endpoints ( #11848 )
...
* Add Capella support for Validator's REST API ProposeBeaconBlock and GetBeaconBlock endpoints
* Fix
* Fix
* Add context to capella tests
* Update validator/client/beacon-api/beacon_block_proto_helpers.go
* Update validator/client/beacon-api/beacon_block_proto_helpers.go
* Update validator/client/beacon-api/beacon_block_proto_helpers_test.go
* Update validator/client/beacon-api/beacon_block_proto_helpers_test.go
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
Co-authored-by: Radosław Kapka <radek@prysmaticlabs.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-01-11 16:55:09 +00:00
Dhruv Bodani
116f3ac265
Add REST implementation for validator's ProposeAttestation ( #11800 )
...
* Add REST implementation for validator's ProposeAttestation
* handle nil attestation
* update propose attestation with context
* fix lint
* add remaining nil testcases
* Update validator/client/beacon-api/propose_attestation_test.go
Co-authored-by: Radosław Kapka <radek@prysmaticlabs.com >
* fix BUILD.bazel
Co-authored-by: Radosław Kapka <radek@prysmaticlabs.com >
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2023-01-10 16:21:29 +00:00
Patrice Vignola
e957edcb12
Add REST implementation for Validator's SubmitSignedContributionAndProof ( #11812 )
...
* Add REST implementation for Validator's SubscribeCommitteeSubnets
* Add context
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-01-09 22:54:52 +00:00
Dhruv Bodani
684022fa69
Add REST implementation for validator's SubmitSignedAggregateSelectionProof ( #11826 )
...
* add REST endpoint for SubmitSignedAggregateSelectionProof
* fix linter action
* update with context
* fix context import
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-01-09 21:18:42 +00:00
Dhruv Bodani
c89ab764e3
Add REST implementation for validator's GetSyncMessageBlockRoot ( #11824 )
...
* add REST implementation for GetSyncMessageBlockRoot
* improve sync_message_block_root_test.go to handle errors
* include context
* fix unit tests
2023-01-09 19:35:33 +00:00
Manu NALEPA
375a76d6c9
Add REST implementation for SubmitSyncMessage ( #11827 )
...
* Add REST implementation for `SubmitSyncMessage`
* Use context
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-01-09 17:05:18 +00:00
Manu NALEPA
4c9a0bf772
Add REST implementation for SubmitValidatorRegistrations ( #11816 )
...
* Add REST implementation for `SubmitValidatorRegistrations`
* Remove unused context
* Use context
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2023-01-06 19:46:09 +00:00
Patrice Vignola
3ff5895548
Add REST implementation for Validator's ProposeExit ( #11785 )
...
* Add REST implementation for Validator's GetBeaconBlock
* Move endpoint into constant
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-19 12:58:52 +00:00
Patrice Vignola
4eb4cd9756
Add REST implementation for Validator's PrepareBeaconProposer ( #11784 )
...
* Add REST implementation for Validator's PrepareBeaconProposer
* Change fee recipients
* Handle error in a better way
* Move endpoint into constant
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-19 12:23:54 +00:00
Patrice Vignola
e843cafe7d
Add REST implementation for Validator's GetBeaconBlock ( #11772 )
...
* WIP
* WIP
* WIP
* Remove unused parameter
* Address PR comments
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-15 22:34:05 +00:00
Manu NALEPA
9c21809c50
Add REST implementation for ValidatorStatus ( #11757 )
...
* Add REST implementation for `ValidatorStatus`
* Fix review comments
2022-12-14 12:58:36 +00:00
Patrice Vignola
fa01ee5eba
Add REST implementation for Validator's ProposeBeaconBlock ( #11731 )
...
* WIP
* WIP
* WIP
* Add tests
* WIP
* Add more tests
* Address DeepSource errors
* Remove unused param
* Add more tests
* Address PR comments
* Address PR comments
* Fix formatting
* Remove unused parameter
* Fix TestLittleEndianBytesToBigInt
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-12 10:39:51 +00:00
Patrice Vignola
dbeb3ee886
Onboard validator's Beacon REST API usage to e2e tests ( #11704 )
...
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* Onboard validator's Beacon REST API usage to e2e tests
* Remove unused variables
* Remove use_beacon_api tags
* Fix DeepSource errors
* Revert unneeded changes
* Revert evaluator changes
* Revert import reordering
* Address PR comments
* Remove all REST API e2e tests except minimal one
* Fix validator pointing to inexisting beacon node port
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2022-12-08 14:38:56 +00:00
Manu NALEPA
6eee539425
Add REST implementation for Validator's WaitForActivation (Ethereum Protocol Fellowship) ( #11671 )
...
* Implement REST `WaitForActivation`
* Activation: Factorize tests
* Fix PR comments
* `missingPubKeys`: Replace map by slice (no need to have a map here)
* Fix typo
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
2022-12-07 19:20:11 +00:00
Manu NALEPA
0a5c65e29c
Add REST implementation for Validator's ValidatorIndex ( #11712 )
...
* Add GetAttestationData
* Add tests
* Add many more tests and refactor
* Fix logic
* Address PR comments
* Address PR comments
* Add jsonRestHandler and decouple http logic from rest of the code
* Add buildURL tests
* Remove handlers_test.go
* Improve tests
* Implement `ValidatorIndex` of `beaconApiValidatorClient` using Beacon API
* Implement getStateValidators
* `validatorIndex`: Use `getStateValidators`
Co-authored-by: Patrice Vignola <vignola.patrice@gmail.com >
2022-12-06 12:27:26 +00:00