wormhole-explorer/analytic
agodnic 37d6d42c19
Remove duplicated code in token database (#356)
### Summary

Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/344

Before this pull request, there were two separate token databases (one being used by the InfluxDB backfiller, and another one in the `common/` module being used by the analytics service).

Having two different token databases resulted in inconsistencies, due to each of these databases containing different tokens.

This PR unifies those two databases into a single one, under the `common/` module.
2023-05-30 11:14:19 -03:00
..
cmd [API] Add 24h messages to `GET /api/v1/scorecards` (#326) 2023-05-18 11:14:36 -03:00
config [API] Add 24h messages to `GET /api/v1/scorecards` (#326) 2023-05-18 11:14:36 -03:00
consumer Generate volume metrics for unknown tokens (#348) 2023-05-29 10:54:09 -03:00
http/infrastructure Feataure/add analytic component (#164) 2023-02-28 17:58:26 -03:00
metric Remove duplicated code in token database (#356) 2023-05-30 11:14:19 -03:00
queue [API] Add 24h messages to `GET /api/v1/scorecards` (#326) 2023-05-18 11:14:36 -03:00
scripts Generate volume metrics for unknown tokens (#348) 2023-05-29 10:54:09 -03:00
.env.example Feataure/add analytic component (#164) 2023-02-28 17:58:26 -03:00
.gitignore Add 24h volume to scorecards (#274) 2023-05-04 20:17:03 -03:00
Dockerfile [API/PARSER] Chain activity and last transaction endpoints (#175) 2023-03-07 16:25:42 -03:00
Makefile Feataure/add analytic component (#164) 2023-02-28 17:58:26 -03:00
README.md Feataure/add analytic component (#164) 2023-02-28 17:58:26 -03:00
go.mod Add backfiller command to process vaa saved in database (#349) 2023-05-24 16:52:22 -03:00
go.sum Add backfiller command to process vaa saved in database (#349) 2023-05-24 16:52:22 -03:00

README.md

Config sns topic

aws --profile localstack --endpoint-url=http://localhost:4566 sns create-topic --name vaas-pipeline.fifo --attributes FifoTopic=true,ContentBasedDeduplication=false

Config SQS FIFO with dead letter queue localstack

aws --profile localstack --endpoint-url=http://localhost:4566 sqs create-queue --queue-name=wormhole-vaa-analytic-dlq-queue.fifo --attributes "FifoQueue=true"

aws --profile localstack --endpoint-url=http://localhost:4566 sqs create-queue --queue-name=wormhole-vaa-analytic-queue.fifo --attributes FifoQueue=true,MessageRetentionPeriod=3600,ReceiveMessageWaitTimeSeconds=5,VisibilityTimeout=20,RedrivePolicy=""{\"deadLetterTargetArn\":\"arn:aws:sqs:us-east-1:000000000000:wormhole-vaa-analytic-dlq-queue.fifo\",\"maxReceiveCount\":\"2\"}""

Subscribe SQS FIFO to vaas-pipeline.fifo topic

aws --profile localstack --endpoint-url=http://localhost:4566 sns subscribe --topic-arn arn:aws:sns:us-east-1:000000000000:vaas-pipeline.fifo --protocol sqs --notification-endpoint http://localhost:4566/000000000000/wormhole-vaa-analytic-queue.fifo

Check message in the dead letter queue localstack

aws --profile localstack --endpoint-url=http://localhost:4566 sqs receive-message --queue-url=http://localhost:4566/000000000000/wormhole-vaa-analytic-dlq-queue.fifo