-
Notifications
You must be signed in to change notification settings - Fork 93
Peers behind a firewall #5241
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
Open
the-headless-ghost
wants to merge
24
commits into
main
Choose a base branch
from
edgr/behind-firewall
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+328
−110
Open
Peers behind a firewall #5241
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
5d2e86d
Add behind firewall flag to local root config
the-headless-ghost c2e3eec
Add ConnectionMode to AcquireOutboundConnection
the-headless-ghost a12338a
CM and jobPromoteColdPeer fixes
the-headless-ghost 405b005
Add diffusion property test
the-headless-ghost e8fcd54
Update cardano-diffusion/tests/lib/Test/Cardano/Network/Diffusion/Tes…
the-headless-ghost a496ced
Update ouroboros-network/framework/lib/Ouroboros/Network/ConnectionMa…
the-headless-ghost c3e7c29
Update cardano-diffusion/tests/lib/Test/Cardano/Network/Diffusion/Tes…
the-headless-ghost f0ef9bb
Update cardano-diffusion/tests/lib/Test/Cardano/Network/Diffusion/Tes…
the-headless-ghost b82fd8d
Naming fix
the-headless-ghost baa81e7
Update ouroboros-network/framework/lib/Ouroboros/Network/ConnectionMa…
the-headless-ghost b843f5c
swap establishPeerConnection arguments
the-headless-ghost 1fedb07
Replace ConnectionMode with Provenance
the-headless-ghost 00072a1
correct var binding name
the-headless-ghost 09c19d2
Reuse FromJSON instance for RootConfig
the-headless-ghost a0b92e2
Remove ConnectionMode from the behind firewall changelog fragment
the-headless-ghost cc2519c
remove mutableConnState from failed aqcuire outbound connection
the-headless-ghost 6858015
Rename connection mode variables
the-headless-ghost 53beda8
EstablishedPeers cleanup
the-headless-ghost 01d2727
Fix comment for AcquireOutboundConnection
the-headless-ghost 34a5105
Replace local root peers fields with provenance fields
the-headless-ghost 0ef4c30
Update changelog fragment
the-headless-ghost 2e20fd0
Fix naming around TrInboundConnectionNotFound
the-headless-ghost 8fecf76
Cleanup: Formatting, comments
the-headless-ghost 0364702
Remove provenance from InboundConnectionNotFound
the-headless-ghost 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
17 changes: 17 additions & 0 deletions
17
cardano-diffusion/changelog.d/20251108_103013_edgr_behind_firewall.md
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <!-- | ||
| A new scriv changelog fragment. | ||
|
|
||
| Uncomment the section that is right (remove the HTML comment wrapper). | ||
| For top level release notes, leave all the headers commented out. | ||
| --> | ||
|
|
||
| ### Breaking | ||
|
|
||
| - Modified `establishPeerConnection` in `Test.Cardano.Network.PeerSelection.MockEnvironment`: | ||
| - Now only creates a new connection if no inbound connection is found and `ConnectionMode` allows it. | ||
| - Added tracing for newly created connections. | ||
|
|
||
| ### Non-Breaking | ||
|
|
||
| - Added a new tracer: `TraceEnvNewConnCreated`. | ||
| - Added a property test to verify that the node never connects to peers behind a firewall. |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -30,5 +30,6 @@ isValidTrustedPeerConfiguration | |
| IsTrustable -> not | ||
| . null | ||
| . rootAccessPoints | ||
| . rootConfig | ||
| $ localRoots | ||
| ) lprgs | ||
61 changes: 31 additions & 30 deletions
61
cardano-diffusion/tests/lib/Test/Cardano/Network/Diffusion/Testnet.hs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
22 changes: 22 additions & 0 deletions
22
ouroboros-network/changelog.d/20251108_101451_edgr_behind_firewall.md
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <!-- | ||
| A new scriv changelog fragment. | ||
|
|
||
| Uncomment the section that is right (remove the HTML comment wrapper). | ||
| For top level release notes, leave all the headers commented out. | ||
| --> | ||
|
|
||
| ### Breaking | ||
|
|
||
| - Changed the type of `localRoots` to `LocalRoots`. | ||
| - Modified `AcquireOutboundConnection` to include an additional parameter: `ConnectionMode`. | ||
| - `acquireOutboundConnectionImpl` only creates a new connection if the `ConnectionMode` function permits it. | ||
| - `jobPromoteColdPeer` only creates a new connection if no inbound connection is found and the peer is not behind a firewall. | ||
|
|
||
| ### Non-Breaking | ||
|
|
||
| - Added `LocalRoots` type in `Ouroboros.Network.PeerSelection.State.LocalRootPeers` with the following fields: | ||
| - `rootConfig` of type `RootConfig` | ||
| - `behindFirewall` of type `Bool` | ||
| - Added `localRootBehindFirewall` field to `LocalRootConfig`. | ||
| - Added a new sum type: `ConnectionMode`. | ||
| - Added a new constructor `InboundConnectionNotFound` for `ConnectionManagerError`. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.