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 #243

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

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

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
  • getConfirmedBlocksWithLimit
  • 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

These are the usages places of the names calls:

/Users/jonasmac2/Documents/GitHub/solana-go/cmd/slnc/cmd/get_confirmed_block.go:42:             resp, err := client.GetConfirmedBlock(ctx, uint64(slot))
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:840:  - [GetConfirmedBlock](#index--rpc--getconfirmedblock)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1352:#### [index](#contents) > [RPC](#rpc-methods) > GetConfirmedBlock
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1379:    out, err := client.GetConfirmedBlock(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:27:// GetConfirmedBlock returns identity and transaction information about a confirmed block in the ledger.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:31:func (cl *Client) GetConfirmedBlock(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:56:// GetConfirmedBlock returns identity and transaction information about a confirmed block in the ledger.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:86:       err = cl.rpcClient.CallForInto(ctx, &out, "getConfirmedBlock", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getBlock.go:81:// Please use `getConfirmedBlock` for solana-core v1.6
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedBlock/getConfirmedBlock.go:39:             out, err := client.GetConfirmedBlock(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:842:  - [GetConfirmedBlocks](#index--rpc--getconfirmedblocks)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1411:#### [index](#contents) > [RPC](#rpc-methods) > GetConfirmedBlocks
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1438:    out, err := client.GetConfirmedBlocks(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:90:// GetConfirmedBlocks returns a list of confirmed blocks between two slots.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:98:func (cl *Client) GetConfirmedBlocks(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:113:      err = cl.rpcClient.CallForInto(ctx, &out, "getConfirmedBlocks", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedBlocks/getConfirmedBlocks.go:39:           out, err := client.GetConfirmedBlocks(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:844:  - [GetConfirmedBlocksWithLimit](#index--rpc--getconfirmedblockswithlimit)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1452:#### [index](#contents) > [RPC](#rpc-methods) > GetConfirmedBlocksWithLimit
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1478:    out, err := client.GetConfirmedBlocksWithLimit(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:117:// GetConfirmedBlocksWithLimit returns a list of confirmed blocks starting at the given slot.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:121:func (cl *Client) GetConfirmedBlocksWithLimit(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:133:      err = cl.rpcClient.CallForInto(ctx, &out, "getConfirmedBlocksWithLimit", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedBlocksWithLimit/getConfirmedBlocksWithLimit.go:38:         out, err := client.GetConfirmedBlocksWithLimit(
/Users/jonasmac2/Documents/GitHub/solana-go/cmd/slnc/cmd/get_transactions.go:69:                        ct, err := client.GetConfirmedTransaction(ctx, cs.Signature)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:848:  - [GetConfirmedTransaction](#index--rpc--getconfirmedtransaction)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1526:#### [index](#contents) > [RPC](#rpc-methods) > GetConfirmedTransaction
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1554:  out, err := client.GetConfirmedTransaction(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:173:// GetConfirmedTransaction returns transaction details for a confirmed transaction.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:174:func (cl *Client) GetConfirmedTransaction(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:180:      err = cl.rpcClient.CallForInto(ctx, &out, "getConfirmedTransaction", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:220:      err = cl.rpcClient.CallForInto(ctx, &out, "getConfirmedTransaction", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getTransaction.go:39:// Please use `getConfirmedTransaction` for solana-core v1.6
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedTransaction/getConfirmedTransaction.go:40: out, err := client.GetConfirmedTransaction(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:186:     out, err := client.GetConfirmedTransaction(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:201:                     "method":  "getConfirmedTransaction",
/Users/jonasmac2/Documents/GitHub/solana-go/cmd/slnc/cmd/get_transactions.go:50:                csList, err := client.GetConfirmedSignaturesForAddress2(ctx, pubKey, &rpc.GetConfirmedSignaturesForAddress2Opts{
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:846:  - [GetConfirmedSignaturesForAddress2](#index--rpc--getconfirmedsignaturesforaddress2)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1492:#### [index](#contents) > [RPC](#rpc-methods) > GetConfirmedSignaturesForAddress2
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1512:    out, err := client.GetConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1545:  example, err := client.GetConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:137:// GetConfirmedSignaturesForAddress2 returns confirmed signatures for transactions involving an
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:142:func (cl *Client) GetConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/deprecated.go:169:      err = cl.rpcClient.CallForInto(ctx, &out, "getConfirmedSignaturesForAddress2", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getSignaturesForAddress.go:48:// Please use `getConfirmedSignaturesForAddress2` for solana-core v1.6
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getSignaturesForAddress.go:65:// Please use `getConfirmedSignaturesForAddress2` for solana-core v1.6
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedSignaturesForAddress2/getConfirmedSignaturesForAddress2.go:32:             out, err := client.GetConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedTransaction/getConfirmedTransaction.go:31: example, err := client.GetConfirmedSignaturesForAddress2(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:153:     out, err := client.GetConfirmedSignaturesForAddress2(context.Background(), account, &GetConfirmedSignaturesForAddress2Opts{Limit: &limit})
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:165:                     "method":  "getConfirmedSignaturesForAddress2",
/Users/jonasmac2/Documents/GitHub/solana-go/cmd/slnc/cmd/get_recent_block_hash.go:36:           resp, err := client.GetRecentBlockhash(ctx, "")
/Users/jonasmac2/Documents/GitHub/solana-go/cmd/slnc/cmd/token_registry_register.go:91:         blockHashResult, err := client.GetRecentBlockhash(context.Background(), rpc.CommitmentMax)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:765:  recent, err := rpcClient.GetRecentBlockhash(context.TODO(), rpc.CommitmentFinalized)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:874:  - [GetRecentBlockhash](#index--rpc--getrecentblockhash)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1075:  example, err := client.GetRecentBlockhash(context.TODO(), rpc.CommitmentFinalized)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1128:  example, err := client.GetRecentBlockhash(context.TODO(), rpc.CommitmentFinalized)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1230:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1266:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1304:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1370:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1427:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1468:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1634:  example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1842:NEW: This method is only available in solana-core v1.9 or newer. Please use getRecentBlockhash for solana-core v1.8
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2199:#### [index](#contents) > [RPC](#rpc-methods) > GetRecentBlockhash
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2215:  recent, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2412:  recent, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getRecentBlockhash.go:23:// GetRecentBlockhash returns a recent block hash from the ledger,
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getRecentBlockhash.go:25:func (cl *Client) GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getRecentBlockhash.go:34:       err = cl.rpcClient.CallForInto(ctx, &out, "getRecentBlockhash", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getBlock/getBlock.go:29:       example, err := client.GetRecentBlockhash(context.TODO(), rpc.CommitmentFinalized)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getBlocksWithLimit/getBlocksWithLimit.go:28:   example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getBlockTime/getBlockTime.go:29:       example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedBlocksWithLimit/getConfirmedBlocksWithLimit.go:28: example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getFeeCalculatorForBlockhash/getFeeCalculatorForBlockhash.go:28:       example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getSlotLeaders/getSlotLeaders.go:28:   recent, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getBlockCommitment/getBlockCommitment.go:28:   example, err := client.GetRecentBlockhash(context.TODO(), rpc.CommitmentFinalized)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedBlocks/getConfirmedBlocks.go:28:   example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getConfirmedBlock/getConfirmedBlock.go:30:     example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getBlocks/getBlocks.go:28:     example, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getRecentBlockhash/getRecentBlockhash.go:28:   recent, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getLatestBlockhash.go:28:// `getRecentBlockhash` for solana-core v1.8**
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:284:     out, err := client.GetRecentBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:299:                     "method":  "getRecentBlockhash",
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:855:  - [GetFees](#index--rpc--getfees)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1680:#### [index](#contents) > [RPC](#rpc-methods) > GetFees
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1696:  out, err := client.GetFees(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeForMessage.go:24:// `getFees` for solana-core v1.8.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getFees/getFees.go:28: out, err := client.GetFees(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFees.go:23:// GetFees returns a recent block hash from the ledger,
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFees.go:27:func (cl *Client) GetFees(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFees.go:35:  err = cl.rpcClient.CallForInto(ctx, &out, "getFees", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1081:    out, err := client.GetFees(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1096:                    "method":  "getFees",
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:852:  - [GetFeeCalculatorForBlockhash](#index--rpc--getfeecalculatorforblockhash)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1618:#### [index](#contents) > [RPC](#rpc-methods) > GetFeeCalculatorForBlockhash
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1642:  out, err := client.GetFeeCalculatorForBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeCalculatorForBlockhash.go:23:// GetFeeCalculatorForBlockhash returns the fee calculator
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeCalculatorForBlockhash.go:27:func (cl *Client) GetFeeCalculatorForBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeCalculatorForBlockhash.go:36:     err = cl.rpcClient.CallForInto(ctx, &out, "getFeeCalculatorForBlockhash", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/isBlockhashValid.go:12:// `getFeeCalculatorForBlockhash` for solana-core v1.8**
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getFeeCalculatorForBlockhash/getFeeCalculatorForBlockhash.go:36:       out, err := client.GetFeeCalculatorForBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1009:    out, err := client.GetFeeCalculatorForBlockhash(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1025:                    "method":  "getFeeCalculatorForBlockhash",
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:854:  - [GetFeeRateGovernor](#index--rpc--getfeerategovernor) **DEPRECATED**
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1654:#### [index](#contents) > [RPC](#rpc-methods) > GetFeeRateGovernor
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:1670:  out, err := client.GetFeeRateGovernor(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeRateGovernor.go:21:// GetFeeRateGovernor returns the fee rate governor information from the root bank.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeRateGovernor.go:22:func (cl *Client) GetFeeRateGovernor(ctx context.Context) (out *GetFeeRateGovernorResult, err error) {
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getFeeRateGovernor.go:23:       err = cl.rpcClient.CallForInto(ctx, &out, "getFeeRateGovernor", nil)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getFeeRateGovernor/getFeeRateGovernor.go:28:   out, err := client.GetFeeRateGovernor(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1049:    out, err := client.GetFeeRateGovernor(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1063:                    "method":  "getFeeRateGovernor",
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:884:  - [GetSnapshotSlot](#index--rpc--getsnapshotslot)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2432:#### [index](#contents) > [RPC](#rpc-methods) > GetSnapshotSlot
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2448:  out, err := client.GetSnapshotSlot(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getHighestSnapshotSlot.go:26:// `getSnapshotSlot` for solana-core v1.8**
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getSnapshotSlot/getSnapshotSlot.go:28: out, err := client.GetSnapshotSlot(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getSnapshotSlot.go:21:// GetSnapshotSlot returns the highest slot that the node has a snapshot for.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getSnapshotSlot.go:22:func (cl *Client) GetSnapshotSlot(ctx context.Context) (out uint64, err error) {
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getSnapshotSlot.go:23:  err = cl.rpcClient.CallForInto(ctx, &out, "getSnapshotSlot", nil)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1837:    out, err := client.GetSnapshotSlot(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:1851:                    "method":  "getSnapshotSlot",
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:886:  - [GetStakeActivation](#index--rpc--getstakeactivation)
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2458:#### [index](#contents) > [RPC](#rpc-methods) > GetStakeActivation
/Users/jonasmac2/Documents/GitHub/solana-go/README.md:2476:  out, err := client.GetStakeActivation(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/examples/getStakeActivation/getStakeActivation.go:30:   out, err := client.GetStakeActivation(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getStakeActivation.go:23:// GetStakeActivation returns epoch activation information for a stake account.
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getStakeActivation.go:24:func (cl *Client) GetStakeActivation(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/getStakeActivation.go:48:       err = cl.rpcClient.CallForInto(ctx, &out, "getStakeActivation", params)
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:2667:    out, err := client.GetStakeActivation(
/Users/jonasmac2/Documents/GitHub/solana-go/rpc/client_test.go:2684:                    "method":  "getStakeActivation",

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