Commit Graph

505 Commits

Author SHA1 Message Date
gipsh 78bd0cbd75
add prefix to chacheable and fix deploy (#479) 2023-06-29 15:54:45 -03:00
walker-16 38944cafd3
Fix env vars Environment (#476) 2023-06-29 15:07:07 -03:00
ftocal 6cb7f142b0
Add prometheus annotations for fly (#474) 2023-06-29 11:10:03 -03:00
walker-16 35a61afc12
Enable metrics staging (#470) 2023-06-28 15:17:14 -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 1ba76b5c85
Fix METRIC_ENABLED to METRICS_ENABLED in fly component (#469) 2023-06-28 13:07:45 -03:00
walker-16 914580cfdc
Add critical opsgenie alert to fly (#463) 2023-06-27 12:17:33 -03:00
agodnic f7543a1054
Remove field `vaa.NativeTxHash` from JSON model (#462)
### Description

Remove the `NativeTxHash` from the JSON model returned by `GET /api/v1/vaas`. That field was never meant to be exposed to the API users.
2023-06-27 10:12:55 -03:00
agodnic 5663fed0c9
Fix transaction hash search for Aptos (#461)
### Description

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

In `GET /api/v1/vaas?txHash={hash}`, searching for Aptos VAAs by transaction hash was not working correctly. This pull request fixes the issue.
2023-06-27 10:12:32 -03:00
walker-16 471a6dad4d
fix prometheus field name from GuardianNode to guardian_node (#460)
Co-authored-by: ftocal <fert1335@gmail.com>
2023-06-26 16:25:28 -03:00
walker-16 737405054a
446 create prometheus metrics (#457)
* Add vaa metrics

* Add dummy metrics and observations metrics

* Add heartbeat, governorConfig, governorStatus metrics

* fix go.sum

* Add deploy en vars METRICS_ENABLED to fly component

Co-authored-by: ftocal <fert1335@gmail.com>

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2023-06-26 12:47:22 -03:00
walker-16 1c67efc3d5
Add deploy alert env var to fly + fix message prefix (#456) 2023-06-26 11:47:23 -03:00
agodnic eae49e2e9c
Add support for Oasis and Algorand in the `tx-tracker` service (#455)
### Description

This pull request adds support for Oasis and Algorand in the `tx-tracker` service.

With this change, the sender addresses for those chains will become available in the UI.
2023-06-23 22:21:34 -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
walker-16 25b891f6d2
Add opsgenie client + error saving vaa alert in fly component (#442) 2023-06-22 18:59:23 -03:00
agodnic 8b58196181
Fix transaction hash search for Sui (#448)
### Description

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

For Sui transaction hashes, calling `GET /api/v1/vaas?txHash={hash}` returned an HTTP status code of 400 and a message of `"MALFORMED TX HASH"`.

This pull request fixes the problem.
2023-06-22 10:32:17 -03:00
agodnic 317e411900
Fix tx hash parsing for Solana (#444)
### Description

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

Some Solana transaction hashes were failing to parse. This pull request fixes the issue.
2023-06-21 21:46:23 -03:00
ftocal d0cea55f2d
Add cache to dashboard endpoints (#441)
* Add cache to dashboard endpoints

* Code review updates
2023-06-21 17:00:29 -03:00
agodnic 532412077b
Fix `vaa.txHash` for Solana and Aptos (#443)
For Solana and Aptos, the transaction hash returned by `GET /api/v1/vaas` is incorrect (currently it's the value transmitted in the gossip network, which is not the real transaction hash).

This pull request replaces it with the real transaction hash.
2023-06-21 17:00:11 -03:00
agodnic 4b4b6f61ca
Add support for cosmos chains in `tx-tracker` (#426)
### Description

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

This pull request modifies the `tx-tracker` service to support `ChainIDTerra2` and `ChainIDXpla`. In particular, this will make sender addresses from these blockchains available for the Wormhole Scan UI.

Support for `ChainIDTerra` was left out due to lack of working public RPC nodes (`https://lcd.terra.dev` doesn't seem to be functioning correctly at the moment).
2023-06-21 15:47:12 -03:00
gipsh 2c476dd696
update storage version and improve error log (#438)
Co-authored-by: gipsh <hernangips@OnoSendai-2.local>
2023-06-21 12:31:40 -03:00
gipsh 1837a777f1
update deploy vars (#435)
* update deploy vars

* add inflix_url

---------

Co-authored-by: gipsh <hernangips@OnoSendai-2.local>
2023-06-21 10:57:24 -03:00
gipsh 669a14cd62
update modules for api (#432)
update

Co-authored-by: Hernan Gips <hernangips@OnoSendai-2.local>
2023-06-21 10:56:51 -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
agodnic 50c1d479a6
Add support for Moonbeam and Klaytn in the `tx-tracker` service (#422)
### Description

This pull request modifies the `tx-tracker` service to support the Moonbeam and Klaytn blockchains.

In particular, this will make sender addresses for these particular blockchains available for the Wormhole Scan UI.
2023-06-20 09:37:06 -03:00
gipsh b490be0f5d
fix api doc basepath (#423)
fix api doc basepath

Co-authored-by: Hernan Gips <hernangips@OnoSendai.local>
2023-06-18 13:17:22 -03:00
agodnic 3f823c51ac
Add support for Aptos in the `tx-tracker` service (#421)
### Description

This pull request adds support for Aptos in the `tx-tracker` service.

This will lead to improvements for the wormhole Scan UI:
1. The transaction hash that was being previously displayed for Aptos VAAs was incorrect. This pull request fixes the issue.
2. The sender addresses for Aptos VAAs will now become available for for the UI.
2023-06-16 17:47:28 -03:00
gipsh ba3d1d9e61
Vanilla rate limiter (#414)
* update doc

* api def update

* first commit

* support redis, allow for private ips

* add deployment vars

---------

Co-authored-by: Hernan Gips <hernangips@OnoSendai.local>
2023-06-15 23:22:47 -03:00
agodnic bf3be056b4
Add support for Sui in the `tx-tracker` service (#416)
### Description

This pull request modifies the `tx-tracker` service to support the Sui blockchain.

In particular, this will make the Sui sender addresses available for the Wormhole Scan UI.
2023-06-15 21:42:46 -03:00
walker-16 97946d5a56
Issue [#446] remove duplicate data transaction history graph (#413) 2023-06-15 13:01:57 -03:00
ftocal 9381695d37
Fix txHash encoding by chain (#410)
Add txHash encondig backfiller
Handle txHash base58 encoding for solana in tx-tracker
Add temporary field _originTxHash in vaas and vaaIdTxHash collections by backup
Add cobra to fly backfiller

Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-06-15 09:57:39 -03:00
agodnic 19743322e4
Retrieve sender address for each transaction (#408)
### Summary

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

The WormholeScan UI needs to display the sender address for each token bridge VAA. This pull request modifies the `tx-tracker` service to obtain that information for Solana and eight EVM chains.

The transaction sender will become accessible through the following endpoints:
* `GET /api/v1/global-tx/{chain}/{emitter}/{seq}`: field `originTx.from`.
* `GET /api/v1/transactions`: field `originAddress`.
In both cases, the field is nullable (i.e.: sometimes it may not be available due to eventual consistency or internal errors)
2023-06-14 17:46:53 -03:00
agodnic a0475ab17e
Add endpoint `GET /api/v1/transactions` (#388)
### Summary
Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/385

This pull request implements a new endpoint, `GET /api/v1/transactions`, which will be consumed by the wormhole explorer UI.

The endpoint returns a paginated list of transactions, in which each element contains a brief overview of the transaction (ID, txHash, status, etc.).

It exposes offset-based pagination via the parameters `page` and `pageSize`. Also, results can be obtained for a specific address by using the `address` query parameter.

The response model looks like this:
```json
{
  "transactions": [
   {
    "id": "1/5ec18c34b47c63d17ab43b07b9b2319ea5ee2d163bce2e467000174e238c8e7f/12965",
    "timestamp": "2023-06-08T19:30:19Z",
    "txHash": "a302c4ab2d6b9a6003951d2e91f8fdbb83cfa20f6ffb588b95ef0290aab37066",
    "originChain": 1,
    "status": "ongoing"
  },
  {
    "id": "22/0000000000000000000000000000000000000000000000000000000000000001/18308",
    "timestamp": "2023-06-08T19:17:14Z",
    "txHash": "00000000000000000000000000000000000000000000000000000000000047e7",
    "originChain": 22,
    "destinationAddress": "0x00000000000000000000000067e8a40816a983fbe3294aaebd0cc2391815b86b",
    "destinationChain": 5,
    "tokenAmount": "0.12",
    "usdAmount": "0.12012",
    "symbol": "USDC",
    "status": "completed"
  },
  ...
  ]
}
```

### Limitations of the current implementation
1. Doesn't return the total number of results (this may result in a performance issue when we filter by address)
2. Can only filter by receiver address (we don't have sender information in the database yet)
2023-06-12 11:43:48 -03:00
agodnic d0436fa46d
Improve pipeline Makefile (#387)
### Description
Minor refactoring in the pipeline service's Makefile.

Changes:
* Move `pipeline` executable to the `pipeline/bin` directory.
* Remove unused targets from `pipeline/Makefile`.
2023-06-12 10:00:23 -03:00
walker-16 100e473c2f
Add celo to contract-watcher(token bridge, wormhole connect contracts) (#393) 2023-06-09 17:57:22 -03:00
walker-16 8679d9c211
Contract-watcher add support wormhole connect wrapper contract (#391) 2023-06-08 17:53:51 -03:00
ftocal 444c185f38
Ignore metric when emitter or destination chains are unset (#390) 2023-06-08 13:03:15 -03:00
ftocal b02d602b14
fix percentage for destinations when is notional (#389) 2023-06-08 10:38:34 -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 b4c217e32c
Fix status for aptos blockchain (#386)
Fix pagination for backfilling
2023-06-06 18:04:34 -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
Ben Guidarelli 6cbdf36b2c
Fix url param name (#370)
Fix URL parameter name in swagger documentation
2023-06-01 17:02:11 -03:00
gipsh a835a220fe
Update doc (#375)
* update doc

* api def update

* update swagger doc

* update deps
2023-06-01 16:46:24 -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
agodnic e7a5f0c83a
Fix an infinite loop in redis cache client (#369)
When initializing the notional cache, if there was more than one page of results, the client would run into an infinite loop.

This issue was causing several services to stall on startup in the staging environment (API, analytics, etc).
2023-05-31 16:25:16 -03:00
agodnic 0ec1cb86e2
Use decimals instead of floats in price cache (#362)
## Description

Previously, the notional cache was using the `float64` type to manipulate price data. Since floating point types can't represent price data accurately, this commit changes the codebase to use a lossless representation (i.e.: `decimal.Decimal`).
2023-05-31 16:24:40 -03:00
ftocal 06d6950ad3
Add backfiller command to process a chain (#364)
* Add backfiller command to process a chain

* Add deployment for solana backfiller
2023-05-31 10:29:47 -03:00