-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Apply code review suggestions from #97 * Transport refactor * Feature flags for different actors * Add peer_id to WorkerLogs, update rust version * Ensure message signing * Make libp2p metrics static * Worker adjustments * Fix logs_collected and dockerfile * Revert keypair encoding change (not backwards compatible) * Fix Wrapped::poll() + some trace logs * Fix backwards compatibility issues * Fix legacy messages * Fix handling legacy workers in scheduler * Add missing function in gateway * Legacy gateway logs handling * Observer actor
- Loading branch information
Showing
38 changed files
with
4,168 additions
and
1,372 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[workspace] | ||
members = ["transport"] | ||
members = ["messages", "transport"] | ||
resolver = "2" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "subsquid-messages" | ||
version = "0.2.0" | ||
edition = "2021" | ||
|
||
[features] | ||
signatures = ["libp2p"] | ||
|
||
[dependencies] | ||
anyhow = "1" | ||
hex = { version = "0.4", features = ["serde"] } | ||
prost = "0.12" | ||
semver = { version = "1", optional = true } | ||
serde = { version = "1", features = ["derive"] } | ||
sha3 = "0.10" | ||
|
||
libp2p = { git = "https://github.com/Wiezzel/rust-libp2p.git", rev = "299b66e4", optional = true } | ||
|
||
[build-dependencies] | ||
prost-build = "0.12" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#[rustfmt::skip] | ||
fn main() -> std::io::Result<()> { | ||
println!("cargo:rerun-if-changed=proto/messages.proto"); | ||
prost_build::Config::new() | ||
.type_attribute(".", "#[derive(Eq, serde::Serialize, serde::Deserialize)]") | ||
.type_attribute("messages.Range", "#[derive(Copy, Ord, PartialOrd)]") | ||
.skip_debug(["messages.OkResult"]) | ||
.field_attribute("messages.SizeAndHash.sha3_256", "#[serde(with = \"hex\")]") | ||
.field_attribute("messages.QueryExecuted.query_hash","#[serde(with = \"hex\")]") | ||
.field_attribute("messages.QuerySubmitted.query_hash","#[serde(with = \"hex\")]") | ||
.field_attribute("messages.Pong.ping_hash", "#[serde(with = \"hex\")]") | ||
.field_attribute("messages.Ping.signature","#[serde(with = \"hex\")]") | ||
.field_attribute("messages.Query.signature", "#[serde(with = \"hex\")]") | ||
.field_attribute("messages.QueryExecuted.signature", "#[serde(with = \"hex\")]") | ||
.protoc_arg("--experimental_allow_proto3_optional") | ||
.compile_protos(&["proto/messages.proto"], &["proto/"])?; | ||
Ok(()) | ||
} |
Oops, something went wrong.