| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Chain.Direct
Description
Chain component implementation which uses directly the Node-to-Client protocols to submit "hand-rolled" transactions.
Synopsis
- newtype NetworkMagic = NetworkMagic Word32
- newtype DirectBackend a = DirectBackend (ReaderT DirectOptions IO a)
- type BlockType = BlockInMode
- data DirectConnectException = DirectConnectException {
- ioException :: IOException
- nodeSocket :: SocketPath
- networkId :: NetworkId
- newtype IntersectionNotFoundException = IntersectionNotFound {
- requestedPoints :: NonEmpty ChainPoint
- data EraNotSupportedException
- = EraNotSupportedAnymore {
- otherEraName :: Text
- | EraNotSupportedYet {
- otherEraName :: Text
- = EraNotSupportedAnymore {
- runDirectBackend :: DirectOptions -> DirectBackend a -> IO a
- withDirectChain :: DirectOptions -> Tracer IO CardanoChainLog -> CardanoChainConfig -> ChainContext -> TinyWallet IO -> ChainStateHistory Tx -> ChainComponent Tx IO a
- chainSyncClient :: forall m. (MonadSTM m, MonadThrow m) => ChainSyncHandler m -> TinyWallet m -> NonEmpty ChainPoint -> ChainSyncClient BlockType ChainPoint ChainTip m ()
- withNodeConn :: (LocalNodeConnectInfo -> IO a) -> DirectBackend a
- txSubmissionClient :: forall m. (MonadSTM m, MonadDelay m) => Tracer m CardanoChainLog -> m NominalDiffTime -> TQueue m (Tx, TMVar m (Maybe (PostTxError Tx))) -> LocalTxSubmissionClient TxInMode TxValidationErrorInCardanoMode m ()
Documentation
newtype NetworkMagic #
Constructors
| NetworkMagic Word32 |
Instances
newtype DirectBackend a Source #
Constructors
| DirectBackend (ReaderT DirectOptions IO a) |
Instances
data DirectConnectException Source #
Constructors
| DirectConnectException | |
Fields
| |
Instances
| Exception DirectConnectException Source # | |
Defined in Hydra.Chain.Direct | |
| Show DirectConnectException Source # | |
Defined in Hydra.Chain.Direct | |
newtype IntersectionNotFoundException Source #
Thrown when the user-provided custom points of intersection are unknown to the local node. This may happen if users shut down their node quickly after starting them and hold on not-so-stable points of the chain. When they turn the node back on, those points may no longer exist on the network if a fork with deeper roots has been adopted in the meantime.
Constructors
| IntersectionNotFound | |
Fields
| |
Instances
data EraNotSupportedException Source #
Constructors
| EraNotSupportedAnymore | |
Fields
| |
| EraNotSupportedYet | |
Fields
| |
Instances
| Exception EraNotSupportedException Source # | |
Defined in Hydra.Chain.Direct | |
| Show EraNotSupportedException Source # | |
Defined in Hydra.Chain.Direct | |
runDirectBackend :: DirectOptions -> DirectBackend a -> IO a Source #
Arguments
| :: DirectOptions | |
| -> Tracer IO CardanoChainLog | |
| -> CardanoChainConfig | |
| -> ChainContext | |
| -> TinyWallet IO | |
| -> ChainStateHistory Tx | Chain state loaded from persistence. |
| -> ChainComponent Tx IO a |
chainSyncClient :: forall m. (MonadSTM m, MonadThrow m) => ChainSyncHandler m -> TinyWallet m -> NonEmpty ChainPoint -> ChainSyncClient BlockType ChainPoint ChainTip m () Source #
withNodeConn :: (LocalNodeConnectInfo -> IO a) -> DirectBackend a Source #
Arguments
| :: forall m. (MonadSTM m, MonadDelay m) | |
| => Tracer m CardanoChainLog | |
| -> m NominalDiffTime | Action returning the chain's average block time (seconds), used to size
the delay before reporting |
| -> TQueue m (Tx, TMVar m (Maybe (PostTxError Tx))) | |
| -> LocalTxSubmissionClient TxInMode TxValidationErrorInCardanoMode m () |