| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Chain.Offline
Synopsis
- offlineHeadId :: HeadSeed -> HeadId
- newtype InitialUTxOParseException = InitialUTxOParseException String
- loadGenesisFile :: Maybe FilePath -> IO (GenesisParameters ShelleyEra)
- withOfflineChain :: OfflineChainConfig -> Party -> [Party] -> ChainStateHistory Tx -> ChainComponent Tx IO a
- tickForever :: GenesisParameters ShelleyEra -> (ChainEvent Tx -> IO ()) -> IO ()
- offlineBlockHash :: Hash BlockHeader
Documentation
offlineHeadId :: HeadSeed -> HeadId Source #
Derived HeadId of offline head from a HeadSeed.
newtype InitialUTxOParseException Source #
Constructors
| InitialUTxOParseException String |
Instances
| Exception InitialUTxOParseException Source # | |
Defined in Hydra.Chain.Offline | |
| Show InitialUTxOParseException Source # | |
Defined in Hydra.Chain.Offline | |
loadGenesisFile :: Maybe FilePath -> IO (GenesisParameters ShelleyEra) Source #
Load the given genesis file or use defaults specific to the offline mode.
Throws: InitialUTxOParseException if the initial UTXO file could not be parsed.
Arguments
| :: OfflineChainConfig | |
| -> Party | |
| -> [Party] | |
| -> ChainStateHistory Tx | Last known chain state as loaded from persistence. |
| -> ChainComponent Tx IO a |
tickForever :: GenesisParameters ShelleyEra -> (ChainEvent Tx -> IO ()) -> IO () Source #
Continuously produces offline chain ticks according to wall-clock time. Each tick is aligned with the expected slot time, ensuring the node state stays synchronized with the offline chain. This prevents the node from violating the configured unsynced period which guarantees that client and network inputs are always processed safely.
offlineBlockHash :: Hash BlockHeader Source #