Skip to content

Commit 5289b35

Browse files
committed
fix: use solana-client pubsub lib instead of solana-shadow
Solana-shadow is not maintained anymore and doesn't work properly. It drops many updates and after a certain amount of latency drops all messages. We have been using Solana PubSub client in Hermes without any problem and there is no reason to stick with solana-shadow.
1 parent 5e0f357 commit 5289b35

File tree

5 files changed

+90
-276
lines changed

5 files changed

+90
-276
lines changed

Cargo.lock

Lines changed: 6 additions & 194 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-agent"
3-
version = "2.4.0"
3+
version = "2.4.1"
44
edition = "2021"
55

66
[[bin]]
@@ -28,17 +28,17 @@ chrono = "0.4.31"
2828
chrono-tz = "0.8.4"
2929
parking_lot = "0.12.1"
3030
pyth-sdk = "0.7.0"
31-
pyth-sdk-solana = "0.7.1"
32-
solana-client = "1.13.6"
33-
solana-sdk = "1.13.6"
31+
pyth-sdk-solana = "0.7.2"
32+
solana-account-decoder = "1.14.16"
33+
solana-client = "1.14.16"
34+
solana-sdk = "1.14.16"
3435
bincode = "1.3.3"
3536
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_trace"] }
3637
slog-term = "2.9.0"
3738
rand = "0.8.5"
3839
slog-async = "2.7.0"
3940
config = "0.13.3"
4041
thiserror = "1.0.32"
41-
solana-shadow = "0.2.4"
4242
clap = { version = "4.0.32", features = ["derive"] }
4343
humantime-serde = "1.1.1"
4444
slog-envlogger = "2.2.0"

config/config.sample.pythnet.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ key_store.program_key = "FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH"
4848
# Oracle mapping pubkey
4949
key_store.mapping_key = "AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J"
5050

51-
# Duration of the interval at which to publish updates. Default interval is 1 seconds.
52-
# exporter.publish_interval_duration = "1s"
53-
54-
# Price per compute unit offered for update_price transactions.
55-
# This is needed for solana to be able to land transactions on the network
56-
# during periods of high network congestion.
57-
exporter.compute_unit_price_micro_lamports = 40000
58-
5951
# Compute unit limit requested per instruction for transactions that update the price.
6052
# This should be an upper bound of the compute units a single upd_price instruction might consume.
6153
# For solana mainnet, this should be set to 20000 instead of the default 40000 since there is no accumulator.
@@ -65,11 +57,6 @@ exporter.compute_unit_limit = 20000
6557
# This is needed for solana to be able to land transactions on the network
6658
# during periods of high network congestion.
6759
exporter.dynamic_compute_unit_pricing_enabled = true
68-
exporter.maximum_slot_gap_for_dynamic_compute_unit_price = 50
69-
exporter.maximum_total_compute_fee_micro_lamports = 10000000000
70-
71-
# The interval with which to poll account information.
72-
oracle.poll_interval_duration = "5s"
7360

7461
# Configuration for the JRPC API
7562
[pythd_adapter]

0 commit comments

Comments
 (0)