Granola-Team / mina-indexer

The Mina Indexer is a re-imagined version of the software collectively called the "Mina archive node."
Apache License 2.0
19 stars 10 forks source link

Problem: best tip should be returned by this query #1016

Closed Isaac-DeFrain closed 5 months ago

Isaac-DeFrain commented 5 months ago
{
  blocks(limit: 1) {
    stateHash
    blockHeight
    protocolState {
      previousStateHash
    }
    canonical

  }
}
Isaac-DeFrain commented 5 months ago

Returns

{
  "data": {
    "blocks": [
      {
        "stateHash": "3NLSHv2xNnaKgrRmd6yuT9TE3M81qVN1w2NGs8wytHjdBNTSF4MK",
        "blockHeight": 9953,
        "protocolState": {
          "previousStateHash": "3NKHBXudXT8fXihJBZvuiN1rn5j2U5uH3tdh4xCZwSc9dpn3hfUc"
        },
        "canonical": false
      }
    ]
  }
}
Isaac-DeFrain commented 5 months ago

@trevorbernard this issue isn't correct but there's definitely a bug here

Isaac-DeFrain commented 5 months ago
{
  blocks(limit: 1, query: {canonical: true}) {
    stateHash
    blockHeight
    protocolState {
      previousStateHash
    }
    canonical

  }
}

does return the best tip 🎉

robinbb commented 5 months ago

@trevorbernard this issue isn't correct but there's definitely a bug here

So, this issue is closed, but is the bug tracked in another issue, @Isaac-DeFrain ?

trevorbernard commented 5 months ago

It was resolved in this PR: https://github.com/Granola-Team/mina-indexer/pull/1041