Skip to content

Commit 0bb45b5

Browse files
authored
feat(pyth-lazer-agent) Allow conditionally disabling success responses (#2896)
1 parent 788d5fb commit 0bb45b5

File tree

7 files changed

+169
-182
lines changed

7 files changed

+169
-182
lines changed

Cargo.lock

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

apps/pyth-lazer-agent/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "pyth-lazer-agent"
3-
version = "0.3.3"
3+
version = "0.4.0"
44
edition = "2024"
55
description = "Pyth Lazer Agent"
66
license = "Apache-2.0"
77
repository = "https://github.com/pyth-network/pyth-crosschain"
88

99
[dependencies]
10-
pyth-lazer-publisher-sdk = "0.1.7"
11-
pyth-lazer-protocol = "0.8.1"
10+
pyth-lazer-publisher-sdk = "0.3.0"
11+
pyth-lazer-protocol = "0.10.1"
1212

1313
anyhow = "1.0.98"
1414
backoff = "0.4.0"

apps/pyth-lazer-agent/README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pyth-lazer-agent
22

33
pyth-lazer-agent is intended to be run by Lazer publishers analogous to [pyth-agent](https://github.com/pyth-network/pyth-agent)
4-
for pythnet publishers. Currently it retains [the existing Lazer publishing interface](https://github.com/pyth-network/pyth-examples/tree/main/lazer/publisher),
4+
for pythnet publishers. Currently, it retains [the existing Lazer publishing interface](https://github.com/pyth-network/pyth-examples/tree/main/lazer/publisher),
55
but will batch and sign transactions before publishing them to Lazer.
66

77
## Keypair
@@ -16,6 +16,18 @@ pyth-lazer-agent will need to configure access to this keypair file to sign tran
1616

1717
## Build and run
1818

19+
### From cargo
20+
```
21+
# Download the cargo package
22+
cargo install pyth-lazer-agent
23+
24+
# Add .cargo/bin to PATH
25+
export PATH="$PATH:~/.cargo/bin"
26+
27+
# Run the agent
28+
pyth-lazer-agent --help
29+
```
30+
1931
### From source
2032
Please check [rust-toolchain](rust-toolchain.toml) to see the version of Rust needed to build (currently 1.88).
2133
You will also need SSL and CA certificates. `cargo build` should then work as usual.
@@ -32,7 +44,7 @@ The agent takes a single `--config` CLI option, pointing at
3244
`config/config.toml` by default. Configuration is currently minimal:
3345

3446
```toml
35-
relayer_urls = ["ws://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "ws://relayer-0.pyth-lazer.dourolabs.app/v1/transaction"]
47+
relayer_urls = ["wss://relayer.pyth-lazer-staging.dourolabs.app/v1/transaction", "wss://relayer-1.pyth-lazer-staging.dourolabs.app/v1/transaction"]
3648
publish_keypair_path = "/path/to/keypair.json"
3749
authorization_token = "your_token"
3850
listen_address = "0.0.0.0:8910"
@@ -44,8 +56,3 @@ publish_interval_duration = "25ms"
4456
- `authorization_token`: The Lazer team will provide this or instruct that it can be omitted.
4557
- `listen_address`: The local port the agent will be listening on; can be anything you want.
4658
- `publisher_interval`: The agent will batch and send transaction bundles at this interval. The Lazer team will provide guidance here.
47-
48-
## Publish
49-
50-
Please use the `/v1/publisher` or `/v2/publisher` endpoints and the corresponding `PriceFeedDataV1` and `PriceFeedDataV2`
51-
schemas as defined in [the sdk](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/rust/protocol/src/publisher.rs).

apps/pyth-lazer-agent/config/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
relayer_urls = ["wss://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "wss://relayer-0.pyth-lazer.dourolabs.app/v1/transaction"]
1+
relayer_urls = ["wss://relayer.pyth-lazer-staging.dourolabs.app/v1/transaction", "wss://relayer-1.pyth-lazer-staging.dourolabs.app/v1/transaction"]
22
publish_keypair_path = "/path/to/solana/id.json"
33
listen_address = "0.0.0.0:8910"
44
publish_interval_duration = "25ms"

0 commit comments

Comments
 (0)