Prechádzať zdrojové kódy

fix(lazer): add missing fields and fix types in proto (#3045)

* fix(lazer): add missing fields and fix types in proto

* chore: bump version
Pavel Strakhov 2 mesiacov pred
rodič
commit
819fa09ae3

+ 6 - 6
Cargo.lock

@@ -5675,7 +5675,7 @@ dependencies = [
  "hyper-util",
  "protobuf",
  "pyth-lazer-protocol 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "pyth-lazer-publisher-sdk 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pyth-lazer-publisher-sdk 0.10.0",
  "reqwest 0.12.23",
  "serde",
  "serde_json",
@@ -5772,26 +5772,26 @@ dependencies = [
 [[package]]
 name = "pyth-lazer-publisher-sdk"
 version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98f83b818450d72f6f6db5a9d98e90d2668971da14363820829998290d913f80"
 dependencies = [
  "anyhow",
  "fs-err",
  "protobuf",
  "protobuf-codegen",
- "pyth-lazer-protocol 0.14.0",
+ "pyth-lazer-protocol 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json",
 ]
 
 [[package]]
 name = "pyth-lazer-publisher-sdk"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98f83b818450d72f6f6db5a9d98e90d2668971da14363820829998290d913f80"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "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",
 ]
 

+ 6 - 3
lazer/publisher_sdk/proto/governance_instruction.proto

@@ -45,7 +45,7 @@ message GovernanceInstruction {
     // permanently rejected (e.g. if instruction #3 has been successfully processed before
     // instruction #2 was observed, #2 will always be rejected). Sequence numbers are assigned and
     // tracked separately for each governance source.
-    optional uint32 governance_sequence_no = 5;
+    optional uint64 governance_sequence_no = 5;
 }
 
 // Specifies which shards the governance instruction applies to.
@@ -112,6 +112,9 @@ message CreateShard {
     // Shard ID must be unique across all shards in all groups.
     // (Warning: it's not possible to enforce this rule within a shard!)
     optional uint32 shard_id = 1;
+    // [required] Shard name. Must be unique. Used for governance instruction targeting and
+    // for logs, metrics, etc. Example: "shard1.tokyo.staging.pyth-lazer"
+    optional string shard_name = 4;
     // [required] Group name, e.g. "production", "staging", "testing", etc.
     // Data from shards belonging to the same group can be joined and served to consumers as a whole.
     // Active feed names must be unique within a group, but not across all groups.
@@ -254,7 +257,7 @@ message AddFeed {
     // [required]
     optional DynamicValue.Map metadata = 3;
     // [required]
-    optional string name = 101;
+    optional string symbol = 101;
     // [required]
     optional sint32 exponent = 102;
     // [required]
@@ -301,7 +304,7 @@ message UpdateFeedProperties {
     // [optional]
     optional DynamicValue.Map metadata = 3;
     // [optional]
-    optional string name = 101;
+    optional string symbol = 101;
     // [optional]
     optional sint32 exponent = 102;
     // [optional]

+ 2 - 2
lazer/publisher_sdk/proto/state.proto

@@ -96,9 +96,9 @@ message Feed {
     // are not directly used in the aggregator.
     optional DynamicValue.Map metadata = 3;
 
-    // [required] A readable feed name. It must be unique across all feeds in the shard.
+    // [required] A unique string identifier of the feed that captures all the information related to the feed.
     // Used for logs, metrics, feed search API, TradingView API.
-    optional string name = 101;
+    optional string symbol = 101;
     // [required] Exponent applied to all price and rate values for this feed.
     // Actual value is `mantissa * 10 ^ exponent`.
     // Restricted to int16.

+ 1 - 1
lazer/publisher_sdk/rust/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "pyth-lazer-publisher-sdk"
-version = "0.10.0"
+version = "0.11.0"
 edition = "2021"
 description = "Pyth Lazer Publisher SDK types."
 license = "Apache-2.0"