hydra-node-0.19.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Options

Synopsis

Documentation

data Command Source #

Instances

Instances details
Show Command Source # 
Instance details

Defined in Hydra.Options

Eq Command Source # 
Instance details

Defined in Hydra.Options

data DirectChainConfig Source #

Constructors

DirectChainConfig 

Fields

Instances

Instances details
FromJSON DirectChainConfig Source # 
Instance details

Defined in Hydra.Options

ToJSON DirectChainConfig Source # 
Instance details

Defined in Hydra.Options

Generic DirectChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep DirectChainConfig :: Type -> Type Source #

Show DirectChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq DirectChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep DirectChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep DirectChainConfig = D1 ('MetaData "DirectChainConfig" "Hydra.Options" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "DirectChainConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "networkId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NetworkId) :*: (S1 ('MetaSel ('Just "nodeSocket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SocketPath) :*: S1 ('MetaSel ('Just "hydraScriptsTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId))) :*: ((S1 ('MetaSel ('Just "cardanoSigningKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "cardanoVerificationKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])) :*: (S1 ('MetaSel ('Just "startChainFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChainPoint)) :*: S1 ('MetaSel ('Just "contestationPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContestationPeriod)))))

data OfflineChainConfig Source #

Constructors

OfflineChainConfig 

Fields

Instances

Instances details
FromJSON OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

ToJSON OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

Generic OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep OfflineChainConfig :: Type -> Type Source #

Show OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep OfflineChainConfig = D1 ('MetaData "OfflineChainConfig" "Hydra.Options" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "OfflineChainConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "initialUTxOFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "ledgerGenesisFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))))

data RunOptions Source #

Instances

Instances details
Arbitrary RunOptions Source # 
Instance details

Defined in Hydra.Options

FromJSON RunOptions Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser RunOptions

parseJSONList :: Value -> Parser [RunOptions]

omittedField :: Maybe RunOptions

ToJSON RunOptions Source # 
Instance details

Defined in Hydra.Options

Methods

toJSON :: RunOptions -> Value

toEncoding :: RunOptions -> Encoding

toJSONList :: [RunOptions] -> Value

toEncodingList :: [RunOptions] -> Encoding

omitField :: RunOptions -> Bool

Generic RunOptions Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep RunOptions :: Type -> Type Source #

Show RunOptions Source # 
Instance details

Defined in Hydra.Options

Eq RunOptions Source # 
Instance details

Defined in Hydra.Options

type Rep RunOptions Source # 
Instance details

Defined in Hydra.Options

type Rep RunOptions = D1 ('MetaData "RunOptions" "Hydra.Options" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "RunOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "verbosity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Verbosity) :*: (S1 ('MetaSel ('Just "nodeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeId) :*: S1 ('MetaSel ('Just "host") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IP))) :*: ((S1 ('MetaSel ('Just "port") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PortNumber) :*: S1 ('MetaSel ('Just "peers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Host])) :*: (S1 ('MetaSel ('Just "apiHost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IP) :*: S1 ('MetaSel ('Just "apiPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PortNumber)))) :*: (((S1 ('MetaSel ('Just "tlsCertPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "tlsKeyPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))) :*: (S1 ('MetaSel ('Just "monitoringPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PortNumber)) :*: S1 ('MetaSel ('Just "hydraSigningKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))) :*: ((S1 ('MetaSel ('Just "hydraVerificationKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: S1 ('MetaSel ('Just "persistenceDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :*: (S1 ('MetaSel ('Just "chainConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainConfig) :*: S1 ('MetaSel ('Just "ledgerConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LedgerConfig))))))

data ChainConfig Source #

Instances

Instances details
Arbitrary ChainConfig Source # 
Instance details

Defined in Hydra.Options

FromJSON ChainConfig Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser ChainConfig

parseJSONList :: Value -> Parser [ChainConfig]

omittedField :: Maybe ChainConfig

ToJSON ChainConfig Source # 
Instance details

Defined in Hydra.Options

Methods

toJSON :: ChainConfig -> Value

toEncoding :: ChainConfig -> Encoding

toJSONList :: [ChainConfig] -> Value

toEncodingList :: [ChainConfig] -> Encoding

omitField :: ChainConfig -> Bool

Generic ChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep ChainConfig :: Type -> Type Source #

Show ChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq ChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep ChainConfig Source # 
Instance details

Defined in Hydra.Options

newtype LedgerConfig Source #

Instances

Instances details
Arbitrary LedgerConfig Source # 
Instance details

Defined in Hydra.Options

FromJSON LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser LedgerConfig

parseJSONList :: Value -> Parser [LedgerConfig]

omittedField :: Maybe LedgerConfig

ToJSON LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Methods

toJSON :: LedgerConfig -> Value

toEncoding :: LedgerConfig -> Encoding

toJSONList :: [LedgerConfig] -> Value

toEncodingList :: [LedgerConfig] -> Encoding

omitField :: LedgerConfig -> Bool

Generic LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep LedgerConfig :: Type -> Type Source #

Show LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Eq LedgerConfig Source # 
Instance details

Defined in Hydra.Options

type Rep LedgerConfig Source # 
Instance details

Defined in Hydra.Options

type Rep LedgerConfig = D1 ('MetaData "LedgerConfig" "Hydra.Options" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'True) (C1 ('MetaCons "CardanoLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "cardanoLedgerProtocolParametersFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

toArgs :: RunOptions -> [String] Source #

Convert an Options instance into the corresponding list of command-line arguments.

This is useful in situations where one wants to programatically define Options, providing some measure of type safety, without having to juggle with strings.

defaultContestationPeriod :: ContestationPeriod Source #

validateRunOptions :: RunOptions -> Either InvalidOptions () Source #

Validate cmd line arguments for hydra-node and check if they make sense before actually running the node. Rules we apply: - Check if number of parties is bigger than our hardcoded limit (by looking at loaded hydra or cardano keys and comparing it to the maximumNumberOfParties) - Check that number of loaded hydra keys match with the number of loaded cardano keys (by comparing lengths of the two lists)

genChainPoint :: Gen ChainPoint Source #

runOptionsParser :: Parser RunOptions Source #

Parser for running the cardano-node with all its RunOptions.

offlineModeParser :: Parser RunOptions Source #

Alternative parser to runOptionsParser for running the cardano-node in offline mode.

networkIdParser :: Parser NetworkId Source #

nodeSocketParser :: Parser SocketPath Source #

defaultRunOptions :: RunOptions Source #

Default options as they should also be provided by runOptionsParser.

hostParser :: Parser IP Source #

startChainFromParser :: Parser ChainPoint Source #

contestationPeriodParser :: Parser ContestationPeriod Source #

parseHydraCommand :: IO Command Source #

Parse command-line arguments into a Option or exit with failure and error message.

parseHydraCommandFromArgs :: [String] -> ParserResult Command Source #

Pure parsing of Option from a list of arguments.

toArgNetworkId :: NetworkId -> [String] Source #

toArgNodeSocket :: SocketPath -> [String] Source #

data ParserResult a #

Constructors

Success a 
Failure (ParserFailure ParserHelp) 
CompletionInvoked CompletionResult 

Instances

Instances details
Applicative ParserResult 
Instance details

Defined in Options.Applicative.Types

Functor ParserResult 
Instance details

Defined in Options.Applicative.Types

Methods

fmap :: (a -> b) -> ParserResult a -> ParserResult b Source #

(<$) :: a -> ParserResult b -> ParserResult a Source #

Monad ParserResult 
Instance details

Defined in Options.Applicative.Types

Show a => Show (ParserResult a) 
Instance details

Defined in Options.Applicative.Types

renderFailure :: ParserFailure ParserHelp -> String -> (String, ExitCode) #

Orphan instances

Arbitrary IP Source # 
Instance details

Methods

arbitrary :: Gen IP

shrink :: IP -> [IP]