3

Does anyone know of any Solana mainnet RPC that supports get_transaction requests with commitment below confirmed? Currently, all the ones I tested only support confirmed upwards, but for my project I need to check how the transaction turned out as quickly as possible (preferably checking with commitment processed)

2 Answers 2

2

The ones I know for sure that support processed are: quicknode, helius, triton.

There are more though. Check them out here: https://solana.com/de/rpc

To listen to processed account changes you can do this:

export const connection = new Connection("rpcUrl", {
  commitment: "processed",
})

const subscriptionId = connection.onAccountChange(
      accountAddress,
      (accountInfo) => {
        const decoded = program.coder.accounts.decode(
          "gameDataAccount",
          accountInfo.data
        )
        console.log("New account data via socket processed", decoded.playerPosition)
      }
    )

Here is the rpc call docs for it: https://solana.com/de/docs/rpc/websocket/accountsubscribe

11
  • In my quicknode paid plan I can't get transaction with processed status.. Same thing with helius. Commented Jan 5 at 12:15
  • Maybe you need to request the blockhash with processed commitment for it to work.
    – Jonas H.
    Commented Jan 5 at 12:23
  • If you use js also set your connection to processed by adding : commitment: 'processed' as parameter when you create the connection
    – Jonas H.
    Commented Jan 5 at 12:25
  • I tried setting the client connection to processed as well, but I still get the error that getTransaction can only be processed at levels starting from confirmed Commented Jan 5 at 12:34
  • 1
    A few seconds after sending a transaction with sendTransaction, I try to check the transaction data with getTransaction, passing commitment="processed" as the parameter, as I would not like to wait until the transaction is confirmed to obtain the data. And I get the error below: InvalidParamsMessage { message: "Method does not support commitment below confirmed", } Commented Jan 5 at 14:25
2

getTransaction does not support returning processed transactions. This is due to how transactions are inserted into the blockstore only after being replayed by the network, and not when they are processed by the leader.

You can read more about it in this GitHub issue https://github.com/solana-labs/solana/issues/34663

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.