diff --git a/Cargo.lock b/Cargo.lock index 2c9dcb00e8..17075d2611 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5539,8 +5539,8 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "protobuf", - "pyth-lazer-protocol 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pyth-lazer-publisher-sdk 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-protocol 0.7.2", + "pyth-lazer-publisher-sdk 0.1.5", "serde", "serde_json", "soketto", @@ -5568,7 +5568,7 @@ dependencies = [ "futures-util", "hex", "libsecp256k1 0.7.2", - "pyth-lazer-protocol 0.7.2", + "pyth-lazer-protocol 0.7.3", "serde", "serde_json", "tokio", @@ -5580,18 +5580,14 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9bdf4e2ba853a8b437309487542e742c7d094d8db189db194cb538f2be02ecd" dependencies = [ - "alloy-primitives 0.8.25", "anyhow", "base64 0.22.1", - "bincode 1.3.3", - "bs58", "byteorder", "derive_more 1.0.0", - "ed25519-dalek 2.1.1", - "hex", "itertools 0.13.0", - "libsecp256k1 0.7.2", "protobuf", "rust_decimal", "serde", @@ -5600,15 +5596,19 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9bdf4e2ba853a8b437309487542e742c7d094d8db189db194cb538f2be02ecd" +version = "0.7.3" dependencies = [ + "alloy-primitives 0.8.25", "anyhow", "base64 0.22.1", + "bincode 1.3.3", + "bs58", "byteorder", "derive_more 1.0.0", + "ed25519-dalek 2.1.1", + "hex", "itertools 0.13.0", + "libsecp256k1 0.7.2", "protobuf", "rust_decimal", "serde", @@ -5618,6 +5618,8 @@ dependencies = [ [[package]] name = "pyth-lazer-publisher-sdk" version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e633db28ca38210de8ab3e99d5bd85ad8cae08a08bb0292506340ee9d1c718" dependencies = [ "anyhow", "fs-err", @@ -5631,16 +5633,14 @@ dependencies = [ [[package]] name = "pyth-lazer-publisher-sdk" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e633db28ca38210de8ab3e99d5bd85ad8cae08a08bb0292506340ee9d1c718" +version = "0.1.6" dependencies = [ "anyhow", "fs-err", "humantime", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-protocol 0.7.3", "serde-value", "tracing", ] diff --git a/lazer/contracts/solana/Cargo.lock b/lazer/contracts/solana/Cargo.lock index 35a1f1e6dd..d689daad3a 100644 --- a/lazer/contracts/solana/Cargo.lock +++ b/lazer/contracts/solana/Cargo.lock @@ -3200,7 +3200,7 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" -version = "0.7.2" +version = "0.7.3" dependencies = [ "anyhow", "base64 0.22.1", @@ -3213,6 +3213,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "pyth-lazer-publisher-sdk" +version = "0.1.6" +dependencies = [ + "anyhow", + "fs-err", + "humantime", + "protobuf", + "protobuf-codegen", + "pyth-lazer-protocol", + "serde-value", + "tracing", +] + [[package]] name = "pyth-lazer-solana-contract" version = "0.4.2" diff --git a/lazer/publisher_sdk/proto/state.proto b/lazer/publisher_sdk/proto/state.proto index 3181236e44..d98e42f246 100644 --- a/lazer/publisher_sdk/proto/state.proto +++ b/lazer/publisher_sdk/proto/state.proto @@ -44,6 +44,12 @@ message Publisher { optional bool is_active = 4; } +enum FeedState { + COMING_SOON = 0; // Default value + STABLE = 1; + INACTIVE = 2; +} + // Static data for a feed. message FeedMetadata { // [required] ID of the price feed. @@ -86,6 +92,8 @@ message FeedMetadata { // [optional] Market schedule in Pythnet format. // If absent, the default schedule is used (market is always open). optional string market_schedule = 15; + // [required] Feed state + optional FeedState state = 16; } // An item of the state describing a feed. diff --git a/lazer/publisher_sdk/proto/transaction_envelope.proto b/lazer/publisher_sdk/proto/transaction_envelope.proto index bd89e9758e..750f98606d 100644 --- a/lazer/publisher_sdk/proto/transaction_envelope.proto +++ b/lazer/publisher_sdk/proto/transaction_envelope.proto @@ -64,4 +64,5 @@ enum RejectReason { PriceOverflow = 2; InvalidFeedId = 3; MissingFields = 4; + InactiveFeedId = 5; } diff --git a/lazer/publisher_sdk/rust/Cargo.toml b/lazer/publisher_sdk/rust/Cargo.toml index c33f280b20..13f8bb6c61 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.1.5" +version = "0.1.6" edition = "2021" description = "Pyth Lazer Publisher SDK types." license = "Apache-2.0" diff --git a/lazer/sdk/rust/protocol/Cargo.toml b/lazer/sdk/rust/protocol/Cargo.toml index c8a0a8fcda..75ba2f0d08 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.7.2" +version = "0.7.3" edition = "2021" description = "Pyth Lazer SDK - protocol types." license = "Apache-2.0" diff --git a/lazer/sdk/rust/protocol/src/symbol_state.rs b/lazer/sdk/rust/protocol/src/symbol_state.rs index fb0a763f8a..54f7bcbb87 100644 --- a/lazer/sdk/rust/protocol/src/symbol_state.rs +++ b/lazer/sdk/rust/protocol/src/symbol_state.rs @@ -6,15 +6,17 @@ use { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum SymbolState { - Stable, ComingSoon, + Stable, + Inactive, } impl Display for SymbolState { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - SymbolState::Stable => write!(f, "stable"), SymbolState::ComingSoon => write!(f, "coming_soon"), + SymbolState::Stable => write!(f, "stable"), + SymbolState::Inactive => write!(f, "inactive"), } } }