Skip to content

Commit

Permalink
Remove ChildRpcSender; send child batch request RPCs directly in ha…
Browse files Browse the repository at this point in the history
…ndler (MystenLabs#4955)

Upgrades anemo to new rev with this feature.
  • Loading branch information
aschran committed Oct 4, 2022
1 parent 499e8c4 commit 9755f19
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 262 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions crates/workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ addr2line = { version = "0.17", default-features = false }
adler = { version = "1", default-features = false }
ahash = { version = "0.7", features = ["std"] }
aho-corasick = { version = "0.7", features = ["std"] }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2", default-features = false }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2", default-features = false }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8", default-features = false }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8", default-features = false }
ansi_term = { version = "0.12", default-features = false }
anyhow = { version = "1", features = ["backtrace", "std"] }
arc-swap = { version = "1", default-features = false, features = ["serde"] }
Expand Down Expand Up @@ -615,9 +615,9 @@ addr2line = { version = "0.17", default-features = false }
adler = { version = "1", default-features = false }
ahash = { version = "0.7", features = ["std"] }
aho-corasick = { version = "0.7", features = ["std"] }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2", default-features = false }
anemo-build = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2", default-features = false }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2", default-features = false }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8", default-features = false }
anemo-build = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8", default-features = false }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8", default-features = false }
ansi_term = { version = "0.12", default-features = false }
anyhow = { version = "1", features = ["backtrace", "std"] }
arc-swap = { version = "1", default-features = false, features = ["serde"] }
Expand Down
4 changes: 2 additions & 2 deletions narwhal/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ serde = "1.0.144"
workspace-hack.workspace = true
eyre = "0.6.8"

anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
anyhow = "1.0.65"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion narwhal/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ worker = { path = "../worker", package = "narwhal-worker" }
workspace-hack.workspace = true
eyre = "0.6.8"

anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }

[dev-dependencies]
hex = "0.4.3"
Expand Down
4 changes: 2 additions & 2 deletions narwhal/primary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ mysten-network.workspace = true
store.workspace = true
workspace-hack.workspace = true

anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }

[dev-dependencies]
arc-swap = { version = "1.5.1", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion narwhal/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ store = { version = "0.1.0", package = "typed-store"}
workspace-hack.workspace = true
telemetry-subscribers.workspace = true

anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
tower = { version = "0.4.13", features = ["full"] }
8 changes: 8 additions & 0 deletions narwhal/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,14 @@ impl WorkerFixture {
&self.info
}

pub fn new_network(&self, router: anemo::Router) -> anemo::Network {
anemo::Network::bind(network::multiaddr_to_address(&self.info().worker_address).unwrap())
.server_name("narwhal")
.private_key(self.keypair().private().0.to_bytes())
.start(router)
.unwrap()
}

fn generate<R, P>(mut rng: R, id: WorkerId, mut get_port: P) -> Self
where
R: rand::RngCore + rand::CryptoRng,
Expand Down
4 changes: 2 additions & 2 deletions narwhal/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ config = { path = "../config", package = "narwhal-config" }
fastcrypto = "0.1.2"
crypto = { path = "../crypto", package = "narwhal-crypto" }
dag = { path = "../dag", package = "narwhal-dag" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
workspace-hack.workspace = true

[dev-dependencies]
Expand All @@ -49,7 +49,7 @@ test-utils = { path = "../test-utils", package = "narwhal-test-utils" }
prost-build = "0.10.4"
rustversion = "1.0.9"
tonic-build = { version = "0.7.2", features = [ "prost", "transport" ] }
anemo-build = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo-build = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }

[features]
default = []
Expand Down
5 changes: 3 additions & 2 deletions narwhal/worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ byteorder = "1.4.3"
bytes = "1.2.1"
futures = "0.3.24"
multiaddr = "0.14.0"
rand = { version = "0.8.5", features = ["small_rng"] }
serde = { version = "1.0.144", features = ["derive"] }
tap = "1.0.1"
tokio = { version = "1.20.1", features = ["sync", "rt", "macros"] }
Expand All @@ -32,8 +33,8 @@ types = { path = "../types", package = "narwhal-types" }
mysten-network.workspace = true
prometheus = "0.13.2"

anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "b145cbcf4a1917197e2b9ee6a1523afdb623dbf2" }
anemo = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
anemo-tower = { git = "https://github.com/mystenlabs/anemo.git", rev = "302ff6f98fffa30a3a18e919766cd63f5b4c5aa8" }
anyhow = "1.0.65"

store.workspace = true
Expand Down
Loading

0 comments on commit 9755f19

Please sign in to comment.