Skip to content

Commit 9133485

Browse files
authored
Merge pull request #99 from blinklabs-io/fix/readme-and-pre-conway
fix: update README and preprod and preview network configs
2 parents 6ce58ef + a26b811 commit 9133485

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,18 @@ storage and IPC (interprocess communication) so they live beyond the lifetime
117117
of the container. To mount local host paths instead of using Docker's built in
118118
volumes, use the local path on the left side of a `-v` argument.
119119

120-
An example of a more advanced configuration for mainnet:
120+
An example of a more advanced configuration, running a block producer for
121+
mainnet:
121122

122123
```bash
123124
docker run --detach \
124125
--name cardano-node \
125126
--restart unless-stopped \
126-
-e CARDANO_CONFIG=/opt/cardano/config/mainnet/p2p-config.json \
127-
-e CARDANO_TOPOLOGY=/opt/cardano/config/mainnet/p2p-topology.json \
127+
-e CARDANO_BLOCK_PRODUCER=true \
128+
-e CARDANO_SHELLEY_KES_KEY=/opt/cardano/config/keys/kes.skey \
129+
-e CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/opt/cardano/config/keys/node.cert \
130+
-e CARDANO_SHELLEY_VRF_KEY=/opt/cardano/config/keys/vrf.skey \
131+
-v /src/cardano/node-keys:/opt/cardano/config/keys \
128132
-v /srv/cardano/node-db:/opt/cardano/data \
129133
-v /srv/cardano/node-ipc:/opt/cardano/ipc \
130134
-p 3001:3001 \
@@ -134,14 +138,14 @@ docker run --detach \
134138

135139
The above uses Docker's built in supervisor to restart a container which fails
136140
for any reason. This will also cause the container to automatically restart
137-
after a host reboot, so long as Docker is configured to start on boot. The
138-
current default configuration for mainnet does not enable P2P, so we override
139-
the configuration with the shipped `p2p-config.json` and its accompanying
140-
`p2p-topology.json` to enable it. Our node's persistent data and client
141-
communication socket are mapped to `/src/cardano/node-db` and
142-
`/src/cardano/node-ipc` on the host, respectively. This allows for running
143-
applications directly on the host which may need access to these. Last, we add
144-
mapping the host's port 12798 to the container 12798, which is the port for
141+
after a host reboot, so long as Docker is configured to start on boot. We
142+
set variables to configure a block producer and pass the paths to the 3 keys
143+
we need. Our node's persistent data and client communication socket are mapped
144+
to `/src/cardano/node-db` and `/src/cardano/node-ipc` on the host,
145+
respectively. This allows for running applications directly on the host which
146+
may need access to these. We also map `/src/cardano/node-keys` on the host to
147+
a path within the container to support running as a block producer. Last, we
148+
add mapping the host's port 12798 to the container 12798, which is the port for
145149
exposing the node's metrics in Prometheus format, for monitoring.
146150

147151
This mode of operation allows configuring multiple facets of the node using

config/preprod/config.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"AlonzoGenesisFile": "alonzo-genesis.json",
33
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4-
"ApplicationName": "cardano-sl",
5-
"ApplicationVersion": 0,
64
"ByronGenesisFile": "byron-genesis.json",
75
"ByronGenesisHash": "d4b8de7a11d929a323373cbab6c1a9bdc931beffff11db111cf9d57356ee1937",
86
"ConwayGenesisFile": "conway-genesis.json",
9-
"ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
7+
"ConwayGenesisHash": "89dd23dc6a020afa0c7521fe52fe14e38d494129933a3604154a3acfa4ac16e4",
108
"EnableP2P": true,
119
"LastKnownBlockVersion-Alt": 0,
1210
"LastKnownBlockVersion-Major": 2,
@@ -36,13 +34,14 @@
3634
"TraceDiffusionInitialization": true,
3735
"TraceErrorPolicy": true,
3836
"TraceForge": true,
39-
"TraceHandshake": false,
37+
"TraceHandshake": true,
4038
"TraceInboundGovernor": true,
4139
"TraceIpSubscription": true,
4240
"TraceLedgerPeers": true,
4341
"TraceLocalChainSyncProtocol": false,
42+
"TraceLocalConnectionManager": true,
4443
"TraceLocalErrorPolicy": true,
45-
"TraceLocalHandshake": false,
44+
"TraceLocalHandshake": true,
4645
"TraceLocalRootPeers": true,
4746
"TraceLocalTxSubmissionProtocol": false,
4847
"TraceLocalTxSubmissionServer": false,

config/preview/config.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{
22
"AlonzoGenesisFile": "alonzo-genesis.json",
33
"AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4-
"ApplicationName": "cardano-sl",
5-
"ApplicationVersion": 0,
64
"ByronGenesisFile": "byron-genesis.json",
75
"ByronGenesisHash": "83de1d7302569ad56cf9139a41e2e11346d4cb4a31c00142557b6ab3fa550761",
86
"ConwayGenesisFile": "conway-genesis.json",
9-
"ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
7+
"ConwayGenesisHash": "89dd23dc6a020afa0c7521fe52fe14e38d494129933a3604154a3acfa4ac16e4",
108
"EnableP2P": true,
11-
"ExperimentalHardForksEnabled": true,
12-
"ExperimentalProtocolsEnabled": true,
9+
"ExperimentalHardForksEnabled": false,
10+
"ExperimentalProtocolsEnabled": false,
1311
"LastKnownBlockVersion-Alt": 0,
1412
"LastKnownBlockVersion-Major": 3,
1513
"LastKnownBlockVersion-Minor": 1,
@@ -42,13 +40,14 @@
4240
"TraceDiffusionInitialization": true,
4341
"TraceErrorPolicy": true,
4442
"TraceForge": true,
45-
"TraceHandshake": false,
43+
"TraceHandshake": true,
4644
"TraceInboundGovernor": true,
4745
"TraceIpSubscription": true,
4846
"TraceLedgerPeers": true,
4947
"TraceLocalChainSyncProtocol": false,
48+
"TraceLocalConnectionManager": true,
5049
"TraceLocalErrorPolicy": true,
51-
"TraceLocalHandshake": false,
50+
"TraceLocalHandshake": true,
5251
"TraceLocalRootPeers": true,
5352
"TraceLocalTxSubmissionProtocol": false,
5453
"TraceLocalTxSubmissionServer": false,

0 commit comments

Comments
 (0)