feat(lazer-pusher): add bulk trade pusher service#3468
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
9707511 to
64a4705
Compare
5c9f1f3 to
6d1515d
Compare
6d1515d to
c41f9bc
Compare
Adds the Bulk Trade price pusher that delivers Pyth Lazer prices to Bulk Trade validators via WebSocket. Components: - bulk-trade-pusher: Main service binary - Subscribes to Pyth Lazer price feeds - Signs price updates with Ed25519 (bulk-keychain) - Pushes to multiple validators via websocket-delivery - Health endpoints (liveness + readiness) - Prometheus metrics - bulk-trade-mock-validator: Mock validator for testing - Simulates Bulk Trade validator WebSocket API - Configurable acceptance rate for HA testing - Exposes metrics for monitoring HA strategy: Multiple pushers share the same oracle account but use different signing keys. Validators deduplicate by (account, nonce).
c41f9bc to
76d6876
Compare
tejasbadadare
approved these changes
Feb 20, 2026
|
|
||
| RUN --mount=type=cache,target=/root/.cargo/registry \ | ||
| printf '[workspace]\nresolver = "2"\nmembers = ["apps/pyth-lazer-pusher/pusher-utils","apps/pyth-lazer-pusher/pusher-base","apps/pyth-lazer-pusher/websocket-delivery","apps/pyth-lazer-pusher/bulk-trade-pusher"]\n\n[workspace.lints.rust]\nunsafe_code = "deny"\n\n[workspace.lints.clippy]\nexpect_used = "warn"\nunwrap_used = "warn"\n' > Cargo.toml && \ | ||
| cargo build --release -p bulk-pusher |
Contributor
There was a problem hiding this comment.
So this creates an ad-hoc Cargo workspace and uses it to compile the project? Can't we just make a normal workspace at the apps/pyth-lazer-pusher level?
Comment on lines
+7
to
+10
| //! Note: This module uses our own message types (OracleAction, OracleUpdate) with | ||
| //! integer prices + exponent format. The bulk-keychain crate's OraclePrice uses f64, | ||
| //! which doesn't match. Once bulk-keychain supports our format, we can migrate to | ||
| //! using their types directly. |
Contributor
There was a problem hiding this comment.
Ty for the great comments throughout!
| /// A single oracle price update. | ||
| /// Prices are sent as integers with exponent, matching Lazer's native format. | ||
| #[derive(Debug, Clone, Serialize, Deserialize)] | ||
| pub struct OracleUpdate { |
Contributor
There was a problem hiding this comment.
This might belong in a different module than signing.rs?
Comment on lines
+3
to
+8
| //! Accepts WebSocket connections and responds to oracle push messages. | ||
| //! Exposes Prometheus metrics on a separate port. | ||
| //! | ||
| //! Usage: | ||
| //! cargo run --bin mock-bulk-validator -- --port 8080 --metrics-port 9090 | ||
| //! cargo run --bin mock-bulk-validator -- --port 8080 --fail-rate 0.1 --dedup-rate 0.2 |
Contributor
There was a problem hiding this comment.
Very cool. Do you just spin it up for manual testing or is it hooked into integration tests somehow?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Bulk Trade price pusher that delivers Pyth Lazer prices to Bulk Trade validators via WebSocket.
Components:
bulk-trade-pusher: Main service binary
bulk-trade-mock-validator: Mock validator for testing
HA strategy: Multiple pushers share the same oracle account but use different signing keys. Validators deduplicate by (account, nonce).
How has this been tested?