Try   HackMD

working further on the prysm beacon API project this week

prysm/12634: implement HTTP Beacon API: /eth/v1/validator/attestation_data

started on a relatively simple endpoint with complete overlap with the prysm grpc API.

i didn't want to put the common logic in the grpc API, since it will eventually be deprecated. we also can't put it in the beacon API due to the possibility of a cyclic dependency, since it already calls the grpc API for some endpoints.
so, decided to put it in the prysm HTTP API for now, and it can go in the beacon API once we remove the grpc API dependency there.

while this refactoring wasn't too complicated, it did touch a lot of files.
when i regenerated the protobuf stubs, it resulted in compile errors due to duplicate imports. spent way too long trying to debug this, only to realize that it's a known issue.
lesson here - read docs more carefully, and maybe ask for help sooner? but most importantly, improve the state of dev tools!
we will likely remove the buggy grpc-gateway middleware through this project, but this issue has diverted my attention the state of bazel / gazelle - which could do with some upstream improvements over the weekends :)

next step to merge - sync to mainnet and run some benchmarks!