sui icon indicating copy to clipboard operation
sui copied to clipboard

[GraphQL] - Testnet graphql is providing old responses

Open chfarmdev opened this issue 1 year ago • 3 comments
trafficstars

Steps to Reproduce Issue

All of my gql queries have been posting old data. I've tested both within my game UI and https://sui-testnet.mystenlabs.com/graphql Balances, coin objects, and some specific NFT data are all stale. It's been broken for at least a day. I dropped a message in dev-discussion discord about a day ago when initially noted. One example below.

{ address(address: "0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed") { balance { coinObjectCount totalBalance }
} }

Expected Result

Current SUI balance on that wallet is 47.56, confirmed in wallet and on SuiScan

https://suiscan.xyz/testnet/account/0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed

Actual Result

{ "data": { "address": { "balance": { "coinObjectCount": 1, "totalBalance": "51585599344" } } } }

System Information

Thanks!

chfarmdev avatar May 16 '24 20:05 chfarmdev

Thanks for your report @chfarmdev. We are aware of the issue and we've already taken actions to remediate it. Everything should be back to normal shortly.

stefan-mysten avatar May 16 '24 20:05 stefan-mysten

@stefan-mysten Any updates? GraphQL appears to still not be functioning properly returning the same stale data. Is the fix waiting on next version in testnet or did the prior fix not work?

Thanks!

chfarmdev avatar May 19 '24 02:05 chfarmdev

@chfarmdev this was an issue related to the indexer DB, which we fixed and should have been fine by now. I pinged one of my colleagues and will post here when I have an update. Apologies for the inconvenience.

stefan-mysten avatar May 19 '24 05:05 stefan-mysten

This should now be fixed.

{
  "data": {
    "checkpoint": {
      "sequenceNumber": 38189304,
      "timestamp": "2024-05-20T22:51:19.026Z"
    }
  }
}

stefan-mysten avatar May 20 '24 22:05 stefan-mysten

@stefan-mysten Thanks, the SUI balance does look correct however my other types are definitely not accurate still. Is there still further catchup to be completed for the indexer?

Shows 12 Warlord NFTs on SuiScan https://suiscan.xyz/testnet/account/0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed 0xaccb4a10ab5b5761393fcb9901d21eb1e4978864f7a53526600ff1f39faee5ea::warlord::SuiWarlordNFT

GraphQL returns 29 entities for my account and the SuiWarlordNFT type. Using below query. address - 0x2a5406dff77a774786b733d62f994b8ce0df27a603a6087681458f3f977c70ed type - 0xaccb4a10ab5b5761393fcb9901d21eb1e4978864f7a53526600ff1f39faee5ea::warlord::SuiWarlordNFT

export const getWarlords = gql

query getWarlords( $address: String!,
$type: String! $cursor: String, ) { address(address: $address) { objects(after: $cursor, first:10, filter: { type: $type } ) { pageInfo{ hasNextPage endCursor } nodes { contents{ data
} } } } } ;

Probably also worth noting that GraphQL is not returning newly minted Warlords. This looks like state from several weeks ago before I wrote my burn module and converted many of these NFT's into Soul Gems.

Also data is wrong on my "Time COIN"

0xaccb4a10ab5b5761393fcb9901d21eb1e4978864f7a53526600ff1f39faee5ea::time::TIME

Should be returning 2 objects for 959 TIME but gql is responding with 7 objects for 1378 total.

export const allBalances = gql query allBalances($address: String!, $type: String!) { address(address: $address) { balance(type: $type) { coinObjectCount totalBalance }
} } ;

Is that expected behavior? Should I just redeploy my package/app and start with fresh data?

chfarmdev avatar May 22 '24 22:05 chfarmdev