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

Querying the transactions GQL endpoint using `from` or `to` attribute should use an index #863

Closed trevorbernard closed 5 months ago

trevorbernard commented 6 months ago

Create two new indices for the sender and receiver portion of the transaction. This will look something like the following:

fromCF: {send_pk}{global_slot}{txn_hash} -> amount
toCF:   {recv_pk}{global_slot}{txn_hash} -> amount

So this allows us to use a prefix iterator on either the sender or receiver and have the transactions sorted by global slot height.

trevorbernard commented 5 months ago

This issue blocks: https://github.com/Granola-Team/mina-indexer/issues/873