feat: add peer transport preference modes#7851
Conversation
|
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
f2f5dbe to
691bcb2
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces new transport types, TorTcp and TcpTor, and updates the default transport configuration to TcpTor. It implements logic to prioritize and sort dial addresses based on the selected transport's protocol preferences. Additionally, it refines protocol support for existing transport types, such as restricting the Tor transport to the Onion protocol, and includes comprehensive unit and integration tests to verify these changes. I have no feedback to provide.
| proxy_bypass_predicate: Arc::new(FalsePredicate::new()), | ||
| }); | ||
| } | ||
| transport.set_supported_protocols(TransportType::Tcp.get_supported_protocols()); |
There was a problem hiding this comment.
this above needs updating as well
There was a problem hiding this comment.
this part is still not correct
| # This setting is optional however, if it is not specified, this node will not be able to connect to nodes that | ||
| # only advertise an onion address. (default = ) | ||
| # Configures a tor proxy available to the TCP transport. Peer selection only includes onion addresses when using | ||
| # type = "tor", "tor_tcp" or "tcp_tor". (default = ) |
There was a problem hiding this comment.
fill in the default here
| use tari_integration_tests::TariWorld; | ||
| use tari_p2p::TransportType; | ||
|
|
||
| #[then(expr = "peer transport mode {word} supports protocols {string}")] |
There was a problem hiding this comment.
this is simply unit tests parading as cucumber tests, cucumber tests will test connectivity and the dailed addresses between actual running nodes
691bcb2 to
dd9a84f
Compare
|
Thanks for the review. I pushed dd9a84f addressing the requested changes:
The commit is SSH-signed and the signed-commit check is green. I could not run the Rust test suite locally in this environment because cargo is not installed. |
|
there is that missing part in initi thats not correct |
|
Thanks, I found the remaining initialization issue and pushed 8b38730. The explicit Tcp transport branch no longer configures the legacy tor_socks_address proxy path, so Tcp stays TCP-only. The mixed TcpTor/TorTcp modes continue through the Tor hidden-service transport branch where the protocol availability/order is set from the selected TransportType.\n\nVerification: git diff --check. I still cannot run the Rust tests locally because cargo is not installed in this environment. |
Fixes #7830
Summary
Validation