Skip to content

Commit 8ab8d91

Browse files
committed
Rename TestEnableDevelopmentNetworkProtocols
TestEnableDevelopmentNetworkProtocols has been renamed to ExperimentalProtocols. An error is thrown if TestEnableDevelopmentNetworkProtocols is used to avoid it silently being set to False.
1 parent f0a45c4 commit 8ab8d91

File tree

13 files changed

+38
-33
lines changed

13 files changed

+38
-33
lines changed

Diff for: cardano-api/ChangeLog.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
### Features
66

7-
- Rename TestEnableDevelopmentHardForkEras to ExperimentalHardForksEnabled ([PR 4341](https://github.com/input-output-hk/cardano-node/pull/4341))
7+
- Rename `TestEnableDevelopmentHardForkEras` to `ExperimentalHardForksEnabled` and
8+
`TestEnableDevelopmentNetworkProtocols` to `ExperimentalProtocolsEnabled`
9+
([PR 4341](https://github.com/input-output-hk/cardano-node/pull/4341))
810

911
- Append, not prepend change output when balancing a transaction ([PR 4343](https://github.com/input-output-hk/cardano-node/pull/4343))
1012

Diff for: cardano-node/src/Cardano/Node/Configuration/POM.hs

+13-10
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ data NodeConfiguration
116116
--
117117
-- This flag should be set to 'True' when testing the new protocol
118118
-- versions.
119-
, ncTestEnableDevelopmentNetworkProtocols :: !Bool
119+
, ncExperimentalProtocolsEnabled :: !Bool
120120

121121
-- BlockFetch configuration
122122
, ncMaxConcurrencyBulkSync :: !(Maybe MaxConcurrencyBulkSync)
@@ -172,7 +172,7 @@ data PartialNodeConfiguration
172172
-- Node parameters, not protocol-specific:
173173
, pncDiffusionMode :: !(Last DiffusionMode)
174174
, pncSnapshotInterval :: !(Last SnapshotInterval)
175-
, pncTestEnableDevelopmentNetworkProtocols :: !(Last Bool)
175+
, pncExperimentalProtocolsEnabled :: !(Last Bool)
176176

177177
-- BlockFetch configuration
178178
, pncMaxConcurrencyBulkSync :: !(Last MaxConcurrencyBulkSync)
@@ -223,8 +223,11 @@ instance FromJSON PartialNodeConfiguration where
223223
<- Last . fmap getDiffusionMode <$> v .:? "DiffusionMode"
224224
pncSnapshotInterval
225225
<- Last . fmap RequestedSnapshotInterval <$> v .:? "SnapshotInterval"
226-
pncTestEnableDevelopmentNetworkProtocols
227-
<- Last <$> v .:? "TestEnableDevelopmentNetworkProtocols"
226+
pncExperimentalProtocolsEnabled <- fmap Last $ do
227+
failOnRemovedField v "TestEnableDevelopmentNetworkProtocols"
228+
"TestEnableDevelopmentNetworkProtocols has been renamed to ExperimentalProtocolsEnabled"
229+
230+
v .:? "ExperimentalProtocolsEnabled"
228231

229232
-- Blockfetch parameters
230233
pncMaxConcurrencyBulkSync <- Last <$> v .:? "MaxConcurrencyBulkSync"
@@ -288,7 +291,7 @@ instance FromJSON PartialNodeConfiguration where
288291
, pncSocketConfig = Last . Just $ SocketConfig mempty mempty mempty pncSocketPath
289292
, pncDiffusionMode
290293
, pncSnapshotInterval
291-
, pncTestEnableDevelopmentNetworkProtocols
294+
, pncExperimentalProtocolsEnabled
292295
, pncMaxConcurrencyBulkSync
293296
, pncMaxConcurrencyDeadline
294297
, pncLoggingSwitch = Last $ Just pncLoggingSwitch'
@@ -452,7 +455,7 @@ defaultPartialNodeConfiguration =
452455
, pncSocketConfig = Last . Just $ SocketConfig mempty mempty mempty mempty
453456
, pncDiffusionMode = Last $ Just InitiatorAndResponderDiffusionMode
454457
, pncSnapshotInterval = Last $ Just DefaultSnapshotInterval
455-
, pncTestEnableDevelopmentNetworkProtocols = Last $ Just False
458+
, pncExperimentalProtocolsEnabled = Last $ Just False
456459
, pncTopologyFile = Last . Just $ TopologyFile "configuration/cardano/mainnet-topology.json"
457460
, pncProtocolFiles = mempty
458461
, pncValidateDB = mempty
@@ -525,9 +528,9 @@ makeNodeConfiguration pnc = do
525528
$ pncEnableP2P pnc
526529

527530
-- TODO: This is not mandatory
528-
testEnableDevelopmentNetworkProtocols <-
529-
lastToEither "Missing TestEnableDevelopmentNetworkProtocols" $
530-
pncTestEnableDevelopmentNetworkProtocols pnc
531+
experimentalProtocols <-
532+
lastToEither "Missing ExperimentalProtocolsEnabled" $
533+
pncExperimentalProtocolsEnabled pnc
531534
return $ NodeConfiguration
532535
{ ncConfigFile = configFile
533536
, ncTopologyFile = topologyFile
@@ -545,7 +548,7 @@ makeNodeConfiguration pnc = do
545548
, ncSocketConfig = socketConfig
546549
, ncDiffusionMode = diffusionMode
547550
, ncSnapshotInterval = snapshotInterval
548-
, ncTestEnableDevelopmentNetworkProtocols = testEnableDevelopmentNetworkProtocols
551+
, ncExperimentalProtocolsEnabled = experimentalProtocols
549552
, ncMaxConcurrencyBulkSync = getLast $ pncMaxConcurrencyBulkSync pnc
550553
, ncMaxConcurrencyDeadline = getLast $ pncMaxConcurrencyDeadline pnc
551554
, ncLoggingSwitch = loggingSwitch

Diff for: cardano-node/src/Cardano/Node/Parsers.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ nodeRunParser = do
8888
, pncDatabaseFile = DbFile <$> dbFp
8989
, pncDiffusionMode = mempty
9090
, pncSnapshotInterval = snapshotInterval
91-
, pncTestEnableDevelopmentNetworkProtocols = mempty
91+
, pncExperimentalProtocols = mempty
9292
, pncProtocolFiles = Last $ Just ProtocolFilepaths
9393
{ byronCertFile
9494
, byronKeyFile

Diff for: cardano-node/src/Cardano/Node/Run.hs

+5-5
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ handleSimpleNode runP p2pMode tracers nc onKernel = do
443443
(readTVar useLedgerVar)
444444
, srnDiffusionTracers = diffusionTracers tracers
445445
, srnDiffusionTracersExtra = diffusionTracersExtra tracers
446-
, srnEnableInDevelopmentVersions = ncTestEnableDevelopmentNetworkProtocols nc
446+
, srnEnableInDevelopmentVersions = ncExperimentalProtocols nc
447447
, srnTraceChainDB = chainDBTracer tracers
448448
, srnMaybeMempoolCapacityOverride = ncMaybeMempoolCapacityOverride nc
449449
}
@@ -483,7 +483,7 @@ handleSimpleNode runP p2pMode tracers nc onKernel = do
483483
, srnDiffusionArgumentsExtra = mkNonP2PArguments ipProducers dnsProducers
484484
, srnDiffusionTracers = diffusionTracers tracers
485485
, srnDiffusionTracersExtra = diffusionTracersExtra tracers
486-
, srnEnableInDevelopmentVersions = ncTestEnableDevelopmentNetworkProtocols nc
486+
, srnEnableInDevelopmentVersions = ncExperimentalProtocols nc
487487
, srnTraceChainDB = chainDBTracer tracers
488488
, srnMaybeMempoolCapacityOverride = ncMaybeMempoolCapacityOverride nc
489489
}
@@ -509,13 +509,13 @@ handleSimpleNode runP p2pMode tracers nc onKernel = do
509509
$ supportedNodeToClientVersions (Proxy @blk)
510510
(_, Nothing) -> Map.keys
511511
$ supportedNodeToClientVersions (Proxy @blk)
512-
when ( ncTestEnableDevelopmentNetworkProtocols nc
512+
when ( ncExperimentalProtocols nc
513513
&& not (null developmentNtnVersions))
514514
$ traceWith (startupTracer tracers)
515515
(WarningDevelopmentNodeToNodeVersions
516516
developmentNtnVersions)
517517

518-
when ( ncTestEnableDevelopmentNetworkProtocols nc
518+
when ( ncExperimentalProtocols nc
519519
&& not (null developmentNtcVersions))
520520
$ traceWith (startupTracer tracers)
521521
(WarningDevelopmentNodeToClientVersions
@@ -552,7 +552,7 @@ handleSimpleNode runP p2pMode tracers nc onKernel = do
552552
-> Map k v
553553
-> Map k v
554554
limitToLatestReleasedVersion prj =
555-
if ncTestEnableDevelopmentNetworkProtocols nc then id
555+
if ncExperimentalProtocols nc then id
556556
else
557557
case prj $ latestReleasedNodeVersion (Proxy @blk) of
558558
Nothing -> id

Diff for: cardano-node/src/Cardano/Node/Startup.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ data StartupTrace blk =
103103
-- | Warn when 'EnableP2P' is set.
104104
| P2PWarning
105105

106-
-- | Warn when 'TestEnableDevelopmentNetworkProtocols' is set and affects
106+
-- | Warn when 'ExperimentalProtocolsEnabled' is set and affects
107107
-- node-to-node protocol.
108108
--
109109
| WarningDevelopmentNodeToNodeVersions [NodeToNodeVersion]
110110

111-
-- | Warn when 'TestEnableDevelopmentNetworkProtocols' is set and affects
111+
-- | Warn when 'ExperimentalProtocolsEnabled' is set and affects
112112
-- node-to-client protocol.
113113
--
114114
| WarningDevelopmentNodeToClientVersions [NodeToClientVersion]

Diff for: cardano-node/test/Test/Cardano/Node/POM.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ testPartialYamlConfig =
5656
, pncShutdownConfig = Last Nothing
5757
, pncDiffusionMode = Last Nothing
5858
, pncSnapshotInterval = mempty
59-
, pncTestEnableDevelopmentNetworkProtocols = Last Nothing
59+
, pncExperimentalProtocols = Last Nothing
6060
, pncMaxConcurrencyBulkSync = Last Nothing
6161
, pncMaxConcurrencyDeadline = Last Nothing
6262
, pncLoggingSwitch = Last $ Just True
@@ -91,7 +91,7 @@ testPartialCliConfig =
9191
, pncDatabaseFile = mempty
9292
, pncDiffusionMode = mempty
9393
, pncSnapshotInterval = Last . Just . RequestedSnapshotInterval $ secondsToDiffTime 100
94-
, pncTestEnableDevelopmentNetworkProtocols = Last $ Just True
94+
, pncExperimentalProtocols = Last $ Just True
9595
, pncProtocolFiles = Last . Just $ ProtocolFilepaths Nothing Nothing Nothing Nothing Nothing Nothing
9696
, pncValidateDB = Last $ Just True
9797
, pncProtocolConfig = mempty
@@ -130,7 +130,7 @@ eExpectedConfig = do
130130
(GenesisFile "dummmy-genesis-file") Nothing
131131
, ncDiffusionMode = InitiatorAndResponderDiffusionMode
132132
, ncSnapshotInterval = RequestedSnapshotInterval $ secondsToDiffTime 100
133-
, ncTestEnableDevelopmentNetworkProtocols = True
133+
, ncExperimentalProtocols = True
134134
, ncMaxConcurrencyBulkSync = Nothing
135135
, ncMaxConcurrencyDeadline = Nothing
136136
, ncLoggingSwitch = True

Diff for: configuration/chairman/byron-shelley/configuration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ApplicationVersion: 1
5252

5353
##### Enable P2P Mode #####
5454
EnableP2P: False
55-
TestEnableDevelopmentNetworkProtocols: True
55+
ExperimentalProtocolsEnabled: True
5656

5757
##### Logging configuration #####
5858

Diff for: nix/nixos/cardano-node-service.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let
2424
TargetNumberOfKnownPeers = cfg.targetNumberOfKnownPeers;
2525
TargetNumberOfEstablishedPeers = cfg.targetNumberOfEstablishedPeers;
2626
TargetNumberOfActivePeers = cfg.targetNumberOfActivePeers;
27-
TestEnableDevelopmentNetworkProtocols = true;
27+
ExperimentalProtocolsEnabled = true;
2828
MaxConcurrencyBulkSync = 2;
2929
})) cfg.extraNodeConfig;
3030
baseInstanceConfig =

Diff for: nix/workbench/backend/nixops.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let
6969
TurnOnLogMetrics = true;
7070

7171
ExperimentalHardForksEnabled = true;
72-
TestEnableDevelopmentNetworkProtocols = true;
72+
ExperimentalProtocolsEnabled = true;
7373

7474
inherit TraceBlockFetchProtocol;
7575

Diff for: nix/workbench/backend/nixops/role-explorer.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ in {
8888
# "LastKnownBlockVersion-Minor"
8989
# "LastKnownBlockVersion-Alt"
9090
# "ExperimentalHardForksEnabled"
91-
# "TestEnableDevelopmentNetworkProtocols"
91+
# "ExperimentalProtocolsEnabled"
9292
# "TestShelleyHardForkAtEpoch"
9393
# "TestAllegraHardForkAtEpoch"
9494
# "TestMaryHardForkAtEpoch"
@@ -148,7 +148,7 @@ in {
148148
# TracingVerbosity = "NormalVerbosity";
149149

150150
# ExperimentalHardForksEnabled = true;
151-
# TestEnableDevelopmentNetworkProtocols = true;
151+
# ExperimentalProtocolsEnabled = true;
152152

153153
# TraceAcceptPolicy = false;
154154
# TraceBlockFetchClient = true;

Diff for: nix/workbench/service/nodes.nix

+4-4
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ let
166166
]
167167
//
168168
{
169-
ExperimentalHardForksEnabled = true;
170-
TestEnableDevelopmentNetworkProtocols = true;
171-
TurnOnLogMetrics = true;
172-
SnapshotFrequency = 1100;
169+
ExperimentalHardForksEnabled = true;
170+
ExperimentalProtocolsEnabled = true;
171+
TurnOnLogMetrics = true;
172+
SnapshotFrequency = 1100;
173173
};
174174
tracing-transform = {
175175
trace-dispatcher = cfg:

Diff for: scripts/babbage/mkfiles.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ $SED -i "${ROOT}/configuration.yaml" \
106106
echo "TestAlonzoHardForkAtEpoch: 0" >> "${ROOT}/configuration.yaml"
107107
echo "TestBabbageHardForkAtEpoch: 0" >> "${ROOT}/configuration.yaml"
108108
echo "TestConwayHardForkAtEpoch: 0" >> "${ROOT}/configuration.yaml"
109-
echo "TestEnableDevelopmentNetworkProtocols: True" >> "${ROOT}/configuration.yaml"
109+
echo "ExperimentalProtocolsEnabled: True" >> "${ROOT}/configuration.yaml"
110110

111111
# Copy the cost mode
112112

Diff for: scripts/byron-to-alonzo/mkfiles.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ if [ "$1" = "alonzo" ]; then
664664
echo "TestMaryHardForkAtEpoch: 0" >> ${ROOT}/configuration.yaml
665665
echo "TestAlonzoHardForkAtEpoch: 0" >> ${ROOT}/configuration.yaml
666666
echo "ExperimentalHardForksEnabled: True" >> ${ROOT}/configuration.yaml
667-
echo "TestEnableDevelopmentNetworkProtocols: True" >> ${ROOT}/configuration.yaml
667+
echo "ExperimentalProtocolsEnabled: True" >> ${ROOT}/configuration.yaml
668668

669669
$SED -i ${ROOT}/configuration.yaml \
670670
-e 's/LastKnownBlockVersion-Major: 1/LastKnownBlockVersion-Major: 5/'

0 commit comments

Comments
 (0)