Skip to content

feat(pyth-lazer) Implement JRPC endpoint for the lazer agent #2837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jul 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dac9d93
feat(pyth-lazer) Create schema for lazer agent JRPC endpoint
bplatak Jul 7, 2025
e7b4a1b
feat(pyth-lazer) Implement JRPC endpoint for the lazer agent
bplatak Jul 7, 2025
d509390
Merge branch 'main' of github.com:pyth-network/pyth-crosschain into f…
bplatak Jul 7, 2025
f1e15e1
add missing dep
bplatak Jul 7, 2025
a42a994
make clippy happy
bplatak Jul 7, 2025
ca3c7a1
simplify the ws socket handling
bplatak Jul 8, 2025
6361828
add error response formats
bplatak Jul 8, 2025
9517645
review
bplatak Jul 9, 2025
1116639
review
bplatak Jul 9, 2025
478004d
fix tests
bplatak Jul 9, 2025
3df3efd
fix cargo checks
bplatak Jul 9, 2025
ea69d88
remove unused dept, make some params optional, bump ver
bplatak Jul 9, 2025
9b40549
remove unused dept, make some params optional, bump ver
bplatak Jul 9, 2025
afa5a40
Merge branch 'feat/pyth-lazer/agent/jrpc-schema-1' into feat/pyth-laz…
bplatak Jul 9, 2025
8c57b5a
Merge remote-tracking branch 'refs/remotes/origin/main' into feat/pyt…
bplatak Jul 9, 2025
e752ae8
Merge remote-tracking branch 'refs/remotes/origin/main' into feat/pyt…
bplatak Jul 9, 2025
6ca713f
update protocol to 0.8.1
bplatak Jul 9, 2025
edd8230
update protocol to 0.8.1
bplatak Jul 9, 2025
57908a6
fix clippy errors
bplatak Jul 9, 2025
6caa2e0
Merge remote-tracking branch 'origin/main' into feat/pyth-lazer/agent…
bplatak Jul 9, 2025
93c3fa2
fix incorrect error type and update cargo.lock
bplatak Jul 9, 2025
88ea9c0
make the error message more verbose
bplatak Jul 9, 2025
d4d5973
fix clippy errors
bplatak Jul 9, 2025
eb6761c
fix clippy errors
bplatak Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 105 additions & 22 deletions Cargo.lock

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

7 changes: 4 additions & 3 deletions apps/pyth-lazer-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.1.3"
edition = "2024"

[dependencies]
pyth-lazer-publisher-sdk = "0.1.5"
pyth-lazer-protocol = "0.7.2"
pyth-lazer-publisher-sdk = "0.1.7"
pyth-lazer-protocol = "0.8.1"

anyhow = "1.0.98"
backoff = "0.4.0"
Expand All @@ -20,7 +20,7 @@ futures-util = "0.3.31"
http = "1.3.1"
http-body-util = "0.1.3"
humantime-serde = "1.1.1"
hyper = { version = "1.6.0", features = ["http1", "server"] }
hyper = { version = "1.6.0", features = ["http1", "server", "client"] }
hyper-util = { version = "0.1.10", features = ["tokio"] }
protobuf = "3.7.2"
serde = { version = "1.0.219", features = ["derive"] }
Expand All @@ -33,6 +33,7 @@ tokio-util = { version = "0.7.14", features = ["compat"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
url = { version = "2.5.4", features = ["serde"] }
reqwest = "0.12.22"

[dev-dependencies]
tempfile = "3.20.0"
Expand Down
1 change: 1 addition & 0 deletions apps/pyth-lazer-agent/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ relayer_urls = ["ws://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "ws://
publish_keypair_path = "/path/to/solana/id.json"
listen_address = "0.0.0.0:8910"
publish_interval_duration = "25ms"
authorization_token="token1"
1 change: 1 addition & 0 deletions apps/pyth-lazer-agent/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub struct Config {
pub publish_keypair_path: PathBuf,
#[serde(with = "humantime_serde", default = "default_publish_interval")]
pub publish_interval_duration: Duration,
pub history_service_url: Option<Url>,
}

fn default_publish_interval() -> Duration {
Expand Down
Loading