solana: getSignaturesForAddress returns nothing

Problem

Calling getSignaturesForAddress to any RPC for this address 6XWjMSt9uMKfJ3bp6778NgVjhxXWZuTw73dRZ4QQNd3S fails to return any signatures.

When viewing in solscan, or explorer.solana.com, the result is the same - there is no tx history. https://solscan.io/account/6XWjMSt9uMKfJ3bp6778NgVjhxXWZuTw73dRZ4QQNd3S https://explorer.solana.com/address/6XWjMSt9uMKfJ3bp6778NgVjhxXWZuTw73dRZ4QQNd3S

Try to fetch it yourself using the public RPC:

curl https://api.mainnet-beta.solana.com/ -X POST -H "Content-Type: application/json" -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignaturesForAddress",
    "params": [
      "6XWjMSt9uMKfJ3bp6778NgVjhxXWZuTw73dRZ4QQNd3S"
    ]
  }
'
...
{"jsonrpc":"2.0","result":[],"id":1}

I’ve noticed if you pass a limit argument it works, and only works up to "limit": 6 - not enough for this tokens full history.

curl https://api.mainnet-beta.solana.com/ -X POST -H "Content-Type: application/json" -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignaturesForAddress",
    "params": [
      "6XWjMSt9uMKfJ3bp6778NgVjhxXWZuTw73dRZ4QQNd3S",
      {
        "limit": 6
      }
    ]
  }
'
...
<expected output>

The 6th TX signature can be seen here and if I try to do an after filter it fails similarly, and an until filter works just like the "limit": 6

I’ve tested a quicknode, genesysgo, and the solana main net RPC. None of them work. This leads me to believe this is a systemic issue in Solana. It’s like the blockchain history is unquery-able. I’ve seen this for other mints and other tokens but I thought I was just insane and/or sleep deprived, however this isn’t a figment of my imagination and is presently seen here.

Proposed Solution

walking through the code I think things start going wrong here - at the very least, the signatures for this slot should’ve been queried from the db & included in the Ok(infos) https://github.com/solana-labs/solana/blob/dd338b6c9ff1f5f2975605e1c3a98a5bf5f1d435/ledger/src/blockstore.rs#L2497

additionally things start acting weirder ~20 lines down where the rest of the slots are looped over, either it’s not looping over them because slot > next_max_slot isn’t right, or it goes to iter over them but the db has nothing.

because of the aforementioned, the highest_slot argument may be wrong. without being able to debug and step through I can’t discern much more

also, the deprecated call from rpc.rs as a catch-all fails to return anything as well - it’s likely that the old and new get_confirmed_signatures_for_address suffer the same bug

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@CriesofCarrots yeah.

I think there’s still a very real issue with:

https://twitter.com/MoonRankNFT/status/1449179291237842944?s=20

But it’s not any of the above. Definitely an oversight in the ME contract.

If I see that one specifically again, I’ll open a new issue.

Thanks again for your attention to the original issue! 😃

@CriesofCarrots updated the comment. Apologies.

Thanks again for everything.

Hi!

We (MoonRank) are the originators of this issue and we’d love to provide any more info if needed.

We go through the transaction history of millions of tokens and have hit this issue numerous times – though it usually resolves itself at some point.

The token in question is still… broken for whatever reason.

Brian Long at Triton One said the following:

I think you might have uncovered a bug. In rpc.rs#1469, the search should go to BigTable to look for older signatures but it doesn't seem to get there.

Thanks!

cc @CriesofCarrots