kasey
c11e3392d4
SSE implementation that sheds stuck clients ( #14413 )
...
* sse implementation that sheds stuck clients
* Radek and James feedback
* Refactor event streamer code for readability
* less-flaky test signaling
* test case where queue fills; fixes
* add changelog entry
* james and preston feedback
* swap our Subscription interface with an alias
* event.Data can be nil for the payload attr event
* deepsource
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com >
2024-10-04 21:18:17 +00:00
Radosław Kapka
cf4ffc97e2
Update block Beacon APIs to Electra ( #14488 )
...
* Update block Beacon APIs to Electra
* CHANGELOG
* Revert "Auxiliary commit to revert individual files from 9bf238279a696dbcd65440606b0e3173f3be5e05"
This reverts commit a7ef57a2532f9ee02831d180926f7b84f5104a2b.
* review
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2024-10-04 08:21:08 +00:00
Bastin
6af44a1466
Fix lc execution header bug ( #14468 )
...
* create finalized header based on finalized block version
* changelog entry
* pass attested block from handlers
* fix core tests
* add test for attested header exectution fields
* changelog entry
* remove unused functions
* Update beacon-chain/core/light-client/lightclient.go
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com >
* Update beacon-chain/core/light-client/lightclient.go
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com >
* Update beacon-chain/core/light-client/lightclient.go
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com >
* remove finalized header from default update
* remove unused functions
* bazel deps
---------
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com >
2024-10-03 17:29:22 +00:00
Owen
2e29164582
allow users to publish blobs ( #14442 )
...
* allow users to publish blobs
Allowing users to publish blobs before publishing blocks, gives the blobs a head start. They can begin to propagate around the network while the block is being validated.
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
* Update beacon-chain/rpc/prysm/beacon/handlers.go
---------
Co-authored-by: Radosław Kapka <radoslaw.kapka@gmail.com >
2024-10-01 20:13:41 +00:00
Potuz
ddafedc268
Implement consensus-specs/3875 ( #14458 )
...
* WIP
- beacon-chain builds
* pass blockchain tests
* pass beacon-chain/execution tests
* Passing RPC tests
* fix building
* add changelog
* fix linters
* Spectests
* copy requests on Copy()
* Fix tests
* Fix config test
* fix verification tests
* add aliases for Electra types
* double import and unskip spectests
* Remove unnecessary comment
2024-09-25 17:06:52 +00:00
Radosław Kapka
7ac3c01b5b
Refactor light client functions ( #14434 )
...
* Use correct types in light client functions
* conversions
* more refactoring
* test fixes
* changelog
* error fix
* revert test changes
* revert test skip
* Update api/server/structs/conversions_lightclient.go
Co-authored-by: Rupam Dey <117000803+rupam-04@users.noreply.github.com >
* use BlockToLightClientHeader
* reviewer suggestion
* Revert "use BlockToLightClientHeader"
This reverts commit f3df56ded5 .
---------
Co-authored-by: Rupam Dey <117000803+rupam-04@users.noreply.github.com >
2024-09-13 22:08:28 +00:00
Md Amaan
a5317f8117
Replaced mux with http.Servemux ( #14416 )
...
* Replaced mux with http.Servmux
* updated change log
* james suggestions
* lint
* lint fix 2
* passed middlewares from validatorclient
* gazelle fix
* fixed issue
* added middlewares field to rpc config
* suggestions applied
* updated godoc
* fixed TestCors
* refactor
* godoc added
* cli code removed and lint fixed
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2024-09-11 19:39:05 +00:00
Rupam Dey
eec3b0b7fe
feat: introduce Capella and Deneb full-node.md lc changes ( #14376 )
...
* feat: introduce Capella and Deneb `full-node.md` lc changes
* add switch-case and replace `[][]byte` with `[][]string`
* return version name in http header
* populate header and use `interfaces.ReadOnlyBeaconBlock`
* fix lint
* merge cases in switch case and replace `interfaces.ExecutionData` with `*ExecutionPayloadHeader`
* minor fixes
* refactor `createLightClientBootstrapCapella` and `createLightClientBootstrapDeneb`
* use lightclientheader instead of different versions
* fix failing `TestLightClientHandler_GetLightClientBootstrap` tests
* fix lint
* refactor handlers
* refactor handlers more
* refactor handlers even more
* create conversions_lightclient
* fix lint errors
* add deneb and capella proto headers
* update lightclientbootstrap proto struct to capella&deneb
* update usecases
* update usecases
* resolve panic in header.GetBeacon
* fix spacings
* refactor core/lightclient.go
* fix isBetterUpdate
* use errors.wrap instead of fmt.errorf
* changelog entry
* fix lint errors
* fix api structs to use json rawMessage
* inline unmarshal
* remove redundant nil check
* revert remove redundant nil check
* return error in newLightClientUpdateToJSON
* inline getExecutionData
* better error handling
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: Inspector-Butters <mohamadbastin@gmail.com >
Co-authored-by: Bastin <43618253+Inspector-Butters@users.noreply.github.com >
2024-09-06 17:06:31 +00:00
james-prysm
45fd3eb1bf
gRPC Gateway Removal ( #14089 )
...
* wip passing e2e
* reverting temp comment
* remove unneeded comments
* fixing merge errors
* fixing more bugs from merge
* fixing test
* WIP moving code around and fixing tests
* unused linting
* gaz
* temp removing these tests as we need placeholder/wrapper APIs for them with the removal of the gateway
* attempting to remove dependencies to gRPC gateway , 1 mroe left in deps.bzl
* renaming flags and other gateway services to http
* goimport
* fixing deepsource
* git mv
* Update validator/package/validator.yaml
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/package/validator.yaml
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update cmd/beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* addressing feedback
* missed lint
* renaming import
* reversal based on feedback
* fixing web ui registration
* don't require mux handler
* gaz
* removing gRPC service from validator completely, merged with http service, renames are a work in progress
* updating go.sum
* linting
* trailing white space
* realized there was more cleanup i could do with code reuse
* adding wrapper for routes
* reverting version
* fixing dependencies from merging develop
* gaz
* fixing unit test
* fixing dependencies
* reverting unit test
* fixing conflict
* updating change log
* Update log.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* gaz
* Update api/server/httprest/server.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
* addressing some feedback
* forgot to remove deprecated flag in usage
* gofmt
* fixing test
* fixing deepsource issue
* moving deprecated flag and adding timeout handler
* missed removal of a flag
* fixing test:
* Update CHANGELOG.md
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* addressing feedback
* updating comments based on feedback
* removing unused field for now, we can add it back in if we need to use the option
* removing unused struct
* changing api-timeout flag based on feedback
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2024-09-04 15:40:31 +00:00
Bastin
3015eea4e3
Fix lightclient header ( #14389 )
...
* change LCUpdate to use LCHeader
* fix api struct usages
* fix api struct finalized_header
* add lightclientheader to proto structs
* fix proto usages
* fix proto usages in events
* fix uppercase field in protobuf defenition
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-08-29 15:57:21 +00:00
Rupam Dey
dd3c9652c3
fix: replace BeaconBlockHeader in createLightClientBootstrap with LightClientHeader ( #14374 )
...
* fix: replace `BeaconBlockHeader` in `createLightClientBootstrap` with `LightClientHeader`
* minor fix in `handlers_test.go`
* check if `beacon` is `nil` instead of `header`
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-08-22 17:13:10 +00:00
Radosław Kapka
41ea1d230a
Electra API struct conversions ( #14339 )
...
* Electra API conversions
* reduce function complexity
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2024-08-19 11:46:56 +00:00
Sammy Rosso
e0785a8939
HTTP endpoint for GetValidatorActiveSetChanges ( #14264 )
...
* add GetValidatorActiveSetChanges
* fix linter
* fix errors
* James' review
* use stater
* fix merge conflict errors
* remove validator from func names
* rename util funcs
2024-08-06 11:56:43 +00:00
Sammy Rosso
fb2620364a
HTTP endpoint for GetChainHead ( #14262 )
...
* add getChainHead endpoint
* James' review
* Radek' review
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-08-05 08:49:37 +00:00
Sammy Rosso
836608537e
HTTP endpoint for GetValidatorParticipation ( #14261 )
...
* add endpoint
* remove canonicalFetcher
* Add replayerBuilder to coreService
* fix endpoint template
* fix string query params
* gaz
* fix linter
* test fix
* Radek' review
* remove unused request struct + gaz
* linter
* gaz
---------
Co-authored-by: rkapka <radoslaw.kapka@gmail.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-08-02 13:55:17 +00:00
Sammy Rosso
57ffc12f17
HTTP endpoint GetIndividualVotes ( #14198 )
...
* add http endpoint
* add tests
* Gaz
* Add pointers
* add endpoint to test
* Electra: EIP-7251 Update `process_voluntary_exit` (#14176 )
* Electra: EIP-7251 Update `process_voluntary_exit`
* Add unit test for VerifyExitAndSignature EIP-7251
* @potuz peer feedback
* Avoid Cloning When Creating a New Gossip Message (#14201 )
* Add Current Changes
* add back check
* Avoid a Panic
* fix: Multiple network flags should prevent the BN to start (#14169 )
* Implement Initial Logic
* Include check in main.go
* Add tests for multiple flags
* remove usage of append
* remove config/features dependency
* Move ValidateNetworkFlags to config/features
* Nit
* removed NetworkFlags from cmd
* remove usage of empty string literal
* add comment
* add flag validation to prysctl validator-exit
---------
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com >
* fix tests
* Radek' review + tests
* fix tests
* Radek' review
* forgot one
* almost forgot the tests
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
Co-authored-by: Nishant Das <nishdas93@gmail.com >
Co-authored-by: kira <shyampkira@gmail.com >
Co-authored-by: Manu NALEPA <enalepa@offchainlabs.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-07-19 12:23:36 +00:00
Khanh Hoa
7a394062e1
refactor: enable errorlint and refactor code ( #14110 )
...
* refactor: enable errorlint and refactor code
* revert
* revert
* add bazel
* gofmt
* gofmt
* gofmt
* gofmt
* gci
* lint
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-07-04 22:40:13 +00:00
Delweng
0674cf64cc
chore: make deepsource happy ( #14081 )
...
* chore(pruner): return error directly
Signed-off-by: jsvisa <delweng@gmail.com >
* chore(rpc): unused method receiver
Signed-off-by: jsvisa <delweng@gmail.com >
* fix(rpc): use net.JoinHostPort instead of fmt.Sprintf
Signed-off-by: jsvisa <delweng@gmail.com >
* chore(amiddleware):use http.NoBody instead of nil
Signed-off-by: jsvisa <delweng@gmail.com >
* chore(rpc): rm notused params
Signed-off-by: jsvisa <delweng@gmail.com >
* chore(p2p): comment
Signed-off-by: jsvisa <delweng@gmail.com >
* feat(db/prune): reduce complexity
Signed-off-by: jsvisa <delweng@gmail.com >
* chore(db/pruner): name
Signed-off-by: jsvisa <delweng@gmail.com >
* Revert "chore(pruner): return error directly"
This reverts commit d76e745f60 .
Signed-off-by: jsvisa <delweng@gmail.com >
* revert back pruner.go
Signed-off-by: jsvisa <delweng@gmail.com >
---------
Signed-off-by: jsvisa <delweng@gmail.com >
2024-06-13 16:12:04 +00:00
james-prysm
dfe31c9242
adding in softer check for content type ( #14097 )
2024-06-10 17:15:23 +00:00
james-prysm
1b40f941cf
middleware for content type and accept headers ( #14075 )
...
* middleware for content type
* adding accept middleware too and tests
* Update beacon-chain/rpc/endpoints.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update beacon-chain/rpc/endpoints.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update beacon-chain/rpc/endpoints.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update beacon-chain/rpc/endpoints.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* including radek's review
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-06-04 20:38:21 +00:00
kasey
c312a88aa3
Removes fork-specific concrete type getters ( #13941 )
...
* removing typed pb accessors
* refactor ssz api resp handlers to avoid typed pbs
* json get block handler refactor
* SubmitBlindedBlock to use generic json handling
* update SubmitBlindedBlock
* clear out more usages of PbForkname methods
* remove fork-specific getters from block interface
* remove usages of payload pb methods
* remove pb helpers from execution payload interface
* Update beacon-chain/rpc/eth/beacon/handlers.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update beacon-chain/rpc/eth/beacon/handlers.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update api/client/builder/client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update api/client/builder/client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update api/client/builder/client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update api/client/builder/client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update api/client/builder/client.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Radek review
* fix error message
* deal with wonky builder responses
* ✂️
* gaz
* lint
* tweaks for deep source
---------
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-05-02 20:52:27 +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
Sammy Rosso
5afb1255fe
Add /eth/v1/beacon/deposit_snapshot endpoint ( #13514 )
...
* Add endpoint
* Uncomment in InitializeRoutes
* Add test
* Add 404
* Add more checks
* Test improvements
* Ssz
* Add ssz tags
* Add DepositSnapshot to bazel
* Fix tests
* Fix max size
* Resolve conflicts
* Revert untouched code
* Fix test + review
* Lint
* Oops
* Preston + Radek' review
* Only return 3 finalized roots
* Change to deposit contract depth
* Radek' review
* Gaz
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2024-02-07 22:53:08 +00:00
Radosław Kapka
e3ce1bde45
Move API structs to api module ( #13577 )
2024-02-03 11:57:01 +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
james-prysm
481d77bfde
APIs: reusing grpc cors middleware for rest ( #13284 )
...
* reusing grpc cors middleware for rest
* addressing radek's comments
* Update api/server/middleware.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* fixing to recommended name
* fixing naming
* fixing rename on test
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-12-08 04:24:18 +00:00
james-prysm
9c938d354d
HTTP Validator API: /eth/v1/validator/{pubkey}/gas_limit ( #13082 )
...
* WIP
* more WIP
* fixing unit tests
* gaz
* gofmt
* adding routes
* adding tests for validator routes
* adding in missed comment
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* adding log and removing unneeded type
* fixing casing on tests
* adding more tests
* Update server.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
* addressing radek's comments
* handling error
* fixing naming on validator struct for mock
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-10-23 15:49:28 +00:00
james-prysm
bfae7f3c9f
HTTP VALIDATOR API: /eth/v1/validator/{pubkey}/voluntary_exit ( #13032 )
...
* migrating set validator exit to http only and removing from api middleware
* fixing ineffassign error
* cleaning up middleware
* fixing linting
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* adding more tests based on sammy's comments
* radek's feedback
* adjusting error codes
* one more status change
* fixing unit test
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-10-16 22:16:20 +00:00