Skip to content

Reconnect mixnet on ws connection loss #1711

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

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

neacsu
Copy link
Collaborator

@neacsu neacsu commented Dec 3, 2024

This change is Reviewable

Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1.
Reviewable status: 1 of 4 files reviewed, 1 unresolved discussion (waiting on @doums, @neacsu, @octol, @rokas-ambrazevicius, and @zaneschepke)


nym-vpn-core/crates/nym-vpn-lib/src/tunnel_state_machine/tunnel/mod.rs line 163 at r1 (raw file):

    };

    let mut mixnet_client_config = options.clone().mixnet_client_config.unwrap_or_default();

Nit: Probably better to clone mixnet_client_config instead of all options.

Copy link
Collaborator

@pronebird pronebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @doums, @neacsu, @octol, @rokas-ambrazevicius, and @zaneschepke)


nym-vpn-core/crates/nym-vpn-lib/src/bandwidth_controller.rs line 20 at r2 (raw file):

};
use nym_wg_gateway_client::{ErrorMessage, GatewayData, WgGatewayClient, WgGatewayLightClient};
use tokio_util::sync::CancellationToken;

Nit I started doing use separation using the following pattern:

use std::...

// external
use tokio::...

// workspace crates
use nym_*::...

// inside of executable/lib
use super::...

Not sure if you like it.

Copy link
Collaborator Author

@neacsu neacsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 4 files reviewed, 1 unresolved discussion (waiting on @doums, @octol, @pronebird, and @rokas-ambrazevicius)


nym-vpn-core/crates/nym-vpn-lib/src/bandwidth_controller.rs line 20 at r2 (raw file):

Previously, pronebird (Andrej Mihajlov) wrote…

Nit I started doing use separation using the following pattern:

use std::...

// external
use tokio::...

// workspace crates
use nym_*::...

// inside of executable/lib
use super::...

Not sure if you like it.

I like it, I was trying to do something similar, but not very consistently. Applied it here, will try to apply it more in the future as well

Copy link
Contributor

@octol octol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I say if it works, ship it! :)
Possibly we can take a stab at integrating it further into the state machine later, but I'm not really up to date on what's the best approach there

@neacsu neacsu force-pushed the feature/reconnect_mix_cl branch from 4c995f8 to 5a9545b Compare December 5, 2024 13:24
@neacsu neacsu changed the base branch from release/2024.1 to develop December 5, 2024 13:25
@neacsu neacsu merged commit 7ee7707 into develop Dec 5, 2024
18 of 19 checks passed
@neacsu neacsu deleted the feature/reconnect_mix_cl branch December 5, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants