| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Node.Run
Synopsis
- data ConfigurationException
- = ConfigurationException ProtocolParametersConversionError
- | InvalidOptionException InvalidOptions
- | TrustedSetupException KZGSetupError
- run :: RunOptions -> IO ()
- getGlobalsForChain :: ChainConfig -> IO Globals
- data GlobalsTranslationException = GlobalsTranslationException
- newGlobals :: MonadThrow m => GenesisParameters ShelleyEra -> m Globals
- newGlobalsWithEraHistory :: MonadThrow m => GenesisParameters ShelleyEra -> EraHistory -> m Globals
Documentation
data ConfigurationException Source #
Constructors
| ConfigurationException ProtocolParametersConversionError | |
| InvalidOptionException InvalidOptions | |
| TrustedSetupException KZGSetupError |
Instances
| Exception ConfigurationException Source # | |
Defined in Hydra.Node.Run | |
| Show ConfigurationException Source # | |
Defined in Hydra.Node.Run | |
run :: RunOptions -> IO () Source #
data GlobalsTranslationException Source #
Constructors
| GlobalsTranslationException |
Instances
| Exception GlobalsTranslationException Source # | |
Defined in Hydra.Node.Run | |
| Show GlobalsTranslationException Source # | |
Defined in Hydra.Node.Run | |
| Eq GlobalsTranslationException Source # | |
Defined in Hydra.Node.Run Methods (==) :: GlobalsTranslationException -> GlobalsTranslationException -> Bool Source # (/=) :: GlobalsTranslationException -> GlobalsTranslationException -> Bool Source # | |
newGlobals :: MonadThrow m => GenesisParameters ShelleyEra -> m Globals Source #
Create new L2 ledger Globals from GenesisParameters.
Throws at least GlobalsTranslationException
newGlobalsWithEraHistory :: MonadThrow m => GenesisParameters ShelleyEra -> EraHistory -> m Globals Source #
Create new L2 ledger Globals using a proper EraHistory for era-aware
slot-to-time conversions. This ensures Plutus scripts receive correct
POSIXTime values in their ScriptContext on multi-era chains (mainnet/testnet).
The last era of the given EraHistory is extended to be unbounded, because
the queried era history has a forecast horizon anchored at the tip when the
node started. As these Globals are used for the lifetime of the hydra-node,
a node running longer than the horizon (3k/f slots, i.e. 36 hours on
mainnet) would otherwise reject every Plutus transaction with a validity
bound as OutsideForecast. Extending assumes the current era's slot length
does not change, matching the linear extrapolation the ledger already
applies to time translations via unsafeLinearExtendEpochInfo.
Throws at least GlobalsTranslationException