Skip to content

Commit 21dbd13

Browse files
committed
Make more options internal
Change-Id: Id0000000b24f65646acb11fe480124d5bc24e158
1 parent dad106a commit 21dbd13

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

src/Chainweb/Chainweb/Configuration.hs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,17 @@ pCutConfig = id
371371
<$< cutFetchTimeout .:: option auto
372372
% long "cut-fetch-timeout"
373373
<> help "The timeout for processing new cuts in microseconds"
374+
<> internal
374375
<*< cutInitialBlockHeightLimit .:: fmap (Just . BlockHeight) . option auto
375376
% long "initial-block-height-limit"
376377
<> help "Reset initial cut to this block height."
377378
<> metavar "INT"
379+
<> internal
378380
<*< cutFastForwardBlockHeightLimit .:: fmap (Just . BlockHeight) . option auto
379381
% long "fast-forward-block-height-limit"
380382
<> help "When --only-sync-pact is given fast forward to this height. Ignored otherwise."
381383
<> metavar "INT"
384+
<> internal
382385

383386
-- -------------------------------------------------------------------------- --
384387
-- Service API Configuration
@@ -443,6 +446,7 @@ pServiceApiConfig = id
443446
<*< serviceApiPayloadBatchLimit .:: fmap PayloadBatchLimit . option auto
444447
% prefixLong service "payload-batch-limit"
445448
<> suffixHelp service "upper limit for the size of payload batches on the service API"
449+
<> internal
446450
<*< serviceApiConfigValidateSpec .:: enableDisableFlag
447451
% prefixLong service "validate-spec"
448452
<> internal -- hidden option, for expert use
@@ -630,19 +634,23 @@ pChainwebConfiguration = id
630634
<> help "Max allowed reorg depth.\
631635
\ Consult https://github.com/kadena-io/chainweb-node/blob/master/docs/RecoveringFromDeepForks.md for\
632636
\ more information. "
637+
<> internal
633638
<*< parserOptionGroup "Cut Processing" (configCuts %:: pCutConfig)
634639
<*< parserOptionGroup "Service API" (configServiceApi %:: pServiceApiConfig)
635640
<*< parserOptionGroup "Mining Coordination" (configMining %:: pMiningConfig)
636641
<*< configOnlySync .:: boolOption_
637642
% long "only-sync"
638643
<> help "Terminate after synchronizing the pact databases to the latest cut"
644+
<> internal
639645
<*< configReadOnlyReplay .:: boolOption_
640646
% long "read-only-replay"
641647
<> help "Replay the block history non-destructively"
648+
<> internal
642649
<*< configSyncChains .:: fmap Just % jsonOption
643650
% long "sync-chains"
644651
<> help "The only Pact databases to synchronize. If empty or unset, all chains will be synchronized."
645652
<> metavar "JSON list of chain ids"
653+
<> internal
646654
<*< parserOptionGroup "Backup" (configBackup %:: pBackupConfig)
647655

648656
-- FIXME support payload providers
@@ -658,9 +666,9 @@ parseVersion = constructVersion
658666
<> metavar (T.unpack $
659667
"[" <> T.intercalate "," (getChainwebVersionName . _versionName <$> knownVersions) <> "]")
660668
)
661-
<*> optional (textOption @Fork (long "fork-upper-bound" <> help "(development mode only) the latest fork the node will enable"))
662-
<*> optional (BlockDelay <$> textOption (long "block-delay" <> help "(development mode only) the block delay in seconds per block"))
663-
<*> switch (long "disable-pow" <> help "(development mode only) disable proof of work check")
669+
<*> optional (textOption @Fork (long "fork-upper-bound" <> help "(development mode only) the latest fork the node will enable" <> internal))
670+
<*> optional (BlockDelay <$> textOption (long "block-delay" <> help "(development mode only) the block delay in seconds per block" <> internal) )
671+
<*> switch (long "disable-pow" <> help "(development mode only) disable proof of work check" <> internal)
664672
where
665673
constructVersion cliVersion fub bd disablePow' oldVersion = winningVersion
666674
& versionBlockDelay .~ fromMaybe (_versionBlockDelay winningVersion) bd

src/Chainweb/Mempool/P2pConfig.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ pMempoolP2pConfig cid = id
8080
<$< mempoolP2pConfigMaxSessionCount .:: option auto
8181
% prefixLongCid cid "mempool-p2p-max-session-count"
8282
<> helpCid cid "maximum number of sessions that are active at any time"
83+
<> internal
8384
<*< mempoolP2pConfigSessionTimeout .:: textOption
8485
% prefixLongCid cid "mempool-p2p-session-timeout"
8586
<> helpCid cid "timeout for sessions in seconds"
87+
<> internal
8688
<*< mempoolP2pConfigPollInterval .:: textOption
8789
% prefixLongCid cid "mempool-p2p-poll-interval"
8890
<> helpCid cid "poll interval for synchronizing mempools in seconds"
89-
91+
<> internal

src/Chainweb/Miner/Config.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ pCoordinationConfig = id
174174
<*< coordinationUpdateStreamTimeout .:: jsonOption
175175
% long "mining-update-stream-timeout"
176176
<> help "duration that an update stream is kept open in seconds"
177+
<> internal
177178

178179
-- -------------------------------------------------------------------------- --
179180
-- Node Mining Config
@@ -206,6 +207,7 @@ pNodeMiningConfig = id
206207
<$< nodeMiningEnabled .:: enableDisableFlag
207208
% long "node-mining"
208209
<> help "ONLY FOR TESTING NETWORKS: whether to enable in node mining"
210+
<> internal
209211

210212
defaultNodeMining :: NodeMiningConfig
211213
defaultNodeMining = NodeMiningConfig

src/Chainweb/PayloadProvider/Pact/Configuration.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ pPactProviderConfig cid = id
147147
<$< pactConfigReintroTxs .:: enableDisableFlag
148148
% prefixLongCid cid "pact-tx-reintro"
149149
<> helpCid cid "whether to enable transaction reintroduction from losing forks"
150+
<> internal
150151
<*< pactConfigMempoolP2p %:: pEnableConfigCid "pact-mempool-p2p" cid pMempoolP2pConfig
151152
<*< pactConfigBlockGasLimit . iso StableEncoding _stableEncoding .:: jsonOption
152153
% prefixLongCid cid "pact-block-gas-limit"
@@ -160,6 +161,7 @@ pPactProviderConfig cid = id
160161
<*< pactConfigPreInsertCheckTimeout .:: jsonOption
161162
% prefixLongCid cid "pact-pre-insert-check-timeout"
162163
<> helpCid cid "Max allowed time in microseconds for the transactions validation in the PreInsertCheck command."
164+
<> internal
163165
<*< pactConfigAllowReadsInLocal .:: boolOption_
164166
% prefixLongCid cid "pact-allowReadsInLocal"
165167
<> helpCid cid "Enable direct database reads of smart contract tables in local queries."

src/P2P/Node/Configuration.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,24 +206,30 @@ pP2pConfiguration = id
206206
<*< p2pConfigMaxSessionCount .:: option auto
207207
% prefixLong net "p2p-max-session-count"
208208
<> suffixHelp net "maximum number of sessions that are active at any time"
209+
<> internal
209210
<*< p2pConfigMaxPeerCount .:: option auto
210211
% prefixLong net "p2p-max-peer-count"
211212
<> suffixHelp net "maximum number of entries in the peer database"
213+
<> internal
212214
<*< p2pConfigSessionTimeout .:: textOption
213215
% prefixLong net "p2p-session-timeout"
214216
<> suffixHelp net "timeout for sessions in seconds"
217+
<> internal
215218
<*< p2pConfigKnownPeers %:: pLeftMonoidalUpdate
216219
(pure <$> pKnownPeerInfo)
217220
<*< p2pConfigIgnoreBootstrapNodes .:: enableDisableFlag
218221
% prefixLong net "ignore-bootstrap-nodes"
219222
<> help "when enabled the hard-coded bootstrap nodes for network are ignored"
223+
<> internal
220224
<*< p2pConfigPrivate .:: enableDisableFlag
221225
% prefixLong net "private"
222226
<> help "when enabled this node becomes private and communicates only with the initially configured known peers"
227+
<> internal
223228
<*< p2pConfigBootstrapReachability .:: option auto
224229
% prefixLong net "bootstrap-reachability"
225230
<> help "the fraction of bootstrap nodes that must be reachable at startup"
226231
<> metavar "[0,1]"
232+
<> internal
227233
<*< p2pConfigTls .:: enableDisableFlag
228234
% prefixLong net "tls"
229235
<> internal -- hidden option, only for expert use

0 commit comments

Comments
 (0)