Skip to content

Commit 2a115ab

Browse files
authored
Merge pull request #59 from input-output-hk/coot/diffusion-mode
Documented diffusionMode option in the P2P topology file
2 parents bcdccfa + cd88029 commit 2a115ab

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

docs/getting-started/understanding-config-files.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,20 @@ A minimal version of this file looks like this:
5353
"advertise": false,
5454
"valency": 1,
5555
"warmValency": 2,
56-
"trustable": true
56+
"trustable": true,
57+
"diffusionMode": "InitiatorOnly"
58+
},
59+
{ "accessPoints": [
60+
{
61+
"address": "y.y.y.y",
62+
"port": 3001
63+
}
64+
],
65+
"advertise": false,
66+
"valency": 1,
67+
"warmValency": 2,
68+
"trustable": true,
69+
"diffusionMode": "InitiatorAndResponder"
5770
}
5871
],
5972
"publicRoots": [
@@ -90,12 +103,20 @@ A minimal version of this file looks like this:
90103
Note: one can also use the deprecated now `valency` field for `hotValency`.
91104

92105

93-
- `warmValency` is an optional field, similar to `hotValency`, that informs the node about the number of peers it should maintain as warm.
106+
* `warmValency` is an optional field, similar to `hotValency`, that informs the node about the number of peers it should maintain as warm.
94107
This field is optional and defaults to the value set in the `valency` or `hotValency` field.
95108
If a value is specified for `warmValency`, it should be greater than or equal to the one defined in `hotValency`; otherwise, or `hotValency` will be adjusted to match this value.
96109
We recommend users set the `warmValency` value to `hotValency + 1` to ensure at least one backup peer is available to be promoted to a hot connection in case of unexpected events.
97110
Check [this issue](https://github.com/intersectmbo/ouroboros-network/issues/4565) for more context on this `WarmValency` option.
98111

112+
* `diffusionMode` is an optional field. It can either be `"InitiatorAndResponder"` (the default value) or `"InitiatorOnly"` (similar to `DiffusionMode` in the configuration file).
113+
If `"InitiatorOnly"` is set, then all local roots in this group will negotiate initiator-only diffusion mode, e.g. the TCP connection will be used as a unidirectional connection.
114+
115+
The topology setting overwrites `DiffusionMode` from the configuration file for given local root peers.
116+
It is meant to overwrite the diffusion mode when a node is running in `InitiatorAndResponder` mode (the default).
117+
The other way is also possible, but note that when the option in the configuration file is set to `InitiatorOnly`, the node will not run the accept loop.
118+
119+
`diffusionMode` was introduced in `cardano-node-10.2`.
99120

100121
* Local root groups shall be non-overlapping.
101122

0 commit comments

Comments
 (0)