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

Feature/multi surbs #1796

Merged
merged 57 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
a3a1ea7
bunch of wip with focus on serialization
jstuczyn Nov 7, 2022
2040019
Being able to send normal data (NO SURBS yet) to yourself again
jstuczyn Nov 8, 2022
da56ede
Fixed RepliableMessage deserialization
jstuczyn Nov 8, 2022
110495a
Recovering data from surb messages
jstuczyn Nov 9, 2022
fc5b27b
Extracted common code in sphinx payload construction
jstuczyn Nov 9, 2022
3721daa
Cleanup within received buffer
jstuczyn Nov 9, 2022
e42e42f
requesting, sending and using additional reply surbs
jstuczyn Nov 10, 2022
736079c
Following discussion with @simonwicky, removing sender proof and decr…
jstuczyn Nov 10, 2022
2faf7b9
Made sender tag more easily configurable
jstuczyn Nov 10, 2022
6e652ce
Refactoring of message creation
jstuczyn Nov 11, 2022
c12b680
Propagating reply surb acks but not retransmitting them yet
jstuczyn Nov 11, 2022
38f64a1
Surb retransmissions
jstuczyn Nov 11, 2022
e158399
requesting additional surbs from the retransmission flow
jstuczyn Nov 11, 2022
442530f
correctly determining the point of requesting additional surbs
jstuczyn Nov 11, 2022
ca97a56
Ability to use socks5 (and network requester) with surbs
jstuczyn Nov 17, 2022
dd349ce
Improved surbs retranmsission reliability
jstuczyn Nov 18, 2022
86d2918
naive way of not over-requesting surbs
jstuczyn Nov 18, 2022
e00ec00
wip on tag storage
jstuczyn Nov 21, 2022
cc065f7
Improved error propagation for message construction
jstuczyn Nov 21, 2022
5aea884
Requesting more surbs for stale entries
jstuczyn Nov 21, 2022
4c28969
Better controlling the point of having to request additional surbs
jstuczyn Nov 21, 2022
885c79c
Using pseudorandom sender tag instead of a hardcoded one
jstuczyn Nov 21, 2022
1bd4edb
First cleanup round in MessageHandler
jstuczyn Nov 21, 2022
8577a1a
Error cleanup and if simplification
jstuczyn Nov 22, 2022
a6e9e0f
Assigned a more permanent name to the ReplyController
jstuczyn Nov 22, 2022
8416e60
Removed PendingReply redundant type
jstuczyn Nov 22, 2022
ce15d56
Made socks5 client less eager to over-send reply surbs
jstuczyn Nov 22, 2022
8e34f5c
'anonymous' field on socks5 client to decide whether to use surbs or …
jstuczyn Nov 22, 2022
8465950
Dead code and import removal in client-core
jstuczyn Nov 22, 2022
d35965a
Updating ClientRequest variants
jstuczyn Nov 22, 2022
996eb90
Adjusted decision threshold for requesting more surbs
jstuczyn Nov 22, 2022
6ccc22a
Native client cleanup
jstuczyn Nov 22, 2022
da8454c
Made socks5 client usage of surbs configurable
jstuczyn Nov 22, 2022
dc944c8
Restored statistics in network requester
jstuczyn Nov 22, 2022
0654827
Validator-api compiles once again
jstuczyn Nov 22, 2022
ac00266
Further improved surb request logic
jstuczyn Nov 22, 2022
be63b66
boxing the recipient in controller requests
jstuczyn Nov 22, 2022
4c817cc
Removal of hardcoded values in favour of propagating them from the co…
jstuczyn Nov 23, 2022
9c54099
more validation during surb requests
jstuczyn Nov 23, 2022
0c0223c
Merge branch 'develop' into feature/multi-surbs
jstuczyn Nov 24, 2022
0da872d
Fixed ClientRequest::Send deserialization
jstuczyn Nov 24, 2022
70af322
Added length checks for request deserialization
jstuczyn Nov 24, 2022
cd36db7
post-merge formatting
jstuczyn Nov 24, 2022
605087f
Unit tests once again compile and pass
jstuczyn Nov 24, 2022
55944fa
controlling retransmission_reply_surb_request_size from config
jstuczyn Nov 24, 2022
0f03b09
More Recipient boxing action
jstuczyn Nov 24, 2022
90e5a6e
Requesting additional reply surbs for retransmission BEFORE dipping b…
jstuczyn Nov 24, 2022
789e932
Making clippy generally happier
jstuczyn Nov 24, 2022
4131a83
Wasm client compiles (but might not yet work correctly)
jstuczyn Nov 24, 2022
6bed6af
Feature/use expect instead of panicking (#1797)
jstuczyn Nov 24, 2022
72f83c6
Fix decrypting stored received msg (#1786)
octol Nov 24, 2022
6380bbd
real_traffic_stream: reduce frequency of status print (#1794)
octol Nov 23, 2022
322b45b
Properly defined unnamed errors
jstuczyn Nov 25, 2022
dad91e8
Dealing with previously ignored errors
jstuczyn Nov 25, 2022
617a05b
logging improvements
jstuczyn Nov 25, 2022
d033cad
Merge branch 'release/v1.2.0' into feature/multi-surbs
jstuczyn Nov 25, 2022
d7ad88a
Removed old example code
jstuczyn Nov 25, 2022
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ validator-config
*.patch
validator-api-config.toml
dist
storybook-static
storybook-static
envs/qwerty.env
134 changes: 84 additions & 50 deletions Cargo.lock

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

7 changes: 5 additions & 2 deletions clients/client-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition = "2021"

[dependencies]
dirs = "4.0"
dashmap = "5.4.0"
futures = "0.3"
humantime-serde = "1.0"
log = "0.4"
Expand Down Expand Up @@ -50,12 +51,14 @@ features = ["futures"]
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.task]
path = "../../common/task"

[target."cfg(not(target_arch = \"wasm32\"))".dependencies.sled]
version = "0.34.7"

[dev-dependencies]
tempfile = "3.1.0"

[features]
default = ["reply-surb"]
default = []
wasm = ["gateway-client/wasm"]
coconut = ["gateway-client/coconut", "gateway-requests/coconut"]
reply-surb = ["sled"]

15 changes: 8 additions & 7 deletions clients/client-core/src/client/cover_traffic_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,16 @@ impl LoopCoverTrafficStream<OsRng> {
// poisson delay, but is it really a problem?
let topology_permit = self.topology_access.get_read_permit().await;
// the ack is sent back to ourselves (and then ignored)
let topology_ref_option = topology_permit.try_get_valid_topology_ref(
let topology_ref = match topology_permit.try_get_valid_topology_ref(
&self.our_full_destination,
Some(&self.our_full_destination),
);
if topology_ref_option.is_none() {
warn!("No valid topology detected - won't send any loop cover message this time");
return;
}
let topology_ref = topology_ref_option.unwrap();
) {
Ok(topology) => topology,
Err(err) => {
warn!("We're not going to send any loop cover message this time, as the current topology seem to be invalid - {err}");
return;
}
};

let cover_message = generate_loop_cover_packet(
&mut self.rng,
Expand Down
Loading