graphprotocol / graphprotocol/graph-network-subgraph
Epoch entity endBlock overlaps startBlock of next epoch
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
Issue
Epoch endBlock should be one block before startBlock of next Epoch to avoid overlapping.
Solution
This can be fixed by calculating endBlock = startBlock + epochLength - 1
Current Behaviour
By querying the endpoint https://gateway.testnet.thegraph.com/network you get these results.
Query
query MyQuery {
epoches(orderBy:"startBlock", orderDirection: "desc") {
id
endBlock
startBlock
}
}
Result
{
"data": {
"epoches": [
{
"endBlock": 8366425,
"id": "719",
"startBlock": 8366148
},
{
"endBlock": 8366148,
"id": "718",
"startBlock": 8365871
},
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file or test. Start by reproducing the epoch query at the listed gateway endpoint, then locate where epoch endBlock is calculated; done when adjacent epochs no longer share a boundary and the query shows each endBlock one block before the next startBlock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100