The integrity of the data may be open to question

Hi guys! I am running the indexer on the mainnet. It’s been about 7 months since I started the indexer and I recently encountered a strange situation that is new to me. So I would like to seek some advice for the problem.

Qmd9nZKCH8UZU1pBzk7G8ECJr3jX3a2vAf3vowuTwFvrQg │ false  │ failed  │ "transaction a02da851060184211d2d5e34e945de2939aa15f1edaec1d8a1e9356b3f30cf87: Mapping aborted at src/mappings-erc-1155.ts, line 26, column 4, with no message\\twasm backtrace:\\t    0: 0x2994 - <unknown>!src/mappings-erc-1155/handleTransferBatch\\t    1: 0x2a3e - <unknown>!src/mapping-generic-erc1155/handleTransferBatchErc1155\\t in handler `handleTransferBatchErc1155` at block #15252477 (ebae89fe8523ea3a381a6fa719ead1f9f01b468e89d311102237b6acc278ba63)" │ index_node_0

I’m currently struggling with a subgraph called nft-oweners. My indexer has been stuck at block 15252477 for a few weeks with the error above. As I found, it was the subgraph code error.

export function handleTransferBatch (event: TransferBatch): void {
  if (event.params.ids.length != event.params.values.length) {
    throw new Error('Inconsistent arrays length in TransferBatch')
  }

  for (let i = 0; i < event.params.ids.length; i++) {
    let ids = event.params.ids
    let values = event.params.values
    transferBase(
      event.address,
      event.params.from,
      event.params.to,
      ids[i],
      values[i],
      event.block.timestamp
    )
  }
}

According to the source code, Inconsistent arrays length in TranferBatch error occurred. When I checked the transaction on the error, there was a TransferBatch event with 28 IDs and 34 Values. The number of values should be 28 according to the code, but there were eight 0 padding. So I assumed an error occurred because the subgraph could not map the values and was deterministic. Consequently, It seemed hard to avoid this error at that transaction, unless running the indexer with costumed binary or with a fixed subgraph code to pass that point.

* ids : 810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724
        810799751085213299059350324268365686251280281724

* values :1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          1000000000000000000
          0
          0
          0
          0
          0
          0

But we noticed a pretty interesting case here (snapshot on 8/22). Another indexer has succeeded in indexing without an error. So I tried to check if this indexer indexed that problematic transaction.

{
  nftOwners(
    block: {number: 15252477}
    where: {owner: "0x6A9c7836ab5da544981B6993CFBf5414cFE02DB1"}
  ) {
    id
    owner
    nft {
      tokenID
    }
  }
}

but it always showed this error. {'errors': [{'message': 'No suitable indexer found for subgraph deployment. Indexer queries attempted: 5'}]}

Because I thought the result has to be the same if everyone indexes the same ipfs subgraph with the same indexer binary, I was worried if the result is not deterministic, It could affect the credibility of the data on The graph. So I would like to discuss it and seek some advice from those who know about this problem. Thanks

ref

cc @adamfuller @alex-pakalniskis :eyes:

thanks @indexer_payne

@ybin can you confirm the subgraph you are referring to? Was the subgraph failure deterministic according to the subgraph status endpoint? That does indeed look like it should be a deterministic error based on the code, but the screenshot you shared is broken for me. Which indexer was indexing without an error, and did they close their allocation? The query error you shared suggests that there aren’t any indexers which have managed to index beyond that block, which is consistent with what you saw

Sorry, I saw this too late. it was nft-owner subgraph.

The allocation is now closed because some time has passed, but as you can see in the image, the graphtronauts-indexer was 100% successful in indexing. Also, I couldn’t close my allocation in the meantime.

And this is the image. (don’t know why but I kept failing to upload images to the forum)