prysm icon indicating copy to clipboard operation
prysm copied to clipboard

Add Deprecation Notice to Old API Methods

Open nisdas opened this issue 3 years ago • 4 comments

💎 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.

nisdas avatar Jun 03 '22 07:06 nisdas

Hi @nisdas, is there a reference or spec to help us check which of those APIs are deprecated? Thanks

houjieth avatar Jun 06 '22 22:06 houjieth

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 ?

nisdas avatar Jun 07 '22 06:06 nisdas

Let me know if PR #10946 is what you're looking for. Happy to update.

sragss avatar Jul 06 '22 05:07 sragss

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.

nisdas avatar Jul 06 '22 05:07 nisdas

Don't think this is relevant anymore we need to remove those functions at some point but notices have been added.

james-prysm avatar Dec 07 '23 21:12 james-prysm