michaelhly / solana-py

Solana Python SDK
https://michaelhly.github.io/solana-py
MIT License
1.04k stars 273 forks source link

Issue: Usage of depreacted RPC calls #451

Closed Woody4618 closed 3 weeks ago

Woody4618 commented 1 month ago

Description Hey, there are bunch of RPC calls that are deprecated and will be removed very soon. You can find the deprecated calls here: https://github.com/anza-xyz/agave/wiki/Agave-v2.0-Transition-Guide

I searched your SDK for usage of these calls and looks like you are using getStakeActivation and maybe getConfirmedSignaturesForAddress2? These calls will not be usable anymore soon after breakpoint.

/Users/jonasmac2/Documents/GitHub/solana-py/CHANGELOG.md:359:- Use new devnet api endpoint, deprecate `solana.rpc.api.getConfirmedSignaturesForAddress2` and use `solana.rpc.api.getSignaturesForAddress` instead ([#77](https://github.com/michaelhly/solana-py/pull/77))
/Users/jonasmac2/Documents/GitHub/solana-py/src/solana/rpc/core.py:60:    GetStakeActivation,
/Users/jonasmac2/Documents/GitHub/solana-py/src/solana/rpc/core.py:347:    ) -> GetStakeActivation:
/Users/jonasmac2/Documents/GitHub/solana-py/src/solana/rpc/core.py:349:        return GetStakeActivation(pubkey, RpcEpochConfig(epoch, commitment_to_use))

Here you can find a replacement implementation of getStakeActivation for rust and JS client side: https://github.com/solana-developers/solana-rpc-get-stake-activation

If you know users of the SDK would also be great if you could inform them about the deprecated calls so nothing breaks when the calls actually get removed on mainnet.

If you are not actually using the deprecated calls in the SDK feel free to just close this :)

michaelhly commented 1 month ago

Hi, thanks! I'd be happy to accept a PR to add deprecation warnings to the suggested methods.

Woody4618 commented 1 month ago

Great! I was not planning to do it myself, im not really familiar with python, just wanted to let you know. Im going through all solana sdks to let people know about the removal of these calls. But maybe someone else will pick this up when they run into the error. :)

akashcodes commented 3 weeks ago

Hey @michaelhly, seems like a good first issue. I'll be happy to pick it up.

michaelhly commented 3 weeks ago

@akashcodes sounds good!