Skip to content

Commit

Permalink
fix: use solana-client pubsub lib instead of solana-shadow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ali-bahjati committed Nov 30, 2023
1 parent 5e0f357 commit 5289b35
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 276 deletions.
200 changes: 6 additions & 194 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-agent"
version = "2.4.0"
version = "2.4.1"
edition = "2021"

[[bin]]
Expand Down Expand Up @@ -28,17 +28,17 @@ chrono = "0.4.31"
chrono-tz = "0.8.4"
parking_lot = "0.12.1"
pyth-sdk = "0.7.0"
pyth-sdk-solana = "0.7.1"
solana-client = "1.13.6"
solana-sdk = "1.13.6"
pyth-sdk-solana = "0.7.2"
solana-account-decoder = "1.14.16"
solana-client = "1.14.16"
solana-sdk = "1.14.16"
bincode = "1.3.3"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_trace"] }
slog-term = "2.9.0"
rand = "0.8.5"
slog-async = "2.7.0"
config = "0.13.3"
thiserror = "1.0.32"
solana-shadow = "0.2.4"
clap = { version = "4.0.32", features = ["derive"] }
humantime-serde = "1.1.1"
slog-envlogger = "2.2.0"
Expand Down
13 changes: 0 additions & 13 deletions config/config.sample.pythnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ key_store.program_key = "FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH"
# Oracle mapping pubkey
key_store.mapping_key = "AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J"

# Duration of the interval at which to publish updates. Default interval is 1 seconds.
# exporter.publish_interval_duration = "1s"

# Price per compute unit offered for update_price transactions.
# This is needed for solana to be able to land transactions on the network
# during periods of high network congestion.
exporter.compute_unit_price_micro_lamports = 40000

# Compute unit limit requested per instruction for transactions that update the price.
# This should be an upper bound of the compute units a single upd_price instruction might consume.
# For solana mainnet, this should be set to 20000 instead of the default 40000 since there is no accumulator.
Expand All @@ -65,11 +57,6 @@ exporter.compute_unit_limit = 20000
# This is needed for solana to be able to land transactions on the network
# during periods of high network congestion.
exporter.dynamic_compute_unit_pricing_enabled = true
exporter.maximum_slot_gap_for_dynamic_compute_unit_price = 50
exporter.maximum_total_compute_fee_micro_lamports = 10000000000

# The interval with which to poll account information.
oracle.poll_interval_duration = "5s"

# Configuration for the JRPC API
[pythd_adapter]
Expand Down
Loading

0 comments on commit 5289b35

Please sign in to comment.