Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracking] - HTTP Endpoint Cleanup #12958

Open
14 of 20 tasks
saolyn opened this issue Sep 26, 2023 · 3 comments
Open
14 of 20 tasks

[Tracking] - HTTP Endpoint Cleanup #12958

saolyn opened this issue Sep 26, 2023 · 3 comments
Assignees
Labels
API Api related tasks Tracking Gotta Catch 'Em All

Comments

@saolyn
Copy link
Contributor

saolyn commented Sep 26, 2023

🦄 HTTP Endpoint Cleanup Tracking

Feature Description

Now that all the validator client endpoints have been modified to be HTTP endpoints we need to clean up a few things before moving on to converting the rest of the Beacon API.

Tasks

  • Remove the validation package
  • Change usages of s.V1Alpha1Server to use the core package instead
  • Write documentation on how to add new custom endpoints
  • Add a page with dedicated documentation for each endpoint
  • Handle Cors on all endoints
  • Support comma-separated query values in a more future-proof way than Support comma-separated query params in Beacon API #12966
  • Remove validation package from beacon-chain/rpc/eth/shared/structs_blocks.go
  • Move structs to a structs package and group them into definition-ToConsensus-FromConsensus for each type
  • Decide whether FromConsensus functions should start with a nil check
  • Decide on a common uint encoding pattern in FromConsensus functions. fmt.Sprintf is less verbose than strconv.
  • Allow SSL
  • Use DecodeHexWithLength in ToConsensus functions
  • Use the exact param name inside handlers in calls to ValidateHex/ValidateUint
  • Static analyzer checking that HandleError is always followed with return
  • Versioning scheme for custom endpoints
  • Rename http package to httputil to avoid aliasing in every handler file
  • Use UintFromQuery instead of ValidateUint because it's strictly better (need to verify if that's the case first) and make the latter unimported. Would it make sense to create a HexFromQuery function?
  • Add spans to Prysm endpoints
  • Rename rpc/eth to api/beacon
  • Rename Bls to BLS in field names

This issue should be closed after all of the above tasks are complete.

@saolyn saolyn added Tracking Gotta Catch 'Em All API Api related tasks labels Sep 26, 2023
@saolyn saolyn changed the title HTTP Endpoint Cleanup [Tracking] - HTTP Endpoint Cleanup Sep 26, 2023
@rkapka
Copy link
Contributor

rkapka commented Sep 27, 2023

Change s.V1Alpha1Server.GetBeaconBlock call in produceBlockV3 to use the core package instead

This one is implemented in #12927

@james-prysm
Copy link
Contributor

we need to migrate lightclient to stop using the eth proto package and instead use just the v1alphav1

@james-prysm
Copy link
Contributor

there are duplicate code in the builder types + how it uses ssz that could be cleaned up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Tracking Gotta Catch 'Em All
Projects
None yet
Development

No branches or pull requests

3 participants