Commit Graph

67 Commits

Author SHA1 Message Date
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
walker-16 8dc2b5ac5f
Normalize txHash destination in tx-tracker component (#1274)
Co-authored-by: ftocal <fert1335@gmail.com>
2024-04-08 14:05:48 -03:00
walker-16 04da0b3e4d
Add wormchain injective integration (#1260)
* Add wormchain injective integration

* Add metrics and logger for unknown wormchain

* Add wormchain rpc config
Co-authored-by: ftocal <fert1335@gmail.com>

* Add evmos, kujira, osmosis to wormchainRpcProviders
Co-authored-by: ftocal <fert1335@gmail.com>

* Add backfiller for tx-tracker with emitterChainId, emitterAddress and range time parameters

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

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2024-04-05 15:24:21 -03:00
ftocal 3d60517757
Update list of available tokens (#1269)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-04-02 15:56:34 -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 b19bc16dfb
Update list of available tokens (#1246)
* Update list of available tokens

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

* Handle too many requests in notional jobs

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-25 15:17:26 -03:00
walker-16 bc3110f3d4
Modify intialize to support fallback url and rate limit (#1093)
* Modify intialize to support fallback url and rate limit

* Add fallback and rate limit config for all the chains

* remove unused WormchainTxDetail struct

* Add pool of items to common

* Add rpc pool to tx-tracker

* Rename chain url to baseUrl

* add fallback to wormchain chains

* update tx-tracker fetchone to use rpc pool

* Modify backfiller to use rpc pool

* fix merge to main run files

* Add rpc pool to controller

* remove comments

* fix pool sort function

* Add rpc pool to all the chains

* Fix algorand, aptos, sui integrations

* Fix pool solana

* remove api_sei3 old implementation

* Add metrics to get success/error rpc call

* Add rpc field in call rpc metric

* Fix common go.mod and remove unused if condition

* Update go.mod tx-tracker

* Create rpc count prometheus metrics

* Add fallback to insert originTx if rcp fail

* Check if the transaction doesn't exists

* Modify in tx-tracker already processed method

* fix wormchain rpc

* Add rpc settings as json file

* Enable overwrite to stress test

* Add rpc provider as k8s secret

* Add metrics to get vaa retry processing
Co-authored-by: ftocal fert1335@gmail.com

* Add worker pool in consumer for tx-tracker

* fix config by env

* Set consumer workers in 1

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2024-03-19 15:47:43 -03:00
Mariano faa8e38b2e
[ISSUE-1213] Refactor of top-contributors stats and activity job (#1215)
* start refactor of stats and activity job

 change approach for collecting stats and activity metrics

 multiple stuff

fix unfinished merging conflicts

 changes

 update

Delete .run/wormhole-explorer-api.run.xml

 add unit-tesdt

 add unit-test for mayan and allbrdige

add protocols-stats-1h job

 add new job

 change stats query

fix query

 start refactor of stats and activity job

 change approach for collecting stats and activity metrics

 multiple stuff

fix unfinished merging conflicts

 changes

 update

Delete .run/wormhole-explorer-api.run.xml

 add unit-tesdt

 add unit-test for mayan and allbrdige

add protocols-stats-1h job

 add new job

 change stats query

fix query

* remove temp backfiller

* fix unit-tests

* remove useless dbconsts

* remove useless consts

* fix some renaming

* fix unit-tests

* fix tvl portal_token_bridge
2024-03-18 10:21:42 -03:00
ftocal a6cbcc7c55
Add backfiller for pipeline (#1221) 2024-03-15 16:44:24 -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
Mariano 6bbfa7bf23
Add cache to protocols stats endpoints (/protocols/stats) (#1149)
* add cache to protocols stats endpoint

 add mock for cache

add unit test case for cache miss

 change from to current

* add configs

* add missing config for api-service.yaml

* add cache ttl for staging-mainnet
2024-03-04 15:55:53 -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
Mariano 175abbb11a
[Issue:1052] Create job for fetching contributor stats and storing in db (#1144)
* [Issue:1052] Create job for fetching contributor stats and storing in db

revert unnecessary changes on api/handlers/stats

revert changes in go.mod and go.sum

revert change in go.work

add schedule for contributors stats job

change response parsing order

changes due to draft-pr review

 move on with contributors activity implementation

change to every hour

fix typo

 change contributor stats implementation to do a single write transaction

 normalize to UTC contributors activity timestamp

 add cronjob schedule for contributors

[Issue:1052][Part 2] Create endpoint to expose contributors stats and activities  (#1123)

* add endpoint for retrieving stats and activity

* remove model.go file and move types to service file

* add unit tests to contributors service

* integrate new contributors controller

* fix more stuff

 fix unit-tests

 changes due to pr review

 fix query

 fix unit-tests

fix total_value_secure

 move constantes to common pkg

remove extra changes

rename contributor to protocols

 finish renames

Changes for deployment

adjust different response types from different protocols contributors

 fix controller test

 big refactor in activty job and stats job since protocols are returning different formats

api responding fine

 remove uneccessary generics

 target dbconsts

 fix

Delete deploy/common/env/staging-mainnet.env

undo unwanted changes

 readd staging-mainnet.env

 fix unit-tests

add missing protocols_stats/activity_version

 remove property protocols_json

fix JOB_ID env var in protocols-activity.yaml

fix typos in env vars configs

 change tu numbers

 changes due to own review

 add new line

* add swagger docs
2024-02-22 14:58:45 -03:00
ftocal 7d5a3bbe52
Improve fly reliability (#1094)
Add sqs queue for observations
Add tx hash strategy for vaas
Refactoring to organize the construction
2024-02-06 21:00:45 -03:00
ftocal c4707fbb69
Fix vaa parse endpoint (#1078) 2024-02-01 12:01:24 -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
walker-16 fb0573c160
migrate vaa to globaltransaction origintx (#940)
* migrate vaa to globaltransaction origintx

* Add deploy configuration for job to migrate vaas to originTx

* Add option to run migration process by range of date

* Update go dependencies for jobs

* Fix kind of job in deployment

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2024-01-30 12:19:31 -03:00
ftocal 49f9bedd29
Handle transfer-redeemed event from blockchain-watcher (#1039) 2024-01-24 14:51:04 -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 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 af5bd3017f
Handle native tx hash for solana when receive event from blockchain-watcher (#851) 2023-12-04 16:29:38 -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 28fc5198b0
New job for transfer report (#756)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-10-20 18:30:34 -03:00
ftocal 91bf42971b
Use Redis channel in spy and fly (#753) 2023-10-18 11:18:32 -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
gipsh 3fa1804c1a
add redis prefix to communication channel (#651) 2023-08-22 15:24:14 -03:00
agodnic 2de5b9e970
Update token database (#620)
### Summary

Update definitions in the token dictionary.
2023-08-10 11:18:58 -03:00
walker-16 87fd9d15ef
Create an api endpoint to call vaa payload parser component (#596)
* move vaa payload parser to common

* Add proxy endpoint to vaa payload parser

* Modify api deployment

* fix docs

* Fix swagger documentation
2023-08-10 11:02:14 -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
agodnic d267d3ae1f
Transaction search by address: fix case sensitivity (#591)
### Description

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

The endpoint `GET /api/v1/transactions?address={addr}` was incorrectly handling EVM addresses containing uppercase characters. This pull request fixes the issue.
2023-07-28 12:27:48 -03:00
ftocal 13819e2d7d
Add backfiller for analytics from mongodb (#562) 2023-07-25 15:36:05 -03:00
agodnic 4ee9abe91e
Exclude invalid chain IDs from top chain pairs (#574)
### Description

Tracking issues: https://github.com/wormhole-foundation/wormhole-explorer/issues/572, https://github.com/wormhole-foundation/wormhole-explorer/issues/573

This pull request fixes an issue in which the endpoint `GET /api/v1/top-chain-pairs-by-num-transfers` was returning invalid chain IDs for testnet.
2023-07-24 09:20:01 -03:00
agodnic d8bb9c46f6
`tx-tracker`: add support for the "Base" blockchain (#568)
### Description

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

This pull request adds support for the "Base" blockchain in different parts of the codebase:
* The functions `domain.TranslateEmitterAddress`, `domain.EncodeTrxHashByChainID` and `domain.DecodeNativeAddressToHex`.
* The `tx-tracker` service: it now connects to a Base RPC node to fetch origin transaction metadata.
2023-07-20 16:37:21 -03:00
walker-16 4f1987c698
514 modify parser to support new vaa payload parser response (#521)
Parse amount from metadata fields
Modify parser client to ParseWithMetadata
Add support to new vaa payload parser parse endpoint

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2023-07-12 12:51:17 -03:00
walker-16 c4a55bd6e2
Fix alert prefix with new enviroment values (#509) 2023-07-06 11:20:18 -03:00
ftocal 34b8ab392f
[contract-watcher] Add opsgenie alerts and prometheus metrics (#472)
* Add prometheus metrics to contract-watcher

* Add annotations for prometheus

* Add alerts for contract-watcher
2023-06-30 11:25:09 -03:00
gipsh 78bd0cbd75
add prefix to chacheable and fix deploy (#479) 2023-06-29 15:54:45 -03:00
gipsh 2306d103d8
321 replace redis to elasticcache (#467)
* redis prefix support for caches

* fly support for prefix

* unit tests

* redis prefix for notional cache updater

* fix test

* fix tests

* use redis-prfix from config map
2023-06-28 15:04:36 -03:00
agodnic 98ae127278
[API] Expose emitter native addresses (#466)
### Description

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

The Wormhole Scan UI needs to provide a link to the emitter address for each VAA.

This pull request adds a field containing decoded emitter addresses in the following endpoints:
* `GET /api/v1/transactions`: field `emitterNativeAddress`
* `GET /api/v1/vaas*`: field `emiterNativeAddr`
2023-06-28 14:54:51 -03:00
walker-16 1c67efc3d5
Add deploy alert env var to fly + fix message prefix (#456) 2023-06-26 11:47:23 -03:00
walker-16 35b7d7b46b
remove unnecessary env var using opsgenie team api-key (#454)
remove unnecessary env var using opsgenie team
2023-06-23 11:08:57 -03:00