From ef6c913d3ae44092ac12f09cc6737fd321602060 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Mon, 15 Sep 2025 09:21:18 -0500 Subject: [PATCH 1/9] Add 1000ms channel to Lazer protocol --- lazer/sdk/rust/protocol/Cargo.toml | 2 +- lazer/sdk/rust/protocol/src/api.rs | 1 + lazer/sdk/rust/protocol/src/lib.rs | 1 + lazer/sdk/rust/protocol/src/time.rs | 5 ++++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lazer/sdk/rust/protocol/Cargo.toml b/lazer/sdk/rust/protocol/Cargo.toml index 47232d91c2..c95e0e85c0 100644 --- a/lazer/sdk/rust/protocol/Cargo.toml +++ b/lazer/sdk/rust/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-protocol" -version = "0.14.0" +version = "0.15.0" edition = "2021" description = "Pyth Lazer SDK - protocol types." license = "Apache-2.0" diff --git a/lazer/sdk/rust/protocol/src/api.rs b/lazer/sdk/rust/protocol/src/api.rs index c5a17d21fc..f171d94bde 100644 --- a/lazer/sdk/rust/protocol/src/api.rs +++ b/lazer/sdk/rust/protocol/src/api.rs @@ -141,6 +141,7 @@ impl Channel { Channel::FixedRate(fixed_rate) => match fixed_rate.duration().as_millis() { 50 => ChannelId::FIXED_RATE_50, 200 => ChannelId::FIXED_RATE_200, + 1000 => ChannelId::FIXED_RATE_1000, _ => panic!("unknown channel: {self:?}"), }, Channel::RealTime => ChannelId::REAL_TIME, diff --git a/lazer/sdk/rust/protocol/src/lib.rs b/lazer/sdk/rust/protocol/src/lib.rs index be69e83e06..ff6f16da8f 100644 --- a/lazer/sdk/rust/protocol/src/lib.rs +++ b/lazer/sdk/rust/protocol/src/lib.rs @@ -52,6 +52,7 @@ impl ChannelId { pub const REAL_TIME: ChannelId = ChannelId(1); pub const FIXED_RATE_50: ChannelId = ChannelId(2); pub const FIXED_RATE_200: ChannelId = ChannelId(3); + pub const FIXED_RATE_1000: ChannelId = ChannelId(4); } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] diff --git a/lazer/sdk/rust/protocol/src/time.rs b/lazer/sdk/rust/protocol/src/time.rs index b6c2327589..5f34a53c3c 100644 --- a/lazer/sdk/rust/protocol/src/time.rs +++ b/lazer/sdk/rust/protocol/src/time.rs @@ -499,12 +499,15 @@ impl FixedRate { pub const RATE_200_MS: Self = Self { rate: DurationUs::from_millis_u32(200), }; + pub const RATE_1000_MS: Self = Self { + rate: DurationUs::from_millis_u32(1000), + }; // Assumptions (tested below): // - Values are sorted. // - 1 second contains a whole number of each interval. // - all intervals are divisable by the smallest interval. - pub const ALL: [Self; 2] = [Self::RATE_50_MS, Self::RATE_200_MS]; + pub const ALL: [Self; 3] = [Self::RATE_50_MS, Self::RATE_200_MS, Self::RATE_1000_MS]; pub const MIN: Self = Self::ALL[0]; pub fn from_millis(millis: u32) -> Option { From 44377161f9b306f946be6706bef7976b0ec12423 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Tue, 16 Sep 2025 07:30:18 -0500 Subject: [PATCH 2/9] bump client version as well --- lazer/sdk/rust/client/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lazer/sdk/rust/client/Cargo.toml b/lazer/sdk/rust/client/Cargo.toml index 029bb7d3f0..4558853142 100644 --- a/lazer/sdk/rust/client/Cargo.toml +++ b/lazer/sdk/rust/client/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "pyth-lazer-client" -version = "7.0.0" +version = "7.1.0" edition = "2021" description = "A Rust client for Pyth Lazer" license = "Apache-2.0" [dependencies] -pyth-lazer-protocol = { path = "../protocol", version = "0.14.0" } +pyth-lazer-protocol = { path = "../protocol", version = "0.15.0" } tokio = { version = "1", features = ["full"] } tokio-tungstenite = { version = "0.20", features = ["native-tls"] } futures-util = "0.3" From 73048ce73350124494590d349f9a41c6914f5404 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Tue, 16 Sep 2025 07:52:53 -0500 Subject: [PATCH 3/9] bump publisher sdk version as well --- Cargo.lock | 32 ++++++++++++++--------------- lazer/publisher_sdk/rust/Cargo.toml | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5feb0cc8ee..85cbca1b43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5674,7 +5674,7 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "protobuf", - "pyth-lazer-protocol 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-protocol 0.14.0", "pyth-lazer-publisher-sdk 0.10.0", "reqwest 0.12.23", "serde", @@ -5692,7 +5692,7 @@ dependencies = [ [[package]] name = "pyth-lazer-client" -version = "7.0.0" +version = "7.1.0" dependencies = [ "alloy-primitives 0.8.25", "anyhow", @@ -5710,7 +5710,7 @@ dependencies = [ "hex", "humantime-serde", "libsecp256k1 0.7.2", - "pyth-lazer-protocol 0.14.0", + "pyth-lazer-protocol 0.15.0", "reqwest 0.12.23", "serde", "serde_json", @@ -5725,22 +5725,17 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91b3e69c264b2ad80b5943df86c606daae63b13f93062abcc008c09a9e2e621e" dependencies = [ - "alloy-primitives 0.8.25", "anyhow", - "assert_float_eq", - "bincode 1.3.3", - "bs58", "byteorder", "chrono", "derive_more 1.0.0", - "ed25519-dalek 2.1.1", "hex", "humantime", "humantime-serde", "itertools 0.13.0", - "libsecp256k1 0.7.2", - "mry", "protobuf", "rust_decimal", "serde", @@ -5750,18 +5745,23 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b3e69c264b2ad80b5943df86c606daae63b13f93062abcc008c09a9e2e621e" +version = "0.15.0" dependencies = [ + "alloy-primitives 0.8.25", "anyhow", + "assert_float_eq", + "bincode 1.3.3", + "bs58", "byteorder", "chrono", "derive_more 1.0.0", + "ed25519-dalek 2.1.1", "hex", "humantime", "humantime-serde", "itertools 0.13.0", + "libsecp256k1 0.7.2", + "mry", "protobuf", "rust_decimal", "serde", @@ -5779,19 +5779,19 @@ dependencies = [ "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-protocol 0.14.0", "serde_json", ] [[package]] name = "pyth-lazer-publisher-sdk" -version = "0.11.0" +version = "0.12.0" dependencies = [ "anyhow", "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.14.0", + "pyth-lazer-protocol 0.15.0", "serde_json", ] diff --git a/lazer/publisher_sdk/rust/Cargo.toml b/lazer/publisher_sdk/rust/Cargo.toml index e2fdeb8753..b1cbc3d1e5 100644 --- a/lazer/publisher_sdk/rust/Cargo.toml +++ b/lazer/publisher_sdk/rust/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "pyth-lazer-publisher-sdk" -version = "0.11.0" +version = "0.12.0" edition = "2021" description = "Pyth Lazer Publisher SDK types." license = "Apache-2.0" repository = "https://github.com/pyth-network/pyth-crosschain" [dependencies] -pyth-lazer-protocol = { version = "0.14.0", path = "../../sdk/rust/protocol" } +pyth-lazer-protocol = { version = "0.15.0", path = "../../sdk/rust/protocol" } anyhow = "1.0.98" protobuf = "3.7.2" serde_json = "1.0.140" From c2ca58003842ab6e900d0b838a9ec582f772af6d Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Tue, 16 Sep 2025 08:03:36 -0500 Subject: [PATCH 4/9] bump solana contract version as well --- .../solana/programs/pyth-lazer-solana-contract/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml index 966801484b..11b7baf8a0 100644 --- a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml +++ b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-solana-contract" -version = "0.6.0" +version = "0.7.0" edition = "2021" description = "Pyth Lazer Solana contract and SDK." license = "Apache-2.0" @@ -19,7 +19,7 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] [dependencies] -pyth-lazer-protocol = { path = "../../../../sdk/rust/protocol", version = "0.14.0" } +pyth-lazer-protocol = { path = "../../../../sdk/rust/protocol", version = "0.15.0" } anchor-lang = "0.31.1" bytemuck = { version = "1.20.0", features = ["derive"] } From 29e8c659ad86b5656fd33b3f04a0574b387bdfdc Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Fri, 26 Sep 2025 09:14:41 -0500 Subject: [PATCH 5/9] version bumps --- Cargo.lock | 22 +++++++++++----------- lazer/publisher_sdk/rust/Cargo.toml | 2 +- lazer/sdk/rust/client/Cargo.toml | 4 ++-- lazer/sdk/rust/protocol/Cargo.toml | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76e735e91e..d7b8dee2e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5674,8 +5674,8 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "protobuf", - "pyth-lazer-protocol 0.15.1", - "pyth-lazer-publisher-sdk 0.12.1", + "pyth-lazer-protocol 0.15.2", + "pyth-lazer-publisher-sdk 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.12.23", "serde", "serde_json", @@ -5693,7 +5693,7 @@ dependencies = [ [[package]] name = "pyth-lazer-client" -version = "8.1.1" +version = "8.2.0" dependencies = [ "alloy-primitives 0.8.25", "anyhow", @@ -5711,7 +5711,7 @@ dependencies = [ "hex", "humantime-serde", "libsecp256k1 0.7.2", - "pyth-lazer-protocol 0.15.2", + "pyth-lazer-protocol 0.16.0", "reqwest 0.12.23", "serde", "serde_json", @@ -5725,9 +5725,9 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d91dc5606c70529bf14769034738bc8773d359b4313be3c44449dd3b442096d" +checksum = "2ca6d92d185fa8e16521b4ac044fdbd3c4cd492658ab0dc3b417e29e0989e035" dependencies = [ "anyhow", "byteorder", @@ -5746,7 +5746,7 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" -version = "0.15.2" +version = "0.16.0" dependencies = [ "alloy-primitives 0.8.25", "anyhow", @@ -5772,21 +5772,21 @@ dependencies = [ [[package]] name = "pyth-lazer-publisher-sdk" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b5f8284182d0acb4afa3c8289727511e36f59ab15b52d850aa2e32ffe0684f" +version = "0.12.2" dependencies = [ "anyhow", "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.15.1", + "pyth-lazer-protocol 0.16.0", "serde_json", ] [[package]] name = "pyth-lazer-publisher-sdk" version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e6ce3b7384086c8738d79d22f46b29c7914ab870d3647da43497aea3534f04" dependencies = [ "anyhow", "fs-err", diff --git a/lazer/publisher_sdk/rust/Cargo.toml b/lazer/publisher_sdk/rust/Cargo.toml index 4253046774..a7b291e1a4 100644 --- a/lazer/publisher_sdk/rust/Cargo.toml +++ b/lazer/publisher_sdk/rust/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" repository = "https://github.com/pyth-network/pyth-crosschain" [dependencies] -pyth-lazer-protocol = { version = "0.15.2", path = "../../sdk/rust/protocol" } +pyth-lazer-protocol = { version = "0.16.0", path = "../../sdk/rust/protocol" } anyhow = "1.0.98" protobuf = "3.7.2" serde_json = "1.0.140" diff --git a/lazer/sdk/rust/client/Cargo.toml b/lazer/sdk/rust/client/Cargo.toml index 5bcb6d6a95..6c5f8fa698 100644 --- a/lazer/sdk/rust/client/Cargo.toml +++ b/lazer/sdk/rust/client/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "pyth-lazer-client" -version = "8.1.1" +version = "8.2.0" edition = "2021" description = "A Rust client for Pyth Lazer" license = "Apache-2.0" [dependencies] -pyth-lazer-protocol = { path = "../protocol", version = "0.15.2" } +pyth-lazer-protocol = { path = "../protocol", version = "0.16.0" } tokio = { version = "1", features = ["full"] } tokio-tungstenite = { version = "0.20", features = ["native-tls"] } futures-util = "0.3" diff --git a/lazer/sdk/rust/protocol/Cargo.toml b/lazer/sdk/rust/protocol/Cargo.toml index 05e986d80f..be3dd81682 100644 --- a/lazer/sdk/rust/protocol/Cargo.toml +++ b/lazer/sdk/rust/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-protocol" -version = "0.15.2" +version = "0.16.0" edition = "2021" description = "Pyth Lazer SDK - protocol types." license = "Apache-2.0" From 38500e8ea51864265652127491bd31318ab71119 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Fri, 26 Sep 2025 09:17:34 -0500 Subject: [PATCH 6/9] version bumps --- Cargo.lock | 12 ++++++------ lazer/publisher_sdk/rust/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7b8dee2e4..2ea4a44dca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5675,7 +5675,7 @@ dependencies = [ "hyper-util", "protobuf", "pyth-lazer-protocol 0.15.2", - "pyth-lazer-publisher-sdk 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-publisher-sdk 0.12.2", "reqwest 0.12.23", "serde", "serde_json", @@ -5773,26 +5773,26 @@ dependencies = [ [[package]] name = "pyth-lazer-publisher-sdk" version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e6ce3b7384086c8738d79d22f46b29c7914ab870d3647da43497aea3534f04" dependencies = [ "anyhow", "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.16.0", + "pyth-lazer-protocol 0.15.2", "serde_json", ] [[package]] name = "pyth-lazer-publisher-sdk" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ce3b7384086c8738d79d22f46b29c7914ab870d3647da43497aea3534f04" +version = "0.13.0" dependencies = [ "anyhow", "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.15.2", + "pyth-lazer-protocol 0.16.0", "serde_json", ] diff --git a/lazer/publisher_sdk/rust/Cargo.toml b/lazer/publisher_sdk/rust/Cargo.toml index a7b291e1a4..2430bd42b4 100644 --- a/lazer/publisher_sdk/rust/Cargo.toml +++ b/lazer/publisher_sdk/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-publisher-sdk" -version = "0.12.2" +version = "0.13.0" edition = "2021" description = "Pyth Lazer Publisher SDK types." license = "Apache-2.0" From d26120d7f3b5804b30c595c466ddda86c1d93f11 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Fri, 26 Sep 2025 09:27:45 -0500 Subject: [PATCH 7/9] bump solana contract dependency --- .../solana/programs/pyth-lazer-solana-contract/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml index 2586870eba..18504df77f 100644 --- a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml +++ b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml @@ -19,7 +19,7 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] [dependencies] -pyth-lazer-protocol = { path = "../../../../sdk/rust/protocol", version = "0.15.2" } +pyth-lazer-protocol = { path = "../../../../sdk/rust/protocol", version = "0.16.0" } anchor-lang = "0.31.1" bytemuck = { version = "1.20.0", features = ["derive"] } From 0011536e0c5812c5625a877281541f54f2eabac8 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Fri, 26 Sep 2025 09:28:28 -0500 Subject: [PATCH 8/9] bump solana contract dependency --- .../solana/programs/pyth-lazer-solana-contract/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml index 18504df77f..79bf98bbc1 100644 --- a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml +++ b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-solana-contract" -version = "0.7.1" +version = "0.8.0" edition = "2021" description = "Pyth Lazer Solana contract and SDK." license = "Apache-2.0" From 50e7e4316abe0c31fdd7bf6d81a334bb7d642476 Mon Sep 17 00:00:00 2001 From: Mike Rolish Date: Fri, 26 Sep 2025 09:58:35 -0500 Subject: [PATCH 9/9] revert contract version bump --- .../solana/programs/pyth-lazer-solana-contract/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml index 79bf98bbc1..18504df77f 100644 --- a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml +++ b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-solana-contract" -version = "0.8.0" +version = "0.7.1" edition = "2021" description = "Pyth Lazer Solana contract and SDK." license = "Apache-2.0"