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

Usage of depreacted RPC calls that will soon be removed #136

Open
Woody4618 opened this issue Aug 29, 2024 · 1 comment
Open

Usage of depreacted RPC calls that will soon be removed #136

Woody4618 opened this issue Aug 29, 2024 · 1 comment

Comments

@Woody4618
Copy link

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

getConfirmedBlock
getConfirmedBlocks
getConfirmedTransaction
getConfirmedSignaturesForAddress2
getRecentBlockhash
getFees
getFeeCalculatorForBlockhash
getFeeRateGovernor
getSnapshotSlot
getStakeActivation

These calls will not be usable anymore soon after breakpoint when Agave 2.0 goes live.

You can find the all the usages in the code using this bash script:
https://gist.githubusercontent.com/cloakd/2366d9c5d415c27a1f26f10de0b8be93/raw/d0d3a25dda23586ba9704f7985fb06093032ec72/check_words.sh

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

All other calls have replacement calls here:
https://github.com/anza-xyz/agave/wiki/Agave-v2.0-Transition-Guide

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.

@Woody4618
Copy link
Author

Woody4618 commented Aug 29, 2024

These are the usages in the code according to the bash script:

`/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:68:        val result = solana.api.getConfirmedBlock(slot).getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlock.kt:18:    override val method: String = "getConfirmedBlock"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlock.kt:41:fun Api.getConfirmedBlock(slot: Int, onComplete: (Result<ConfirmedBlock>) -> Unit) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlock.kt:43:        onComplete(getConfirmedBlock(slot.toLong()))
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlock.kt:47:suspend fun Api.getConfirmedBlock(
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:37:        val block = solana.api.getConfirmedBlock(slot.toInt()).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:176:        val result = solana.api.getConfirmedBlock(slot.toInt()).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:368:fun Api.getConfirmedBlock(slot: Int): Single<ConfirmedBlock> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:370:        this.getConfirmedBlock(slot) { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:81:        val result = solana.api.getConfirmedBlocks(height, height - 10).getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlocks.kt:13:    override val method: String = "getConfirmedBlocks"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlocks.kt:22:fun Api.getConfirmedBlocks(start: Int, end: Int? = null, onComplete: (Result<List<Double>>) -> Unit) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlocks.kt:24:        onComplete(getConfirmedBlocks(start.toLong(), end?.toLong()))
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedBlocks.kt:28:suspend fun Api.getConfirmedBlocks(start: Long, end: Long? = null): Result<List<Double>> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:201:        val result = solana.api.getConfirmedBlocks(height, height - 10).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:433:fun Api.getConfirmedBlocks(start: Int, end: Int): Single<List<Double>> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:435:        this.getConfirmedBlocks(start, end) { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedTransaction.kt:11:    override val method: String = "getConfirmedTransaction"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedTransaction.kt:19:fun Api.getConfirmedTransaction(signature: String,
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedTransaction.kt:23:        onComplete(getConfirmedTransaction(signature))
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedTransaction.kt:27:suspend fun Api.getConfirmedTransaction(signature: String): Result<ConfirmedTransactionSerializable> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:39:        val result = solana.api.getConfirmedTransaction(signature).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:53:fun Api.getConfirmedTransaction(signature: String): Single<ConfirmedTransactionSerializable> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:55:        this.getConfirmedTransaction(signature,) { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:87:         val result = solana.api.getConfirmedSignaturesForAddress2(PublicKey("5Zzguz4NsSRFxGkHfM4FmsFpGZiCDtY72zH2jzMcqkJx"), 10).getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedSignaturesForAddress2.kt:18:    override val method: String = "getConfirmedSignaturesForAddress2"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedSignaturesForAddress2.kt:42:fun Api.getConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedSignaturesForAddress2.kt:51:            getConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getConfirmedSignaturesForAddress2.kt:61:suspend fun Api.getConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:232:        val result = solana.api.getConfirmedSignaturesForAddress2(PublicKey("5Zzguz4NsSRFxGkHfM4FmsFpGZiCDtY72zH2jzMcqkJx"), 10, null, null).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:524:fun Api.getConfirmedSignaturesForAddress2(account: PublicKey,
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:529:        this.getConfirmedSignaturesForAddress2(account, limit, before, until) { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:29:        val result = solana.api.getRecentBlockhash().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:106:        val blockhash = solana.api.getRecentBlockhash().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/sendTransaction.kt:13:    val blockHash = recentBlockHash ?: getRecentBlockhash().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getRecentBlockhash.kt:12:    override val method: String = "getRecentBlockhash"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getRecentBlockhash.kt:20:suspend fun Api.getRecentBlockhash(): Result<String> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getRecentBlockhash.kt:28:fun Api.getRecentBlockhash(onComplete: ((Result<String>) -> Unit)) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getRecentBlockhash.kt:30:        onComplete(getRecentBlockhash())
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:23:        val result = solana.api.getRecentBlockhash().blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:108:        val blockhash = solana.api.getRecentBlockhash().blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:27:fun Api.getRecentBlockhash(): Single<String> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:29:         this.getRecentBlockhash { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:119:        val result = solana.api.getFees().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFees.kt:11:    override val method: String = "getFees"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFees.kt:24:fun Api.getFees(onComplete: ((Result<FeesInfo>) -> Unit)){
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFees.kt:26:        onComplete(getFees())
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFees.kt:30:suspend fun Api.getFees(): Result<FeesInfo> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:127:        val result = solana.api.getFees().blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:251:fun Api.getFees(): Single<FeesInfo> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:253:        this.getFees { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:107:        val result = solana.api.getFeeCalculatorForBlockhash(blockhash).getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeCalculatorForBlockhash.kt:13:    override val method: String = "getFeeCalculatorForBlockhash"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeCalculatorForBlockhash.kt:31:fun Api.getFeeCalculatorForBlockhash(blockhash: String, onComplete: ((Result<FeeCalculatorInfo>) -> Unit)) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeCalculatorForBlockhash.kt:33:        onComplete(getFeeCalculatorForBlockhash(blockhash))
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeCalculatorForBlockhash.kt:37:suspend fun Api.getFeeCalculatorForBlockhash(blockhash: String): Result<FeeCalculatorInfo> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:109:        val result = solana.api.getFeeCalculatorForBlockhash(blockhash).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:212:fun Api.getFeeCalculatorForBlockhash(blockhash: String): Single<FeeCalculatorInfo> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:214:        this.getFeeCalculatorForBlockhash(blockhash) { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:113:        val result = solana.api.getFeeRateGovernor().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeRateGovernor.kt:11:    override val method: String = "getFeeRateGovernor"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeRateGovernor.kt:30:fun Api.getFeeRateGovernor(onComplete: ((Result<FeeRateGovernorInfo>) -> Unit)) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeRateGovernor.kt:32:        onComplete(getFeeRateGovernor())
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getFeeRateGovernor.kt:36:suspend fun Api.getFeeRateGovernor(): Result<FeeRateGovernorInfo> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:121:        val result = solana.api.getFeeRateGovernor().blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:238:fun Api.getFeeRateGovernor(): Single<FeeRateGovernorInfo> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:240:        this.getFeeRateGovernor { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:66://        val slot = solana.api.getSnapshotSlot().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:74:        val result = solana.api.getSnapshotSlot().getOrThrow()
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getTransactionCount.kt:17:        onComplete(getSnapshotSlot())
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getSnapshotSlot.kt:10:    override val method: String = "getSnapshotSlot"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getSnapshotSlot.kt:15:fun Api.getSnapshotSlot(onComplete: (Result<Long>) -> Unit) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getSnapshotSlot.kt:17:        onComplete(getSnapshotSlot())
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getSnapshotSlot.kt:21:suspend fun Api.getSnapshotSlot(): Result<Long> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:36:        val slot = solana.api.getSnapshotSlot().blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:182:        val result = solana.api.getSnapshotSlot().blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:381:fun Api.getSnapshotSlot(): Single<Long> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:383:        this.getSnapshotSlot { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/test/java/com/solana/api/ApiTests.kt:240:        val result = solana.api.getStakeActivation(PublicKey("HDDhNo3H2t3XbLmRswHdTu5L8SvSMypz9UVFu68Wgmaf"))
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getStakeActivation.kt:15:    override val method: String = "getStakeActivation"
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getStakeActivation.kt:35:suspend fun Api.getStakeActivation(publicKey: PublicKey, epoch: Long? = null): Result<StakeActivation> =
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getStakeActivation.kt:44:fun Api.getStakeActivation(publicKey: PublicKey, onComplete: ((Result<StakeActivation>) -> Unit)) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getStakeActivation.kt:46:        onComplete(getStakeActivation(publicKey))
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getStakeActivation.kt:50:fun Api.getStakeActivation(publicKey: PublicKey, epoch: Long, onComplete: ((Result<StakeActivation>) -> Unit)) {
/Users/jonasmac2/Documents/GitHub/SolanaKT/solana/src/main/java/com/solana/api/getStakeActivation.kt:52:        onComplete(getStakeActivation(publicKey, epoch))
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:52:        val result = solana.api.getStakeActivation(PublicKey("HDDhNo3H2t3XbLmRswHdTu5L8SvSMypz9UVFu68Wgmaf")).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/test/java/com/solana/rxsolana/api/Methods.kt:58:        val result = solana.api.getStakeActivation(PublicKey("HDDhNo3H2t3XbLmRswHdTu5L8SvSMypz9UVFu68Wgmaf"), 143).blockingGet()
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:92:fun Api.getStakeActivation(publicKey: PublicKey): Single<StakeActivation> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:94:        this.getStakeActivation(publicKey) { result ->
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:105:fun Api.getStakeActivation(publicKey: PublicKey, epoch: Long): Single<StakeActivation> {
/Users/jonasmac2/Documents/GitHub/SolanaKT/rxSolana/src/main/java/com/solana/rxsolana/api/Api.kt:107:        this.getStakeActivation(publicKey, epoch) { result ->`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant