wormhole-explorer/influx-backfiller
agodnic 3035c3e1f2
Update InfluxDB backfiller (#335)
### Summary

This pull request adds the source code from https://github.com/XLabs/influx-backfiller to this repository.

Also, several changes have been made to the InfluxDB backfiller:
* Stop using floats to store/manipulate price data, use decimals or integers instead.
* Update the volume metric to be in sync with the rest of the codebase.
* Remove duplicated code between the influx backfiller and analytics modules.
* Remove a fair amount of unused code
2023-05-23 11:27:23 -03:00
..
bin Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
cmd Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
coingecko Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
parser Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
prices Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
tokens Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
.gitignore Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
Makefile Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
README.md Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
common.go Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
go.mod Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
go.sum Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00
main.go Update InfluxDB backfiller (#335) 2023-05-23 11:27:23 -03:00

README.md

influx backfiller

Takes CSV file with VAAs as input, and generates a line protocol file for bulk loading into InfluxDB.

Usage

Run the program to generate InfluxDB dump files:

./influx-backfiller metrics vaa-count --input vaas-signed.csv --output vaa-count.csv
./influx-backfiller metrics vaa-volume --input vaas-signed.csv --output vaa-volume.csv

Then load the files into InfluxDB:

influx write --bucket wormhole-explorer --file vaa-count.csv
influx write --bucket wormhole-explorer --file vaa-volume.csv

Historic Prices

The prices file is generated with cmd/symbol_historic and uses the coingecko api to fetch daily prices for all supported symbols.

There is a compressed version of the file already generated called prices.csv.gz.