Commit Graph

185 Commits

Author SHA1 Message Date
Mariano 220dd01982
[WORMSCAN-API-1335] Support querying with multiple sourceChains and targetChains (#1364)
* refactor to accept multiple sourceChains,targetChains and appIds

* support multiple appIds

* adjust x-chain-activity/tops to also support multiple sourceChains and targetChains

* readapt to multiple sourceChains and targetChains

* add unit-tests

* fix unit-test case names

* add unit-test to validate query construction

* fix docs

* fix length of targetChains
2024-04-30 16:56:19 -03:00
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
walker-16 8f3b57ee89
Fix hardcode guardian set index api (#1352)
Co-authored-by: ftocal <fert1335@gmail.com>
2024-04-24 10:32:16 -03:00
walker-16 5ac4701b37
Fix not found responde in vaa duplicate endpoint (#1346)
Co-authored-by: ftocal <fert1335@gmail.com>
2024-04-23 11:50:03 -03:00
ftocal 28a24db1f1
Fix go dependencies in api and pipeline (#1344)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-04-23 11:41:06 -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
Mariano e06057acfd
[ISSUE-1220] Add filters to /operations endpoint (#1262)
* start

 add search by chain

 change chainId query param handling

 change condition

 only from chain

change query

 add filter by appId

 add payload type for operations query

add logs

 add log for error in mongodb call

 add more logs and recover to find possible panic

change type to float64

add more logs for troubleshooting

 add more logs for troubleshooting payloadType query param

add another defer

* change query

* add exclusiveAppId,sourceChain and targetChain

* unify search criteria

* change queryies

* combine query params filters

* change implementation of sourceChain and targetChain

* insert filtering by chain and by appid as stages in aggregation pipeline

* fix appIds matching condition

* move query to a separate pipeline which starts from parsedVAA

* adjust query by appId

* add matching also for standardizedProperties

* change

* try using  instead of

* simplify query

* add queryLoggging and remove other parts of the query to troubleshooting

* working

* add index creation

* update swagger docs

* tweak index performance and fix timestamp on parsedVaa collection

* start

 add search by chain

 change chainId query param handling

 change condition

 only from chain

change query

 add filter by appId

 add payload type for operations query

add logs

 add log for error in mongodb call

 add more logs and recover to find possible panic

change type to float64

add more logs for troubleshooting

 add more logs for troubleshooting payloadType query param

add another defer

* change query

* add exclusiveAppId,sourceChain and targetChain

* unify search criteria

* change queryies

* combine query params filters

* change implementation of sourceChain and targetChain

* insert filtering by chain and by appid as stages in aggregation pipeline

* fix appIds matching condition

* move query to a separate pipeline which starts from parsedVAA

* adjust query by appId

* add matching also for standardizedProperties

* change

* try using  instead of

* simplify query

* add queryLoggging and remove other parts of the query to troubleshooting

* working

* add index creation

* update swagger docs

* tweak index performance and fix timestamp on parsedVaa collection

* add lookup for globaltransactions
2024-04-09 09:57:08 -03:00
ftocal aabad70e4d
Add cache to governor endpoints (#1271) 2024-04-03 14:58:04 -03:00
ftocal 451c48a670
Add ip and query params in fiber logger (#1268)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-04-01 16:06:43 -03:00
ftocal e55f6e35e3
Fix operations query by txHash when the vaa was processed correctly (#1255)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-27 10:58:50 -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
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
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 98a6264739
Changes to support ci/cd workflow in staging environment (#1166)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-02-29 11:14:31 -03:00
walker-16 4760c820c3
808 enhance operationsaddress to provide information for all address formats (#1145)
* Add index in globalTransactions by originTx.attribute.value.originAddress

* Add in the operation by address endpoint support to wormchain chains
2024-02-23 10:32:26 -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
walker-16 a984bcb061
Add pageSize max value to 1000 in api (#1111)
Co-authored-by: ftocal fert1335@gmail.com
2024-02-08 10:54:55 -03:00
walker-16 73a31dbbc8
Add total_message field in the scorecard endpoint (#1079)
* Add total_message field in the scorecard endpoint

* update scorecard endpoint documentation

* Add support to total_message in testnet
2024-02-05 10:42:55 -03:00
ftocal c4707fbb69
Fix vaa parse endpoint (#1078) 2024-02-01 12:01:24 -03:00
walker-16 8c5e9e5353
Feature/improve operation endpoint performance (#1064)
* Change query to sort by timestamp and id

* Add maximun size to pageSize in operation endpoint

* Add missing indexes for mongodb

* improve search txHash for nested wormchain txHash

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2024-02-01 11:21:34 -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
Ben Guidarelli 00d88a38dc
Docs: Modify comments to provide consistent argument documentation (#811)
tweak comments to provide consistent argument documentation
2024-01-22 10:58:28 -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
walker-16 05a4cf07b7
Add guardianSetIndex in the operations endpoint (#941) 2024-01-03 16:13:09 -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 7f60e81b3e
Fallback metrics endpoint (#921)
Add to cache without expiration.
Increase expiration to fetch data from influx to 10 minute. After 10 minute we update the data to influx is the response is success, if the response is not success we return the old data in the cache without expiration.
Add alert when return metrics endpoint using cache that are expired.

Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-12-19 12:24:58 -03:00
ftocal fba3adef65
Add api key logic to handle rate limit in api (#918) 2023-12-18 12:53:30 -03:00
walker-16 155e4c925c
Add fields int the relay endpoint (#905)
Co-authored-by: ftocal fert1335@gmail.com
2023-12-14 14:21:37 -03:00
ftocal cff86e4469
Add top-symbols-by-volume endpoint and influx tasks (#887) 2023-12-11 14:32:25 -03:00
ftocal a4b4e90fd7
Handle missing txhHash in vaa in vaas endpoint (#880)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-12-07 14:52:20 -03:00
walker-16 984fb748d8
operation endpoint remove q query param, add address and txHash query… (#852)
operation endpoint remove q query param, add address and txHash query params
2023-12-04 16:33:38 -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
walker-16 918f09cddb
fix typo standarized properties in operation endpoint (#833) 2023-11-30 12:28:48 -03:00
walker-16 9fce2cf645
Fix operation endpoint search wormchain txs and destinationTx (#830) 2023-11-29 16:21:28 -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 54b450e86f
Fix in find relays by id (#807)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-11-16 15:57:43 -03:00
ftocal c2f02bab2f
Fix and change relays response for the relays endpoint (#805)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-11-16 15:28:07 -03:00
ftocal a29fbce237
Fix in address endpoint and transactions by address (#762) 2023-10-26 19:35:23 -03:00
walker-16 f4fe630623
Add methods to identify kujira & evmos (#729)
* Add methods to identify kujira & evmos

* Add fetch methods to kajira and evmos

* fix fetch kujira and evmos methods

* Add support to search vaas gateway chain txHash

* Add deploy config to tx-tracker for evmos & kujira
2023-10-26 19:34:00 -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
walker-16 504c6a2bf4
fix transaction endpoint to return globaltx if originTx doesnot exist… (#718)
fix transaction endpoint to return globaltx if originTx doesnot exists but the destinationTx exists
2023-09-27 14:32:32 -03:00
walker-16 5c49a5ee9c
Fix get transactions sorting (#711) 2023-09-26 15:02:57 -03:00
gipsh f67a513244
change search key for _id (#704) 2023-09-26 10:42:08 -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
walker-16 923ee8d337
Fix api governor max availibility by chain endpoint with enqueued VAA… (#700)
Fix api governor max availibility by chain endpoint with enqueued VAA data
2023-09-22 13:01:30 -03:00
gipsh 7b88249933
Relays api endpoint (#689)
* add relay endpoint

* documentation

* simplify code

* fix comment
2023-09-13 10:23:10 -03:00
ftocal 5e3adeb4ad
Retrieve chain and sender of wormchain originated vaas (#678)
* Add additional information for osmosis transaction through wormchain

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

* Modify tx-tracker deployment

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

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-09-04 15:17:23 -03:00
gipsh 0741ef7045
update swagger doc to replace wormscan with wormholescan (#643) 2023-08-18 13:30:19 -03:00