listaccounts is non-deterministic, despite the docs indicating it likely should be #5960
-
I am hitting the following endpoint Given the results are sorted, I would have imagined that this endpoint would be deterministic? e.g. the same params (page=x, offset=y) always yield the same result. Before I dig deeper and open an issue, would a non-deterministic result be considered a bug here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thank you for rising this question. Indeed, addresses are sorted by the time of insertion . And indeed, on different runs of mentioned API endpoint the order of results is changing. And this non-determinism happens because some addresses has exactly the insertion timestamp:
This happens most likely because multiple addresses during indexing process are inserted in a single DB transaction. That prompts the thought that we need one more sorting parameter for this API endpoint. I will create a bug for that. Update: issue #6023 created. |
Beta Was this translation helpful? Give feedback.
Thank you for rising this question. Indeed, addresses are sorted by the time of insertion
blockscout/apps/explorer/lib/explorer/etherscan/addresses.ex
Line 21 in e303d72
This happens most likely because …