forked from libp2p/rust-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Autonat v2 transport changes #3
Merged
umgefahren
merged 112 commits into
transport-redesign
from
autonat-v2-transport-changes
May 14, 2024
Merged
Changes from 108 commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
6cc5d7c
Implement the request response part of AutoNATv2
umgefahren 6d44a1e
First steps of implementing the client
umgefahren 81cd442
Extract ip-global and implemented lot of behaviour
umgefahren c0fd889
Intermediate commit
umgefahren 4ac520d
Resolved conflict
umgefahren fadf904
WIP client
umgefahren 60b4ccc
Run cargo fix
umgefahren 71487fc
Correct minor things
umgefahren 63b31e9
Implement suggestions
umgefahren 546d2b2
Merged master
umgefahren c16235f
Remove gloabl only
umgefahren 3bc107e
Initial server implementation
umgefahren 50fb5e4
Pass the basic test for the first time.
umgefahren d34782e
Move forwards to fewer bug fixes
umgefahren d1bd57d
Resolve merge conflict
umgefahren fee9de1
Make the things actually expire
umgefahren faa694a
Tests are working
umgefahren b01bae5
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren 6282cae
Implement in call suggested changes
umgefahren dab99d2
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren da2a790
Implement all suggestions from the PR review
umgefahren be35e80
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren 101a325
Implement latest suggestions
umgefahren bf2662a
Implement old suggestions i overlooked
umgefahren efdbe35
Resolve conflict
umgefahren c7350f9
Port dns transport
umgefahren 3079aa9
Port request response
umgefahren 596bb06
Port websocket
umgefahren 37cd309
Port allow block list and connection limits
umgefahren 9eea564
Address more concerns
umgefahren 9a85209
Move autonat down
umgefahren 4399bab
Move autonatv2 to autonat
umgefahren 663055e
Format code
thomaseizinger ba232cb
Alphabetically sort members list
thomaseizinger 22b96b3
Undo changes to global-only transport
thomaseizinger a19d7c8
Make deprecation warning work
thomaseizinger 46b8e84
Avoid diff in v1
thomaseizinger 037aa99
Undo behaviour change in v1
thomaseizinger 230ad08
Rename client config fields
thomaseizinger 7cbf413
Streamline creation of `peer_info` state
thomaseizinger 16b4d7c
Rewrite pending nonce handling
thomaseizinger fdc0c2d
A server might not support autonat on every connection
thomaseizinger a78c265
Prefer early-exit over `else`
thomaseizinger 8f6c27a
Use shorthand field logging syntax
thomaseizinger 170270a
Fix variable name
thomaseizinger 589cf6c
Improve log message
thomaseizinger feea82f
Log error using `fmt::Display`
thomaseizinger 8b0a544
Remove `server` field from `InternalStatusUpdate`
thomaseizinger 86849e5
Loop instead of repeating code
thomaseizinger 372d88d
Remove set that we never write to
thomaseizinger a2fcadd
Remove superflous tests
thomaseizinger 90d7d07
Handle tick reset next to polling
thomaseizinger 2a6ad94
Rewrite generation of dial requests
thomaseizinger b2d147f
Add docs and additional log statements for no candidates
thomaseizinger 7e3da61
Add more docs and rename protocol name constants
thomaseizinger e2fe41d
Inline `DialBack` struct
thomaseizinger 1e1aeca
Simplify handling of closed connection
thomaseizinger d5724c1
ConnectionIds are unique, meaning we can always just insert
thomaseizinger de91c55
Remove handling of `DialFailure`
thomaseizinger 3719440
Disable connection for future autonat requests on error
thomaseizinger 7b6d354
Remove unnecessary trait implementations
thomaseizinger 8ce2a01
Add comment
thomaseizinger 42ac03c
Rewrite dial-request to always index by nonce
thomaseizinger 3181113
Reset TestStatus on errors
thomaseizinger c51f8cc
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren 88b1092
Merge pull request #2 from libp2p/autonatv2-thomas-followup
umgefahren 4d96c33
Delay and use Result
umgefahren 8a135ea
Perform sleep correct
umgefahren fac1196
Remove is_local
umgefahren 9ed44d9
Remove the unnecessary check for confirmation
umgefahren a974707
Fix deprecation
umgefahren 117075f
Merge completed
umgefahren 3f2476a
Implement first jan suggestions
umgefahren 9254faa
Implement an example and a public tester
umgefahren 54e4c1f
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren d723c50
Port quic
umgefahren daf2a0b
Make it compile
umgefahren 6b85b82
Allow deprecated items
umgefahren e6afb5a
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren 0b94a01
Make the tests run
umgefahren a09e26d
Implement the latest changes to the protocol
umgefahren 61ae32e
Fix minor nits
umgefahren ad6ad8f
Implement DialBackOk correctly
umgefahren fbdc85f
Format
umgefahren 553511c
Fix issues raised by clippy
umgefahren 9bf52d4
Update protocols/autonat/src/v2/client/behaviour.rs
umgefahren 70f41f3
Update protocols/autonat/src/v2/client/handler/dial_back.rs
umgefahren 0773694
Update protocols/autonat/src/v2/client/handler/dial_back.rs
umgefahren 89acd28
Make error richer and trace it at a different point
umgefahren d571e51
Avoid stream close
umgefahren 10e4cee
Better error handling
umgefahren d4d671e
Correct one failing CI and change the license
umgefahren 2dc574e
Merge branch 'transport-redesign' into implement-autonat-v2
umgefahren 330fc51
Correct minor things
umgefahren 5f6f2f6
Resolve merge conflict
umgefahren 367273a
Add quic and dns to the example
umgefahren d79bca3
Remove unused import
umgefahren 8df0183
Change dial opts to make wasm tests pass
umgefahren 5d24d03
Remove futures-time to compile on wasm
umgefahren 41804be
Fix concerns by clippy
umgefahren bd495f9
Format
umgefahren 38be2b4
Use workaround to make generated code CI pass
umgefahren ce7596c
Correct webtransport test
umgefahren 0506c7b
Handle strange variable unused on windows
umgefahren 0b6dbb1
Remove clippy nit
umgefahren d2fddd5
Simplify a little bit and get rid of every performance opt
umgefahren 8f1fcbb
Version bumps and added author
umgefahren 8095e84
Upstream transport changes
umgefahren 0918ea8
Remove deprecated
umgefahren b07a463
Merge from master
umgefahren 0724086
Merge branch 'transport-redesign' into autonat-v2-transport-changes
umgefahren 45863c3
Formatting
umgefahren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(deprecated)] | ||
|
||
use libp2p::autonat; | ||
use libp2p::identify; | ||
use libp2p::kad; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are we deprecating here that can't be fixed in this PR? As a general rule, we should fix warnings in our own code. If we can't then our users won't be able to either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's some relic from the AutoNATv2 changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed that