Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/Chainweb/Chainweb/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,17 @@ pCutConfig = id
<$< cutFetchTimeout .:: option auto
% long "cut-fetch-timeout"
<> help "The timeout for processing new cuts in microseconds"
<> internal
<*< cutInitialBlockHeightLimit .:: fmap (Just . BlockHeight) . option auto
% long "initial-block-height-limit"
<> help "Reset initial cut to this block height."
<> metavar "INT"
<> internal
<*< cutFastForwardBlockHeightLimit .:: fmap (Just . BlockHeight) . option auto
% long "fast-forward-block-height-limit"
<> help "When --only-sync-pact is given fast forward to this height. Ignored otherwise."
<> metavar "INT"
<> internal

-- -------------------------------------------------------------------------- --
-- Service API Configuration
Expand Down Expand Up @@ -443,6 +446,7 @@ pServiceApiConfig = id
<*< serviceApiPayloadBatchLimit .:: fmap PayloadBatchLimit . option auto
% prefixLong service "payload-batch-limit"
<> suffixHelp service "upper limit for the size of payload batches on the service API"
<> internal
<*< serviceApiConfigValidateSpec .:: enableDisableFlag
% prefixLong service "validate-spec"
<> internal -- hidden option, for expert use
Expand Down Expand Up @@ -630,19 +634,23 @@ pChainwebConfiguration = id
<> help "Max allowed reorg depth.\
\ Consult https://github.com/kadena-io/chainweb-node/blob/master/docs/RecoveringFromDeepForks.md for\
\ more information. "
<> internal
<*< parserOptionGroup "Cut Processing" (configCuts %:: pCutConfig)
<*< parserOptionGroup "Service API" (configServiceApi %:: pServiceApiConfig)
<*< parserOptionGroup "Mining Coordination" (configMining %:: pMiningConfig)
<*< configOnlySync .:: boolOption_
% long "only-sync"
<> help "Terminate after synchronizing the pact databases to the latest cut"
<> internal
<*< configReadOnlyReplay .:: boolOption_
% long "read-only-replay"
<> help "Replay the block history non-destructively"
<> internal
<*< configSyncChains .:: fmap Just % jsonOption
% long "sync-chains"
<> help "The only Pact databases to synchronize. If empty or unset, all chains will be synchronized."
<> metavar "JSON list of chain ids"
<> internal
<*< parserOptionGroup "Backup" (configBackup %:: pBackupConfig)

-- FIXME support payload providers
Expand All @@ -658,9 +666,9 @@ parseVersion = constructVersion
<> metavar (T.unpack $
"[" <> T.intercalate "," (getChainwebVersionName . _versionName <$> knownVersions) <> "]")
)
<*> optional (textOption @Fork (long "fork-upper-bound" <> help "(development mode only) the latest fork the node will enable"))
<*> optional (BlockDelay <$> textOption (long "block-delay" <> help "(development mode only) the block delay in seconds per block"))
<*> switch (long "disable-pow" <> help "(development mode only) disable proof of work check")
<*> optional (textOption @Fork (long "fork-upper-bound" <> help "(development mode only) the latest fork the node will enable" <> internal))
<*> optional (BlockDelay <$> textOption (long "block-delay" <> help "(development mode only) the block delay in seconds per block" <> internal) )
<*> switch (long "disable-pow" <> help "(development mode only) disable proof of work check" <> internal)
where
constructVersion cliVersion fub bd disablePow' oldVersion = winningVersion
& versionBlockDelay .~ fromMaybe (_versionBlockDelay winningVersion) bd
Expand Down
4 changes: 3 additions & 1 deletion src/Chainweb/Mempool/P2pConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ pMempoolP2pConfig cid = id
<$< mempoolP2pConfigMaxSessionCount .:: option auto
% prefixLongCid cid "mempool-p2p-max-session-count"
<> helpCid cid "maximum number of sessions that are active at any time"
<> internal
<*< mempoolP2pConfigSessionTimeout .:: textOption
% prefixLongCid cid "mempool-p2p-session-timeout"
<> helpCid cid "timeout for sessions in seconds"
<> internal
<*< mempoolP2pConfigPollInterval .:: textOption
% prefixLongCid cid "mempool-p2p-poll-interval"
<> helpCid cid "poll interval for synchronizing mempools in seconds"

<> internal
2 changes: 2 additions & 0 deletions src/Chainweb/Miner/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ pCoordinationConfig = id
<*< coordinationUpdateStreamTimeout .:: jsonOption
% long "mining-update-stream-timeout"
<> help "duration that an update stream is kept open in seconds"
<> internal

-- -------------------------------------------------------------------------- --
-- Node Mining Config
Expand Down Expand Up @@ -206,6 +207,7 @@ pNodeMiningConfig = id
<$< nodeMiningEnabled .:: enableDisableFlag
% long "node-mining"
<> help "ONLY FOR TESTING NETWORKS: whether to enable in node mining"
<> internal

defaultNodeMining :: NodeMiningConfig
defaultNodeMining = NodeMiningConfig
Expand Down
2 changes: 2 additions & 0 deletions src/Chainweb/PayloadProvider/Pact/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ pPactProviderConfig cid = id
<$< pactConfigReintroTxs .:: enableDisableFlag
% prefixLongCid cid "pact-tx-reintro"
<> helpCid cid "whether to enable transaction reintroduction from losing forks"
<> internal
<*< pactConfigMempoolP2p %:: pEnableConfigCid "pact-mempool-p2p" cid pMempoolP2pConfig
<*< pactConfigBlockGasLimit . iso StableEncoding _stableEncoding .:: jsonOption
% prefixLongCid cid "pact-block-gas-limit"
Expand All @@ -160,6 +161,7 @@ pPactProviderConfig cid = id
<*< pactConfigPreInsertCheckTimeout .:: jsonOption
% prefixLongCid cid "pact-pre-insert-check-timeout"
<> helpCid cid "Max allowed time in microseconds for the transactions validation in the PreInsertCheck command."
<> internal
<*< pactConfigAllowReadsInLocal .:: boolOption_
% prefixLongCid cid "pact-allowReadsInLocal"
<> helpCid cid "Enable direct database reads of smart contract tables in local queries."
Expand Down
6 changes: 6 additions & 0 deletions src/P2P/Node/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -206,24 +206,30 @@ pP2pConfiguration = id
<*< p2pConfigMaxSessionCount .:: option auto
% prefixLong net "p2p-max-session-count"
<> suffixHelp net "maximum number of sessions that are active at any time"
<> internal
<*< p2pConfigMaxPeerCount .:: option auto
% prefixLong net "p2p-max-peer-count"
<> suffixHelp net "maximum number of entries in the peer database"
<> internal
<*< p2pConfigSessionTimeout .:: textOption
% prefixLong net "p2p-session-timeout"
<> suffixHelp net "timeout for sessions in seconds"
<> internal
<*< p2pConfigKnownPeers %:: pLeftMonoidalUpdate
(pure <$> pKnownPeerInfo)
<*< p2pConfigIgnoreBootstrapNodes .:: enableDisableFlag
% prefixLong net "ignore-bootstrap-nodes"
<> help "when enabled the hard-coded bootstrap nodes for network are ignored"
<> internal
<*< p2pConfigPrivate .:: enableDisableFlag
% prefixLong net "private"
<> help "when enabled this node becomes private and communicates only with the initially configured known peers"
<> internal
<*< p2pConfigBootstrapReachability .:: option auto
% prefixLong net "bootstrap-reachability"
<> help "the fraction of bootstrap nodes that must be reachable at startup"
<> metavar "[0,1]"
<> internal
<*< p2pConfigTls .:: enableDisableFlag
% prefixLong net "tls"
<> internal -- hidden option, only for expert use
Expand Down
Loading