Daniel Chew
3c5a913a80
feat(hermes): add sse endpoint ( #1425 )
...
* add initial sse code
* fix typo
* add more error handling
* fix formatting
* revert import format
* add error handling for nonexistent price feeds in the middle of sub
* refactor
* format
* add comment
* Update hermes/src/api/sse.rs
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
* refactor
* bump
---------
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
2024-04-11 11:04:27 +09:00
Daniel Chew
9fd9e170b2
[hermes] add /v2/price_feeds endpoint ( #1277 )
...
* initial stab
* fix comments
* add filter feature
* fix deprecated warnings
* use cache
* Update price_feeds API query
* Update PriceFeedsQueryParams struct in price_feeds.rs
* fix merge conflict
* fix default value
* add tracing info
* fix comment
* address comments
* change var name
* refactor
* refactor
* refactor
* refactor
* undo changes in cache.rs
* undo changes in aggregate.rs
* address comments
* address comments
* address comments and improve fetching data speed
* address comments
* address comments
* bump
* change chunk size
* change function name
* address comment
* address comments
* address comments
* address comments
* Remove debug print statement
* address comments and add to openapi
2024-02-28 15:17:13 +08:00
Daniel Chew
25cf8f8185
[hermes] fix v2 endpoints return format ( #1299 )
...
* remove outermost array
* bump
2024-02-16 13:01:48 +09:00
Daniel Chew
e14a82c61a
fix hermes v2 openapi schemas ( #1298 )
...
* fix docs
* address comment
* bump
* fix from implementation of RpcPriceIdentifier
2024-02-15 17:37:15 +09:00
Ali Behjati
22579edc6e
feat(hermes): release v2 initial API ( #1293 )
...
The V2 API provide more functionality compared to the V1 such as
supporting benchmark proofs for multiple ids. This change bumps the
Hermes version to initiate a release and also fixes a couple of minor
things:
- Update build.rs to not panic on rebuilds
- Remove an unused benchmarks file
- Add all the V2 endpoints to docs
2024-02-12 16:05:02 +01:00
Ali Behjati
245cc231fd
refactor(hermes): improve logging
2023-12-11 18:54:55 +01:00
Ali Behjati
93e9c49b60
fix(hermes): handle price feed removal properly
2023-12-07 18:20:31 +00:00
Ali Behjati
d07579e0a6
feat(hermes): only return unique price updates on get_* methods
2023-10-27 17:01:42 +02:00
Ali Behjati
6215460613
fix(hermes): fix metrics content-type
...
Openmetrics specification expects its own content-type instead of plain
text. I didn't set it before as Prometheus still accepts text format but
apparently there are some scrapers (like datadog) that decide
dynamically what format to use for parsing based on the content type and
our format follows Openmetrics specification. Prometheus should be able
to parse it but weirdly it didn't work in our situation. An example of
inconsistency is how counters are represented. In Openmetrics
specification the metric name is appended by `_total` whereas normal
prometheus just uses the metric name.
2023-10-20 13:16:11 +02:00
Ali Behjati
6db59ff6d1
fix(hermes): correct the metrics server env var
2023-10-19 12:46:38 +02:00
Ali Behjati
9da64103db
feat(hermes): add metrics
...
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
2023-10-18 15:04:10 +02:00
Ali Behjati
d11216f309
feat(hermes): use ip from request headers for ratelimiting
2023-10-13 13:26:48 +02:00
Ali Behjati
bb922c3a17
fix(hermes): add lock for the entire message state
...
Before this change, there was a lock for each message and it could
cause the updateData for multiple ids have 2 updates (because of the
race with the thread updating the states). This change adds a RwLock
which makes sure that when the entire message state is updating,
no one can read from it while allowing concurrent reads in other
occasions.
2023-10-11 19:01:42 +02:00
Ali Behjati
0c25fccce5
chore(hermes): update wormhole config
2023-10-09 18:39:53 +02:00
Reisen
71307a1baa
chore(hermes): bump to version 0.3.0, backwards incompatible CLI features/run mode
2023-10-09 09:14:12 +01:00
Reisen
2c0413dce4
feat(hermes): move to wormhole gRPC from p2p
2023-10-09 08:56:59 +01:00
Ali Behjati
1a64d58834
patch(hermes): improve ws reliability
...
- Add max message size for incoming messages
- Add sent message rate limit and ip whitelisting
2023-10-05 16:00:48 +02:00
Ali Behjati
916d9463b2
chore(hermes): bump major version
2023-09-28 17:16:54 +02:00
Ali Behjati
9714a851eb
feat(hermes): Check price ids exist before each request
...
This check will make rejects faster (and block invalid requests
to benchmarks). The other benefit is that we can log the
errors from the get_price_feeds_with_update_data since it should
not fail anymore.
2023-09-28 11:10:51 +02:00
Reisen
80fe023174
refactor(hermes): wrap hex::serde for deserializing
2023-09-25 13:22:26 +01:00
Reisen
26b8dcdea9
refactor(hermes): move to clap_derive
2023-09-25 13:22:10 +01:00
Ali Behjati
f41cf822ff
feat(hermes): drop additional signatures from VAAs
...
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
2023-09-22 18:17:10 +02:00
Ali Behjati
6d3579ea7d
feat(hermes): add xlabs bootstrap
2023-09-21 14:01:57 +02:00
Ali Behjati
272dbef9b3
fix(hermes): fix slot metadata bug
2023-09-20 11:37:05 +02:00
Ali Behjati
5e45146acb
feat(hermes): add out of order subscription
...
Also improve the readiness probe
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
2023-09-19 15:54:33 +02:00
Reisen
263b80b1f7
refactor(hermes): introduce CacheStore
2023-09-19 13:08:11 +02:00
Ali Behjati
518ab13e03
refactor(hermes): use tokio sync primitives in p2p
2023-09-08 16:17:06 +02:00
Ali Behjati
ed505d9e53
fix(hermes): improve tracing logs
...
- Add EnvFilter to respect RUST_LOG
- Disable ANSI if stderr is not a terminal
2023-09-05 19:12:14 +02:00
Reisen
860178f057
feat(hermes): add tracing
2023-09-05 13:50:20 +01:00
Reisen
0559b45936
feat(hermes): add datadog profiling
2023-09-01 11:58:43 +01:00
Reisen
85d5170ddb
chore(hermes): visual clean up of Cargo.toml
2023-08-30 11:37:44 +01:00
Reisen
ac8895cada
ci: bump hermes version
2023-08-28 12:18:43 +02:00
Ali Behjati
0682cc9b67
fix(hermes): handle rare cases on update data
...
Fix hermes construct_update_data to support generating update_data
for more than 255 messages. This is very unlikely to happen in normal
cases but the way WS <> store interact can cause this to happen when
a WS client subscribes to all price feeds.
2023-08-17 18:30:39 +03:30
Ali Behjati
f36bd21f31
fix(hermes): handle non-existent ids on ws
2023-08-12 15:19:34 +03:30
Ali Behjati
1ed8b673f9
fix(hermes): use compatible ws format as xc-server
2023-08-09 12:57:18 +03:30
Ali Behjati
04b31f17c5
fix(hermes): send close message on WS closure
...
Some WS clients were receiving "Abnormal Connection Closure" errors.
This commit fixes the issue by sending specific close message upon
receiving close message from client. This commit also refactors the
ws.rs code by making it simpler and using tokio::time::Interval
instead of a manually implemented interval. Lastly, it updates the
axum package to include newer patches.
2023-08-08 18:57:06 +03:30
Jayant Krishnamurthy
99f1b6e950
[hermes] Finish up docs ( #1002 )
...
* docs
* stuff
* comment
2023-08-03 09:24:31 -07:00
Jayant Krishnamurthy
61e29ac166
[hermes] add utoipa for API docs ( #990 )
...
* [hermes] add utoipa for docs
* fix build
* format
2023-07-27 11:29:56 -07:00
Ali Behjati
c1517349f8
test(hermes): add tests for store ( #985 )
2023-07-27 12:28:12 +03:30
Ali Behjati
ec6378676c
chore(hermes): version bump
2023-07-26 12:23:12 +03:30
Ali Behjati
4fba5d4f1b
chore(hermes): update crates
2023-07-26 12:23:12 +03:30
Reisen
8c342c2ae0
fix: bump cargo and go versions to fix memory/compile issue
2023-07-21 16:56:46 +01:00
Ali Behjati
96cb221a3a
[hermes] Fix concurrency issue ( #925 )
2023-06-28 12:30:06 +02:00
Ali Behjati
d07cc9d1ea
[hermes] Add storage tests + refactor ( #907 )
...
* [hermes] Add storage tests + refactor
* Bump pythnet_sdk version + update cosmwasm
* Address review feedbacks
2023-06-22 14:38:56 +01:00
Ali Behjati
b596090bd8
[hermes] Switch to message structs in pythnet_sdk ( #897 )
2023-06-19 18:21:39 +02:00
Ali Behjati
4c2dfad755
[hermes] fix cors bug ( #896 )
...
* Fix cors policy error
* Bump version
* Remove unused dependencies
2023-06-19 17:15:12 +02:00
Ali Behjati
f394d9e761
[hermes] Fix memory leak ( #881 )
2023-06-13 17:11:47 +02:00
Ali Behjati
3a1b2a36b3
Address comments
2023-06-05 15:19:48 +01:00
Ali Behjati
4fa9304b4f
Move Message type extensions to pyth-client
2023-06-05 15:19:48 +01:00
Ali Behjati
9dd1520a25
Small refactor
2023-06-05 15:19:48 +01:00