graphprotocol / graphprotocol/graph-network-subgraph

Epoch and Blocknumber gives false information

Open
#270 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
82
Forks
47
PR merge metrics
No merged PRs in 30d

Description

I ran this query
https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-sepolia/graphql?query=query+MyQuery+%7B%0A++allocations%28where%3A+%7Bid%3A+%220x9b83a26cf9866c4832572325bfdbe9c15c383142%22%7D%29+%7B%0A++++id%0A++++closedAt%0A++++status%0A++++createdAtBlockNumber%0A++++closedAtBlockNumber%0A++++closedAtEpoch%0A++%7D%0A%7D

Which returned this data:

{
  "data": {
    "allocations": [
      {
        "id": "0x9b83a26cf9866c4832572325bfdbe9c15c383142",
        "closedAt": 1712870496,
        "status": "Closed",
        "createdAtBlockNumber": 5635607,
        "closedAtBlockNumber": 5677434,
        "closedAtEpoch": 2208
      }
    ]
  }
}

This is weird since if you go look up for that block number
https://sepolia.arbiscan.io/txs?block=5677434
This tx wont appear there, and its no where to be found

The real txn block can be found here (tho dont ask em which one is it cause I couldn't figure out which one of the multicall txns it correspond to )
https://sepolia.arbiscan.io/address/0x1007f1E9c2271e7d44C04aFA56239150D3a546dA

Also in the same boat as this if you can see epoch it was closed at is 2208
And if you look for latest epoch it is also 2208

In theory it should have advanced since I closed the allocation
As it should advance with those kind of transactions

I also opened an allocation after closing that one, which should have made the epoch advance too

{
  "data": {
    "allocations": [
      {
        "id": "0x2345cd0b8b6937fa88ca9e67a1f52b432f1976a8",
        "closedAt": null,
        "status": "Active",
        "createdAtBlockNumber": 5682784,
        "closedAtBlockNumber": null,
        "closedAtEpoch": null,
        "createdAt": 1712935475
      }
    ]
  }
}

This allocation was opened after closing that one, you can see this by checking the createdAt timestamp which is after the closedAtTimestamp from the other allocation

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the allocation queries in the issue and compare createdAtBlockNumber, closedAtBlockNumber, and epoch values with the linked Arbiscan records and allocation timestamps. Trace how these fields are indexed in this subgraph; done means the queried block and epoch values accurately reflect the corresponding on-chain allocation events.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
backend, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.