Open turbocrime opened 3 days ago
I experimented with this issue today. Unfortunately it looks like this is impossible given current idb schema constraints
But, the index is also a string which sorts in lexical order, because the height in database is a jsonified bigint.
The situation is improved but still clearly incorrect.
https://github.com/penumbra-zone/web/assets/134443988/e9960065-07b5-4b07-9981-65d6f5b37770
if idb schema used real types instead of stringifying everything, many operations like this would be more sane and just work as expected.
if the string key bounds are interpreted lexically instead of numerically, it may not even be possible to achieve numeric ranges with idb key bounds. this could create problems long term.
On the minifront transactions table, transaction info is streamed to the page.
They populate in essentially random order: they stream in lexical order of their key, which is a base64 encoding of their transaction hash.
Ideally, the most recent transactions known would populate first, and earlier transactions would load as the user scrolls down the page.