Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epoch entity endBlock overlaps startBlock of next epoch #106

Open
abarmat opened this issue Apr 6, 2021 · 0 comments
Open

Epoch entity endBlock overlaps startBlock of next epoch #106

abarmat opened this issue Apr 6, 2021 · 0 comments

Comments

@abarmat
Copy link
Collaborator

abarmat commented Apr 6, 2021

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
      },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant