dfuse-eosio icon indicating copy to clipboard operation
dfuse-eosio copied to clipboard

broken cursor on stale block

Open GassaFM opened this issue 3 years ago • 1 comments

Minified example of query:

{
  searchTransactionsForward(query: "account:a.rplanet action:discover", limit: 1, cursor: "zfwxq6wTd9k1hNVH-fQ93Pe7JZQwBFJuXQPkIBFG1I7wpHPM2sz3U2JwORzXxqn4i0S5H1_93YqbFit89sEE6YDqxbw1uHM_QXl9ktvo-bzuevXwMVlNebJnXO-EYdzcD2mBZAr4LuUE", irreversibleOnly: false) {
    results {
      cursor
      trace {
        block {
          timestamp
        }
        id
      }
    }
  }
}

Current response:

{
  "data": {
    "searchTransactionsForward": {
      "results": [
        {
          "cursor": "zfwxq6wTd9k1hNVH-fQ93Pe7JZQwBFJuXQPkIBFG1I7wpHPM2sz3U2JwORzXxqn4i0S5H1_93YqbFit89sEE6YDqxbw1uHM_QXl9ktvo-bzuevXwMVlNebJnXO-EYdzcD2mBZAr4LuUE",
          "trace": {
            "block": {
              "timestamp": "2021-07-06T15:00:04Z"
            },
            "id": "347def603dd4adb2d24e19b5df8fcb4233f1b1f6d995832be369468200eb26bf"
          }
        },
        {
          "cursor": "gXHQadTEjkI2RlDJ9Gubh_e7JZY8B1ttVA_lIBtG0Izx8yCQ28nzAzQ=",
          "trace": {
            "block": {
              "timestamp": "2021-02-16T16:30:21.5Z"
            },
            "id": "7e773be6de3e503eaf87bd2eb6fadbeb438552e446f5349c40e4e954a2a1c987"
          }
        }
      ]
    }
  }
}

See how the first result is 2021-07-06, but the second one is 2021-02-16, the very first such transaction.

The block from this decoded cursor is marked as stale: https://wax.eosq.eosnation.io/block/07a56d197aac35a17f08fabd5a3ef2e741dea064aeb772a1b62812628cf89535

Originated as a discussion in dfuse-ce group on Telegram: https://t.me/dfusece/3135

GassaFM avatar Jul 09 '21 12:07 GassaFM

Additionally, with limit: 1 it acts the same as with limit: 2, giving two results instead of one.

GassaFM avatar Jul 09 '21 12:07 GassaFM