pyth-lazer-agent
pyth-lazer-agent is intended to be run by Lazer publishers analogous to pyth-agent for pythnet publishers. Currently, it retains the existing Lazer publishing interface, but will batch and sign transactions before publishing them to Lazer.
Keypair
You will need to generate an ed25519 keypair and provide the pubkey to the Lazer team. solana-keygen is the recommended utility.
pyth-lazer-agent will need to configure access to this keypair file to sign transactions.
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
From source
Please check rust-toolchain to see the version of Rust needed to build.
You will also need SSL and CA certificates. cargo build should then work as usual.
Docker
See the included Dockerfile to build an image yourself.
Container
We also publish images to the GitHub Container Registry.
The latest will be available at ghcr.io/pyth-network/pyth-lazer-agent:latest.
Configure
The agent takes a single --config CLI option, pointing at
config/config.toml by default. Configuration is currently minimal:
= ["wss://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "wss://relayer-1.pyth-lazer.dourolabs.app/v1/transaction"]
# relayer_connections = 2
= "/path/to/keypair.json"
= "your_token"
= "0.0.0.0:8910"
= "25ms"
= false
# Optional proxy configuration
# proxy_url = "http://proxy.example.com:8080"
# proxy_url = "http://username:password@proxy.example.com:8080" # With authentication
relayers_urls: The Lazer team will provide these.relayer_connections(optional): How many of therelayer_urlsto stay connected to at once. Defaults to all. When fewer than the number of URLs, the extras are kept as warm standbys and a connection fails over to the next relayer when one drops.publish_keypair_path: The keypair file generated withsolana-keygenor similar.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.enable_update_deduplication: The agent will deduplicate updates based inside each batch before sending it to Lazer.proxy_url(optional): HTTP/HTTPS proxy URL for WebSocket connections. Supports Basic authentication via URL credentials (e.g.,http://user:pass@proxy:port).