Add Deprecation Notice to Old API Methods
💎 Issue
Background
Currently prysm exposes its old and current api methods for consumers to use. However these old API methods will fail for any post phase-0 fork. We should add a deprecation notice to these old api methods in code so that it is obvious to both core developers and external consumers of the prysm API that some methods are not to be used anymore. Ex: https://github.com/prysmaticlabs/prysm/blob/develop/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go#L42 is an outdated api method when https://github.com/prysmaticlabs/prysm/blob/develop/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go#L67 should be used instead.
This can represented both in our proto schema files along with the implementation of the api method.
Hi @nisdas, is there a reference or spec to help us check which of those APIs are deprecated? Thanks
Hey @houjieth ,
For the official spec-apis, the deprecated ones are specified here https://ethereum.github.io/beacon-APIs/#/
However for internal prysm apis we don't have an reference/spec for this: https://github.com/prysmaticlabs/prysm/tree/develop/proto/prysm/v1alpha1
@rkapka Do we track the deprecated prysm-only apis anywhere ?
Let me know if PR #10946 is what you're looking for. Happy to update.
Hey @sragss, the PR partially addresses the issue. It doesn't handle the v1alpha1 endpoints, https://github.com/prysmaticlabs/prysm/tree/develop/proto/prysm/v1alpha1 . However given v1alpha1 is internal to prysm, there is no reference spec to compare against. We can accept the PR as it is, it just needs @rkapka review.
When I get some time, I can produce a filtered list of v1alpha1 endpoints that are meant to be deprecated. That can be handled in an alternate PR.
Don't think this is relevant anymore we need to remove those functions at some point but notices have been added.