Skip to content

Commit 1771349

Browse files
committed
Merge branch 'tim/memory-transport2' into 'master'
feat: [NET-1441] Memory transport This is intended for testing the state sync manager by simulating a network with limited capacity links and latency. There is a description in `lib.rs` of how the network is modeled. See merge request dfinity-lab/public/ic!13180
2 parents a7a3d10 + 30e8dc2 commit 1771349

File tree

6 files changed

+443
-0
lines changed

6 files changed

+443
-0
lines changed

Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ members = [
192192
"rs/orchestrator/registry_replicator",
193193
"rs/p2p",
194194
"rs/p2p/peer_manager",
195+
"rs/p2p/memory_transport",
195196
"rs/p2p/quic_transport",
196197
"rs/p2p/state_sync_manager",
197198
"rs/p2p/experimental/prototype",

rs/p2p/memory_transport/BUILD.bazel

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
load("@rules_rust//rust:defs.bzl", "rust_library")
2+
3+
package(default_visibility = [
4+
"//rs/p2p/quic_transport:__subpackages__",
5+
"//rs/p2p/state_sync_manager:__subpackages__",
6+
])
7+
8+
DEPENDENCIES = [
9+
"//rs/types/types",
10+
"//rs/p2p/quic_transport",
11+
"@crate_index//:axum",
12+
"@crate_index//:bytes",
13+
"@crate_index//:futures",
14+
"@crate_index//:http",
15+
"@crate_index//:prost",
16+
"@crate_index//:tokio",
17+
"@crate_index//:tower",
18+
]
19+
20+
MACRO_DEPENDENCIES = [
21+
"@crate_index//:async-trait",
22+
]
23+
24+
ALIASES = {}
25+
26+
rust_library(
27+
name = "memory_transport",
28+
testonly = True,
29+
srcs = glob(["src/**/*.rs"]),
30+
aliases = ALIASES,
31+
crate_name = "ic_memory_transport",
32+
proc_macro_deps = MACRO_DEPENDENCIES,
33+
version = "0.8.0",
34+
deps = DEPENDENCIES,
35+
)

rs/p2p/memory_transport/Cargo.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "ic-memory-transport"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
async-trait = "0.1.36"
10+
axum = "0.6.12"
11+
bytes = "1.0.1"
12+
futures = "0.3.10"
13+
http = "0.2.9"
14+
ic-types = { path = "../../types/types" }
15+
ic-quic-transport = { path = "../quic_transport" }
16+
prost = "0.11.0"
17+
tokio = { version = "1.15.0", features = ["full"] }
18+
tower = "0.4.13"
19+

0 commit comments

Comments
 (0)