Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to get near protocol transaction status via RPC

Tags:

nearprotocol

Given a transaction https://explorer.near.org/transactions/JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ

When I query NEAR rpc:

http post https://rpc.mainnet.near.org jsonrpc=2.0 method=tx params:='["JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ","wasmgit.near"]' id=dontcare

Then I expect to get the transaction status

Instead I get the following response:

{
    "error": {
        "code": -32000,
        "data": "Transaction JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ doesn't exist",
        "message": "Server error"
    },
    "id": "dontcare",
    "jsonrpc": "2.0"
}
like image 629
Peter Salomonsen Avatar asked Sep 05 '25 03:09

Peter Salomonsen


1 Answers

source: https://docs.near.org/docs/api/rpc#setup

Querying historical data (older than 5 epochs or ~2.5 days), you may get responses that the data is not available anymore. In that case, archival RPC nodes will come to your rescue:

  • mainnet https://archival-rpc.mainnet.near.org
  • testnet https://archival-rpc.testnet.near.org

You can see this interface defined in nearcore here.

via near-cli

near --nodeUrl https://archival-rpc.mainnet.near.org \
tx-status JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ \
--accountId wasmgit.near

via http

http post https://archival-rpc.mainnet.near.org \
jsonrpc=2.0 method=tx \
params:='["JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ","wasmgit.near"]' \
id=dontcare
like image 69
ilyar Avatar answered Sep 08 '25 01:09

ilyar