Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace channel with callback of transport in swarm #561

Merged
merged 29 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
01bfad2
Separate transport operation in swarm
Ma233 Feb 29, 2024
dcf0431
Implement PayloadSender for SwarmTransport
Ma233 Feb 29, 2024
2f321e6
Update handshake api
Ma233 Feb 29, 2024
820701c
Update callback mode
Ma233 Mar 1, 2024
ba3b50a
Remove channel
Ma233 Mar 1, 2024
2bd025e
Use MessageHandler in callback
Ma233 Mar 5, 2024
51149c2
Update rings-core api in rings-node
Ma233 Mar 11, 2024
70c1036
Simplify return type of gen_sorted_ht and gen_pure_dht
Ma233 Mar 12, 2024
b800e78
Implement a node in default test for monitoring
Ma233 Mar 12, 2024
8d751e2
Fix static check of connection handler test
Ma233 Mar 12, 2024
acd8309
Fix static check of tests
Ma233 Mar 12, 2024
797198e
Remove not using module and its dependencies
Ma233 Mar 12, 2024
c0306d2
Fix static check of wasm tests
Ma233 Mar 13, 2024
2d24d43
Fix callback of dummy transport
Ma233 Mar 14, 2024
4169caf
Should always invoke user defined callbacks
Ma233 Mar 15, 2024
a1efaaa
Should notify connected after data channel opened
Ma233 Mar 18, 2024
37e5f81
Fix dummy test datachannel callback behaviour
Ma233 Mar 19, 2024
121f46b
Wait for msgs in stabilization and storage tests
Ma233 Mar 19, 2024
22bb582
Fix test_fourth_node_connection by incr wait time
Ma233 Mar 19, 2024
e6fec62
Remove meaningless disconnected cleanup test
Ma233 Mar 19, 2024
106e8f3
Fix len error in test_extend_data
Ma233 Mar 19, 2024
36edb71
Fix test_extend_data in storage handler
Ma233 Mar 19, 2024
4ce0ecc
Test case enhance
Ma233 Mar 21, 2024
0c72962
Temeparary skip dummy tests
Ma233 Mar 21, 2024
0e02493
Wait for msg arriving in test
Ma233 Mar 22, 2024
a12bd72
Fix handshake_on_both_sides test
Ma233 Mar 22, 2024
7dee3b0
Fix receiver dropping bug in test_stabilization_final_dht
Ma233 Mar 25, 2024
cb9e035
Upgrade stabilization api
Ma233 Mar 26, 2024
5b29928
Hide the SwarmTransport in the Swarm of rings-core
Ma233 Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/qaci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
- name: Run doc tests
run: cargo test --doc

- name: Run dummy tests
run: cargo test -p rings-core --features dummy --verbose
# - name: Run dummy tests
# run: cargo test -p rings-core --features dummy --verbose

- name: Run tests
run: cargo test --release --all --verbose
Expand Down
22 changes: 1 addition & 21 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ experimental = ["std"]
default = ["std"]
std = [
"webrtc",
"async-channel",
"sled",
"uuid/v4",
"uuid/serde",
Expand Down Expand Up @@ -88,7 +87,6 @@ tiny-keccak = { version = "2.0.1", features = ["keccak"] }
uuid = { version = "0.8.2", optional = true }

# default and dummy
async-channel = { version = "1.6.1", optional = true }
sled = { version = "0.34.7", optional = true }
webrtc = { workspace = true, optional = true }

Expand Down
63 changes: 0 additions & 63 deletions crates/core/src/channels/default.rs

This file was deleted.

14 changes: 0 additions & 14 deletions crates/core/src/channels/mod.rs

This file was deleted.

67 changes: 0 additions & 67 deletions crates/core/src/channels/wasm.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/core/src/dht/chord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ mod tests {
}
}

let dhts = gen_sorted_dht(5).await;
let dhts = gen_sorted_dht(5);
let [n1, n2, n3, n4, n5] = dhts.as_slice() else {
panic!("wrong dhts length");
};
Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/dht/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ pub use chord::TopoInfo;
pub use chord::VNodeStorage;
pub use did::Did;
pub use finger::FingerTable;
pub use stabilization::Stabilization;
pub use stabilization::TStabilize;
pub use stabilization::Stabilizer;
pub use successor::SuccessorReader;
pub use successor::SuccessorWriter;
pub use types::Chord;
Expand Down
Loading
Loading