-
Notifications
You must be signed in to change notification settings - Fork 277
feat(pyth-lazer-agent) Allow conditionally disabling success responses #2896
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
Changes from all commits
e315e4e
53f67d9
1e01ca0
63d3c89
e190b37
1916145
6137c25
c0be51f
03bf830
afce38a
6677e18
6604d0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# pyth-lazer-agent | ||
|
||
pyth-lazer-agent is intended to be run by Lazer publishers analogous to [pyth-agent](https://github.com/pyth-network/pyth-agent) | ||
for pythnet publishers. Currently it retains [the existing Lazer publishing interface](https://github.com/pyth-network/pyth-examples/tree/main/lazer/publisher), | ||
for pythnet publishers. Currently, it retains [the existing Lazer publishing interface](https://github.com/pyth-network/pyth-examples/tree/main/lazer/publisher), | ||
but will batch and sign transactions before publishing them to Lazer. | ||
|
||
## Keypair | ||
|
@@ -16,6 +16,18 @@ pyth-lazer-agent will need to configure access to this keypair file to sign tran | |
|
||
## Build and run | ||
|
||
### From cargo | ||
``` | ||
# Download the cargo package | ||
cargo install pyth-lazer-agent | ||
|
||
# Add .cargo/bin to PATH | ||
export PATH="$PATH:~/.cargo/bin" | ||
|
||
# Run the agent | ||
pyth-lazer-agent --help | ||
``` | ||
|
||
Comment on lines
+19
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would also show the actual run usage which is just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imho |
||
### From source | ||
Please check [rust-toolchain](rust-toolchain.toml) to see the version of Rust needed to build (currently 1.88). | ||
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 | |
`config/config.toml` by default. Configuration is currently minimal: | ||
|
||
```toml | ||
relayer_urls = ["ws://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "ws://relayer-0.pyth-lazer.dourolabs.app/v1/transaction"] | ||
relayer_urls = ["wss://relayer.pyth-lazer-staging.dourolabs.app/v1/transaction", "wss://relayer-1.pyth-lazer-staging.dourolabs.app/v1/transaction"] | ||
publish_keypair_path = "/path/to/keypair.json" | ||
authorization_token = "your_token" | ||
listen_address = "0.0.0.0:8910" | ||
|
@@ -44,8 +56,3 @@ publish_interval_duration = "25ms" | |
- `authorization_token`: The Lazer team will provide this or instruct that it can be omitted. | ||
- `listen_address`: The local port the agent will be listening on; can be anything you want. | ||
- `publisher_interval`: The agent will batch and send transaction bundles at this interval. The Lazer team will provide guidance here. | ||
|
||
## Publish | ||
|
||
Please use the `/v1/publisher` or `/v2/publisher` endpoints and the corresponding `PriceFeedDataV1` and `PriceFeedDataV2` | ||
schemas as defined in [the sdk](https://github.com/pyth-network/pyth-crosschain/blob/main/lazer/sdk/rust/protocol/src/publisher.rs). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
relayer_urls = ["wss://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "wss://relayer-0.pyth-lazer.dourolabs.app/v1/transaction"] | ||
relayer_urls = ["wss://relayer.pyth-lazer-staging.dourolabs.app/v1/transaction", "wss://relayer-1.pyth-lazer-staging.dourolabs.app/v1/transaction"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably worth breaking these out as consts so that we can clearly understand they're "STAGING_RELAYER_1_WS_URL" or something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in config? does toml have support for some consts i'm missing? |
||
publish_keypair_path = "/path/to/solana/id.json" | ||
listen_address = "0.0.0.0:8910" | ||
publish_interval_duration = "25ms" | ||
|
Uh oh!
There was an error while loading. Please reload this page.