Commit Graph

39 Commits

Author SHA1 Message Date
Mariano ce1b7707fb
[WORMSCAN-API-1225] Add new endpoint for fetching x-chain-activity tops data (#1342)
* add 2 new tasks for collecting chain activity every day and hour

* making progress

* change query 2

* add query by month and year

* changes on task

* more changes

* change to 1d

* add 1d

* fix query

* adjust queryies

* change the way the query is executed

* changes on query

* making more progress

* fix per year query

* add a second group of tasks for downsampling

* add app_id

* update swagger docs

* optimize new tasks

* fix W

* fix W

* start using the new measurement

* change endpoint signature

* update endpoint name

* fix indents

* code review changes

* remove unnecessary break
2024-04-26 15:03:02 -03:00
ftocal 9d280f7d5f
Add W token for ethereum, arbitrum, optimism and base (#1358)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-04-25 17:06:14 -03:00
ftocal 688a0d0f71
Store duplicate vaas on a secondary collection (#1308)
* Add support to scroll in tx-tracker

* Handle duplicated vaa in fly

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Modify tx-tracker and pipeline to support duplicated vaas
Co-authored-by: ftocal <fert1335@gmail.com>

* Add isDuplicated flag in vaas and operations endpoints
Add new endpoint to find duplicated vaas by vaa id
Co-authored-by: walker-16 <agpazos85@gmail.com>

* Add metrics for duplicated vaas

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Update node dependencies in spy

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Fix promethes metrics for missing tx-hash in tx-tracker

Co-authored-by: walker-16 <agpazos85@gmail.com>

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2024-04-22 14:26:07 -03:00
ftocal f4390b8436
Handle unproccessable response from vaa-payload-parser (#1250)
Add retry in analytics metrics

Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-26 11:53:11 -03:00
ftocal adb7231074
Add processed message metrics in pipeline components (#1239)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-25 15:21:10 -03:00
walker-16 e843100678
Add processed metrics to analytics component (#1237)
Co-authored-by: ftocal <fert1335@gmail.com>
2024-03-22 11:30:21 -03:00
ftocal 83a64b758a
Ignore vaa older than 30 days for vaa_count metric (#1212) 2024-03-12 12:21:13 -03:00
Mariano 4009482dcc
[ISSUE-1089] Collect CCTP - Metrics (#1165)
Add cctp and portal_token_bridge stats to protocols-stats endpoint

changes

 indent

more changes on the script

 new working approach on influx task

 indent script

 tested insert

 add 2 versions of the script

multiple changes

 add 1day task

 add logic to retrieve internal protocols

 remove unecessary code

 readd empty script

fix  unit-tests and measurement namings

 fix queries

 fix alignment

rename function task

fix names

improvements on influx task

 add .run config to gitignore

add .run to gitignore

fix task and rename

working api

 multiple things

Delete .run/wormscan api.run.xml

Delete analytics/scripts/test_query.flux

wip

 multiple fixes

 fix test

wip

 fix queries

fix unit-test due to query changes
2024-03-11 17:33:36 -03:00
ftocal 08c9427606
Fix parsedPayload use as any type for different kind of messages (#1169)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-04 16:49:54 -03:00
ftocal 3dba12b1f5
Fix aws-sdk dependencies (#1162)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-02-28 16:33:30 -03:00
ftocal a882355c05
Add transfer prices backfiller in analytics (#1153)
* Add transfer prices backfiller in analytics
Save notional prices in s3 bucket

* Code review updates
2024-02-27 15:17:59 -03:00
ftocal d8aeb72cb6
Fix token address from native token address in vaa-payload-parser response (#1066)
Update supported tokens

Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-02-01 11:26:51 -03:00
ftocal e63a7a12e4
Add top-100-corridors endpoint (#1065)
Improve handling token in volume metrics
2024-01-30 15:27:48 -03:00
ftocal d3c1c52b79
Add support to sepolia chains (#1001)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-01-22 11:01:18 -03:00
walker-16 9cb5769c06
Update wormhole sdk to version v0.0.0-20240109172745-cc0cd9fc5229 in … (#998)
Update wormhole sdk to version v0.0.0-20240109172745-cc0cd9fc5229 in all the components
2024-01-17 12:36:54 -03:00
ftocal 27bf188149
Delete unhandled messages from sqs (#987)
Add more log
2024-01-15 14:11:41 -03:00
ftocal e21b836455
Add handler for redeem events from blockchain-watcher (#986) 2024-01-15 10:22:05 -03:00
ftocal 798da44152
Fix use correct date to obtain prices (#983)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-01-12 12:32:31 -03:00
ftocal d7391f6ba1
Create api notional with historical prices (#931)
Add historical prices job
Change transfer report job
2024-01-02 10:38:03 -03:00
ftocal cff86e4469
Add top-symbols-by-volume endpoint and influx tasks (#887) 2023-12-11 14:32:25 -03:00
ftocal 695fd0dcd4
Add supported tokens for testnet (#810)
Update supported tokens for mainnet
2023-11-28 10:16:40 -03:00
ftocal 7c467f5267
Integrating blockchain watcher data into mongodb (#820)
* Handle log-message-published generated by blockchain-watcher in parser, tx-tracker y analytics

* Add deployment for staging-testnet environment
Improve logs

* Add operation endpoints

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2023-11-27 12:31:35 -03:00
ftocal 6be2607c65
Fix vaa_volume measurement in analytics and api queries (#719)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-10-02 11:21:13 -03:00
ftocal 22c5f0ee22
Get token and app id from vaa payload parser to calculate price and volume measurement (#708) 2023-09-25 16:56:05 -03:00
walker-16 217c6f28be
Fix [api] get transactions by address and add mongo query monitor (#707)
Fix api endpoint get transactions by address, add mongo query monitor
2023-09-25 16:50:16 -03:00
ftocal 420d342612
Use token id as unique key in cache for prices (#701)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-09-22 16:14:02 -03:00
agodnic 3c7bab3f8a
Remove duplicated code: MongoDB connection handling (#590)
### Description

This pull request removes duplicated code related to MongoDB connection/disconnection attempts. This code was copied across all 8 microservices.

The functionality is now unified under the `common/dbutil` package.
2023-08-07 16:05:08 -03:00
ftocal 13819e2d7d
Add backfiller for analytics from mongodb (#562) 2023-07-25 15:36:05 -03:00
agodnic 3c8b28d69f
Fix inconsistencies in analytics-related endpoints (#557)
### Description

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

This pull request fixes an inconsistency between the endpoints `GET /api/v1/x-chain-activity` and `GET /api/v1/top-chain-pairs-by-num-transfers`.

The inconsistency arose because the endpoints computed the data in slightly different ways.

It was resolved by modifying the `GET /api/v1/top-chain-pairs-by-num-transfers` endpoint to use the same data source as `GET /api/v1/x-chain-activity`.
2023-07-19 15:03:43 -03:00
walker-16 1e5aeedfd9
Fix notional error with coingecko and add endpoint to push metrics in… (#551)
Fix notional error with coingecko and add endpoint to push metrics in analytics
Co-authored-by: ftocal <fert1335@gmail.com>
2023-07-18 11:33:17 -03:00
ftocal c3d418a084
Add prometheus metrics in analytics (#488) 2023-07-03 11:51:20 -03:00
gipsh 78bd0cbd75
add prefix to chacheable and fix deploy (#479) 2023-06-29 15:54:45 -03:00
gipsh 32e67a5824
Use new custom storage for redis (#425)
* allow prefix for redis keys on rate limiter

* use storage module from lib

---------

Co-authored-by: Hernan Gips <hernangips@OnoSendai.local>
2023-06-20 12:25:04 -03:00
ftocal 69885aed0c
Fix intermittent failure in x-chain-activity endpoint (#420)
* Replace start_time and end_time query parameters with fixed ranges at the endpoint of the chain activity
Add InfluxDB tasks for enpdoint chain-activity for each timeSpan
Add cache for chain-activity endpoint

* Code review updates
2023-06-20 10:34:20 -03:00
ftocal 444c185f38
Ignore metric when emitter or destination chains are unset (#390) 2023-06-08 13:03:15 -03:00
agodnic 598db1b876
Persist symbol and price for VAAs (#384)
### Description

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

This pull request modifies the analytics service so that it persists price information for a VAA in MongoDB. Data is stored only for token bridge VAAs, and only if the price is cached for the symbol being used.

A new collection `transferPrices` has been created, with the following document model:
```
{
  "_id": "22/0000000000000000000000000000000000000000000000000000000000000001/18087",
  "price": "0.999684",
  "symbol": "USDC",
  "timestamp": 2023-06-06T14:04:47.000+00:00
  "tokenAmount": "0.1",
  "usdAmount": "0.0999684"
}
```
2023-06-07 12:18:38 -03:00
ftocal ec95642a9b
Fix vaa-count metric backfiller and Influx query for x-chain-activity endpoint (#382)
Fix vaa-count metric backfiller
Fix Influx query for x-chain-activity endpoint
2023-06-05 16:33:52 -03:00
agodnic 2a3e2f7f0b
Add log messages on analytics service startup (#368)
### Summary

Often times, the analytics service fails to start due to connectivity issues with other services (specifically redis).

Previously, no log information was being emitted, which made it hard to troubleshoot the exact reason for the service failing to start.

This pull request adds log messages when the service starts to make those cases easier to debug.
2023-06-01 17:02:50 -03:00
ftocal 112ad51c69
Fix and refactor of analytics (#376)
Fix vaa-volume metric backfiller
Rename analytic to analytics
Move influx-backfiller as part of analytics
2023-06-01 16:32:00 -03:00