oasisprotocol / nexus

Official indexer for the Oasis Network.
Apache License 2.0
13 stars 4 forks source link

Inconsistent NFT counts in /accounts/oasis1 evm_balances vs /accounts/oasis1/nfts total_count #718

Open lukaw3d opened 1 week ago

lukaw3d commented 1 week ago

Based on Menguitah's message in discord support (https://discord.com/channels/748635004384313474/1250212886219849747) nexus is returning inconsistent NFT counts in /accounts/oasis1 evm_balances vs /accounts/oasis1/nfts total_count and it is more wrong on nexus.prd.oasis.io

Example 1

https://explorer.dev.oasis.io/mainnet/emerald/address/0x76B5FAF257bcBE6bAEA59Ef63b8cE6f0148f7dC0/tokens/erc-721#0x41E6Ed18daF1Ca527B2629A2cf820d1C01999681 1 OPunks (click View all) https://explorer.dev.oasis.io/mainnet/emerald/address/0x76B5FAF257bcBE6bAEA59Ef63b8cE6f0148f7dC0/tokens/erc-721/0x41E6Ed18daF1Ca527B2629A2cf820d1C01999681 Token has no inventory associated with it. :warning: 1 !== 0

maybe because: https://explorer.dev.oasis.io/mainnet/emerald/token/0x41E6Ed18daF1Ca527B2629A2cf820d1C01999681/instance/2556 Last transfer event: 0x7c950FDE7dD26Fe40896d93B8Fb7532B8ce5C45D -> 0x76B5FAF257bcBE6bAEA59Ef63b8cE6f0148f7dC0 :warning: Owner: 0x7c950FDE7dD26Fe40896d93B8Fb7532B8ce5C45D

Example 2

https://explorer.dev.oasis.io/mainnet/emerald/address/0x7bc8b1B5AbA4dF3Be9f9A32daE501214dC0E4f3f/tokens/erc-721#tokens 15 OPunks (click View all) https://explorer.dev.oasis.io/mainnet/emerald/address/0x7bc8b1B5AbA4dF3Be9f9A32daE501214dC0E4f3f/tokens/erc-721/0x41E6Ed18daF1Ca527B2629A2cf820d1C01999681 Oasis Punks (22) :warning: 15 !== 22

maybe because these instances display an Owner that doesn't match the latest transfer: https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/1062 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/2575 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/2925 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/3447 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/5108 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/7738 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/9706 https://explorer.dev.oasis.io/mainnet/emerald/token/oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh/instance/9713

Frontend is using nexus.stg.oasis.io. In nexus.prd.oasis.io it is worse: https://nexus.stg.oasis.io/v1/emerald/accounts/oasis1qq4hp3mfsp2vvfqlt35tn59h4cx08wyd2vlrpxx7/nfts?limit=15&offset=0&token_address=oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh total_count 22 https://nexus.prd.oasis.io/v1/emerald/accounts/oasis1qq4hp3mfsp2vvfqlt35tn59h4cx08wyd2vlrpxx7/nfts?limit=15&offset=0&token_address=oasis1qzn44787g3n5mcpgq5pcfvpd7h2hk4hqxcu8vfmh total_count 0

pro-wh commented 6 days ago

could this have been from fast sync?