You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct config, CLI, and tracing claims in the Genesis mode HOWTO
Address review feedback and re-verify every claim against cardano-node
origin/master and ouroboros-network source.
- ConsensusMode is the only field that enables Genesis. UseTraceDispatcher
and TurnOnLogging are not Genesis prerequisites; they are generic tracing
options and have been removed from cardano-node (the new tracing system is
now unconditional).
- Host addresses come from the --host-addr / --host-ipv6-addr CLI options,
not HostIPv4Addr / HostIPv6Addr config.json keys (which do not exist).
Rewrite the IPv6 guidance: the node dials literal IPv6 snapshot peers
regardless of --host-ipv6-addr; the remedy is host routing or removing the
IPv6 peers from the snapshot.
- The GSM runs in both Praos and Genesis modes; only CSJ and GDD are
Genesis-only. Note MinBigLedgerPeersForTrustedState and LowLevelGenesisOptions
as the other Genesis-specific config fields.
- The peer snapshot is an optional peerSnapshotFile, not a required
peer-snapshot.json.
- Fix tracer claims: PeerStarvedUs is silenced by default until
BlockFetch.Decision is raised; DMaximum is not required for per-peer decline
reasons; the GDD debug info is the TraceGDDDebugInfo kind under
Consensus.GDD.TraceGDDEvent; CSJ InitializedAsDynamo needs Genesis mode, a
registered peer, and a Debug override.
- Clarify that useLedgerAfterSlot: -1 disables ledger peers.
Copy file name to clipboardExpand all lines: docs/website/contents/howtos/running_genesis_mode.md
+39-21Lines changed: 39 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,43 +3,51 @@
3
3
## When to use Genesis mode
4
4
5
5
Genesis mode lets a syncing node defend against long-range attacks without trusting recent ledger state for peer evaluation.
6
-
It adds defensive components (GSM, LoE, GDD, CSJ, LoP, DBF) on top of existing ChainSync/BlockFetch.
6
+
It adds defensive components — LoE, GDD, CSJ, LoP, and Devoted BlockFetch (DBF) — on top of existing ChainSync/BlockFetch, coordinated by the Genesis State Machine (GSM).
7
+
The GSM itself runs in both modes: it tracks whether the node is caught up and disables the Genesis-only components once it is.
7
8
See the [Genesis design doc](../references/miscellaneous/genesis_design.md) for the full component description.
8
9
9
10
Use Genesis mode on **relay nodes and syncing nodes** that connect to the public network.
10
11
11
-
Use Praos mode on **block-producing nodes** that connect only to trusted local relays with `useLedgerAfterSlot: -1`.
12
-
A forger with `GenesisMode` + trusted `localRoots` + `useLedgerAfterSlot: -1` will behave like Praos mode in practice (the peer selection targets only differ when `(GenesisMode, TooOld)`), but there is no benefit over Praos mode in that configuration.
12
+
Use Praos mode on **block-producing nodes** that connect only to trusted local relays.
13
+
Setting `useLedgerAfterSlot: -1` disables ledger peers, so the node uses only its configured roots (`-1` turns ledger peers off; `0` would mean "always use the ledger").
14
+
A forger with `GenesisMode` + trusted `localRoots` + ledger peers disabled will behave like Praos mode in practice — the peer-selection target basis differs only in the `(GenesisMode, TooOld)` state — but there is no benefit over Praos mode in that configuration.
13
15
14
16
## Required configuration
15
17
16
-
The following `config.json`fields are prerequisites for Genesis mode:
18
+
Genesis mode is turned on by one `config.json`field:
17
19
18
20
```json
19
-
"ConsensusMode": "GenesisMode",
20
-
"UseTraceDispatcher": true,
21
-
"TurnOnLogging": true
21
+
"ConsensusMode": "GenesisMode"
22
22
```
23
23
24
24
`ConsensusMode` activates the Genesis defenses.
25
-
Praos-mode nodes do not emit GSM, CSJ, or GDD events at all — the tracers exist but are never written to.
25
+
The GSM runs in both modes, so a Praos-mode node still emits GSM events.
26
+
CSJ and GDD are Genesis-only defenses: a Praos-mode node never writes to those tracers.
26
27
27
-
The node also requires a peer snapshot file (`peer-snapshot.json`) listed in the topology, which provides the initial set of peers for ledger peer selection.
28
+
Two other `config.json` fields only take effect in Genesis mode: `MinBigLedgerPeersForTrustedState` (see [Small testnets](#small-testnets)) and `LowLevelGenesisOptions`.
29
+
30
+
The topology may also list a big-ledger-peer snapshot via the optional `peerSnapshotFile` field (a file path).
31
+
It seeds ledger peer selection with an initial set of big ledger peers.
32
+
It is not required: in Genesis mode with ledger peers enabled, a node without one only logs a recommendation to supply it.
28
33
29
34
## Host networking
30
35
31
-
The node binds listening sockets and creates outbound connections based on `HostIPv4Addr` and `HostIPv6Addr` in `config.json`:
36
+
`--host-addr` and `--host-ipv6-addr` are CLI options, not `config.json` fields:
32
37
33
-
```json
34
-
"HostIPv4Addr": "0.0.0.0",
35
-
"HostIPv6Addr": "::"
38
+
```sh
39
+
cardano-node run --host-addr 0.0.0.0 --host-ipv6-addr ::
36
40
```
37
41
38
-
If the peer snapshot contains IPv6 addresses but `HostIPv6Addr` is not set, the node will fail to connect to those peers with `Network is unreachable`.
39
-
On a host without IPv6 routing, omit `HostIPv6Addr` entirely — the node will skip IPv6 peers.
42
+
They set the local addresses the node binds its listening sockets to.
43
+
`--host-ipv6-addr` also selects the DNS lookup family: without it the node resolves only A records, so peers given as domain names never yield IPv6 addresses.
44
+
45
+
Neither option gates outbound connections to literal IPv6 addresses.
46
+
If the peer snapshot lists a peer by its IPv6 address, the node dials it whether or not `--host-ipv6-addr` is set.
47
+
On a host with no IPv6 route, that dial fails with `Network is unreachable`.
40
48
41
-
**Diagnostic**: if logs show repeated `Net.ConnectionManager.Remote.ConnectError` against IPv6 addresses (e.g. `[2a05:...]:3001`) while all `HandshakeSuccess` entries are IPv4, the host has no IPv6 route.
42
-
Either enable IPv6 on the host and set `HostIPv6Addr`, or remove it from the config.
49
+
**Diagnostic**: if logs show repeated `Net.ConnectionManager.Remote.ConnectError` against IPv6 addresses (e.g. `[2a05:...]:3001`) while all `HandshakeSuccess` entries are IPv4, the host has no IPv6 route to those peers.
50
+
To stop the failures, give the host an IPv6 route or remove the IPv6 peers from the snapshot.
43
51
44
52
## Small testnets
45
53
@@ -87,6 +95,8 @@ A Genesis sync stall is always somewhere in the feedback loop:
This is a linearization: LoP and CSJ run inside ChainSync, and the GSM is not a terminal sink — its state feeds back into ChainSync's LoP bucket, closing the loop.
99
+
90
100
The GSM has three states: `PreSyncing`, `Syncing`, `CaughtUp`.
91
101
92
102
### Stuck in PreSyncing
@@ -107,7 +117,7 @@ Look downstream:
107
117
108
118
-**LoE pinned**: `Consensus.GDD.TraceGDDEvent` shows the LoE candidate not advancing.
109
119
ChainDB tip stops growing despite headers flowing.
110
-
-**GDD impotent**: `TraceGDDDebug` shows multiple peers at equal density.
120
+
-**GDD impotent**: `Consensus.GDD.TraceGDDEvent` with `"kind": "TraceGDDDebugInfo"` shows multiple peers at equal density.
111
121
GDD is correctly refusing to act.
112
122
Cause is upstream: small peer set, era/window math, checkpoint config.
113
123
-**CSJ dynamo wedged**: no `Consensus.CSJ.SentJumpInstruction` for a long time.
@@ -133,7 +143,13 @@ ChainDB tip extending.
133
143
134
144
## Tracer configuration
135
145
136
-
At default severity (Notice), only GSM events, `PeerStarvedUs`, and ChainSync `Exception` are visible.
146
+
The overrides below use cardano-node's new tracing system, which is always on — no separate flag enables it.
147
+
(Older nodes gated it behind `UseTraceDispatcher`/`TurnOnLogging`, both generic and defaulting to on; current cardano-node has removed that switch.)
148
+
149
+
The trace namespaces below match mainline cardano-node; leaf names can change between node versions, so confirm them against the version you run.
150
+
151
+
At the default root severity (Notice), GSM events and ChainSync.Client `Exception` (severity Warning) are visible.
152
+
`BlockFetch.Decision.PeerStarvedUs` is severity Info and is silenced by the default config, so it only appears once you raise `BlockFetch.Decision` to Info or Debug (below).
137
153
To debug a stall, add the following to the `TraceOptions` object in `config.json`:
138
154
139
155
```json
@@ -147,7 +163,8 @@ To debug a stall, add the following to the `TraceOptions` object in `config.json
147
163
"Net.ConnectionManager": { "severity": "Debug" }
148
164
```
149
165
150
-
`detail: DMaximum` on `BlockFetch.Decision` is required for per-peer decline reasons in `PeersFetch` events.
166
+
`detail: DMaximum` on `BlockFetch.Decision` gives the most verbose per-peer output.
167
+
Per-peer decline reasons in `PeersFetch` already appear at the default detail level (any level above `DMinimal`), so `DMaximum` is not strictly required.
151
168
152
169
### Volume control
153
170
@@ -175,4 +192,5 @@ After restart, confirm the overrides took effect:
Within seconds of startup, expect `Consensus.GSM.InitializedInPreSyncing` and `Consensus.CSJ.InitializedAsDynamo`.
195
+
Within seconds of startup, expect `Consensus.GSM.InitializedInPreSyncing`.
196
+
Once a peer registers, expect `Consensus.CSJ.InitializedAsDynamo` — CSJ runs only in Genesis mode, and this event is severity Debug, so it needs the `Consensus.CSJ` Debug override above.
0 commit comments