mirror of
https://github.com/luxfi/graph.git
synced 2026-09-24 00:26:07 +00:00
84d71e5a9897291fb331e9a979a2dac9266a5f9c
A pass values a bounded slice of the swap table, newest first, because the table grows forever and rescanning it would cost more every day the chain lives. That bound is right for the pass and wrong for the field the wire calls total volume: totalling a window answers for the newest trades only. On the Lux C-Chain, with a million swaps behind it, the protocol reported the last twelve percent of its trading and called it everything. The day series already holds each day's volume, written once by the pass that saw that day and kept since. Their sum is the whole history at the cost of reading a row per day, and it grows correctly as days accrue rather than sliding forward and losing the past. The window is untouched; only what is claimed of it changes. The test gives the store three days and a window that would cover one. Co-authored-by: Hanzo Dev <[email protected]>
Description
Single-binary GraphQL query layer for Lux blockchain — replaces The Graph's Graph Node
27 MiB
Languages
Go
99.9%
Dockerfile
0.1%