{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module Ouroboros.Consensus.Storage.ChainDB.Impl.Args (
ChainDbArgs (..)
, ChainDbSpecificArgs (..)
, RelativeMountPoint (..)
, defaultArgs
, fromChainDbArgs
) where
import Data.Time.Clock (DiffTime, secondsToDiffTime)
import Control.Tracer (Tracer, contramap, nullTracer)
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Config
import Ouroboros.Consensus.Fragment.InFuture (CheckInFuture)
import Ouroboros.Consensus.Ledger.Extended
import Ouroboros.Consensus.Util.Args
import Ouroboros.Consensus.Util.ResourceRegistry (ResourceRegistry)
import Ouroboros.Consensus.Storage.FS.API
import Ouroboros.Consensus.Storage.ChainDB.Impl.LgrDB (LedgerDB')
import qualified Ouroboros.Consensus.Storage.ChainDB.Impl.LgrDB as LgrDB
import Ouroboros.Consensus.Storage.ChainDB.Impl.Types
(TraceEvent (..))
import Ouroboros.Consensus.Storage.ImmutableDB (ChunkInfo)
import qualified Ouroboros.Consensus.Storage.ImmutableDB as ImmutableDB
import Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy
(DiskPolicy (..))
import qualified Ouroboros.Consensus.Storage.VolatileDB as VolatileDB
data ChainDbArgs f m blk = ChainDbArgs {
ChainDbArgs f m blk -> SomeHasFS m
cdbHasFSImmutableDB :: SomeHasFS m
, ChainDbArgs f m blk -> SomeHasFS m
cdbHasFSVolatileDB :: SomeHasFS m
, ChainDbArgs f m blk -> SomeHasFS m
cdbHasFSLgrDB :: SomeHasFS m
, ChainDbArgs f m blk -> ValidationPolicy
cdbImmutableDbValidation :: ImmutableDB.ValidationPolicy
, ChainDbArgs f m blk -> BlockValidationPolicy
cdbVolatileDbValidation :: VolatileDB.BlockValidationPolicy
, ChainDbArgs f m blk -> BlocksPerFile
cdbMaxBlocksPerFile :: VolatileDB.BlocksPerFile
, ChainDbArgs f m blk -> DiskPolicy
cdbDiskPolicy :: LgrDB.DiskPolicy
, ChainDbArgs f m blk -> HKD f (TopLevelConfig blk)
cdbTopLevelConfig :: HKD f (TopLevelConfig blk)
, ChainDbArgs f m blk -> HKD f ChunkInfo
cdbChunkInfo :: HKD f ChunkInfo
, ChainDbArgs f m blk -> HKD f (blk -> Bool)
cdbCheckIntegrity :: HKD f (blk -> Bool)
, ChainDbArgs f m blk -> HKD f (m (ExtLedgerState blk))
cdbGenesis :: HKD f (m (ExtLedgerState blk))
, ChainDbArgs f m blk -> HKD f (CheckInFuture m blk)
cdbCheckInFuture :: HKD f (CheckInFuture m blk)
, ChainDbArgs f m blk -> CacheConfig
cdbImmutableDbCacheConfig :: ImmutableDB.CacheConfig
, ChainDbArgs f m blk -> Tracer m (TraceEvent blk)
cdbTracer :: Tracer m (TraceEvent blk)
, ChainDbArgs f m blk -> Tracer m (LedgerDB' blk)
cdbTraceLedger :: Tracer m (LedgerDB' blk)
, ChainDbArgs f m blk -> HKD f (ResourceRegistry m)
cdbRegistry :: HKD f (ResourceRegistry m)
, ChainDbArgs f m blk -> DiffTime
cdbGcDelay :: DiffTime
, ChainDbArgs f m blk -> DiffTime
cdbGcInterval :: DiffTime
, ChainDbArgs f m blk -> Word
cdbBlocksToAddSize :: Word
}
data ChainDbSpecificArgs f m blk = ChainDbSpecificArgs {
ChainDbSpecificArgs f m blk -> Word
cdbsBlocksToAddSize :: Word
, ChainDbSpecificArgs f m blk -> HKD f (CheckInFuture m blk)
cdbsCheckInFuture :: HKD f (CheckInFuture m blk)
, ChainDbSpecificArgs f m blk -> DiffTime
cdbsGcDelay :: DiffTime
, ChainDbSpecificArgs f m blk -> DiffTime
cdbsGcInterval :: DiffTime
, ChainDbSpecificArgs f m blk -> HKD f (ResourceRegistry m)
cdbsRegistry :: HKD f (ResourceRegistry m)
, ChainDbSpecificArgs f m blk -> Tracer m (TraceEvent blk)
cdbsTracer :: Tracer m (TraceEvent blk)
}
defaultSpecificArgs :: Monad m => ChainDbSpecificArgs Defaults m blk
defaultSpecificArgs :: ChainDbSpecificArgs Defaults m blk
defaultSpecificArgs = ChainDbSpecificArgs :: forall (f :: * -> *) (m :: * -> *) blk.
Word
-> HKD f (CheckInFuture m blk)
-> DiffTime
-> DiffTime
-> HKD f (ResourceRegistry m)
-> Tracer m (TraceEvent blk)
-> ChainDbSpecificArgs f m blk
ChainDbSpecificArgs {
cdbsBlocksToAddSize :: Word
cdbsBlocksToAddSize = Word
10
, cdbsCheckInFuture :: HKD Defaults (CheckInFuture m blk)
cdbsCheckInFuture = HKD Defaults (CheckInFuture m blk)
forall t. Defaults t
NoDefault
, cdbsGcDelay :: DiffTime
cdbsGcDelay = Integer -> DiffTime
secondsToDiffTime Integer
60
, cdbsGcInterval :: DiffTime
cdbsGcInterval = Integer -> DiffTime
secondsToDiffTime Integer
10
, cdbsRegistry :: HKD Defaults (ResourceRegistry m)
cdbsRegistry = HKD Defaults (ResourceRegistry m)
forall t. Defaults t
NoDefault
, cdbsTracer :: Tracer m (TraceEvent blk)
cdbsTracer = Tracer m (TraceEvent blk)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
}
defaultArgs ::
forall m blk.
Monad m
=> (RelativeMountPoint -> SomeHasFS m)
-> DiskPolicy
-> ChainDbArgs Defaults m blk
defaultArgs :: (RelativeMountPoint -> SomeHasFS m)
-> DiskPolicy -> ChainDbArgs Defaults m blk
defaultArgs RelativeMountPoint -> SomeHasFS m
mkFS DiskPolicy
diskPolicy =
ImmutableDbArgs Defaults m blk
-> VolatileDbArgs Defaults m blk
-> LgrDbArgs Defaults m blk
-> ChainDbSpecificArgs Defaults m blk
-> ChainDbArgs Defaults m blk
forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk
-> VolatileDbArgs f m blk
-> LgrDbArgs f m blk
-> ChainDbSpecificArgs f m blk
-> ChainDbArgs f m blk
toChainDbArgs (SomeHasFS m -> ImmutableDbArgs Defaults m blk
forall (m :: * -> *) blk.
Applicative m =>
SomeHasFS m -> ImmutableDbArgs Defaults m blk
ImmutableDB.defaultArgs SomeHasFS m
immFS)
(SomeHasFS m -> VolatileDbArgs Defaults m blk
forall (m :: * -> *) blk.
Applicative m =>
SomeHasFS m -> VolatileDbArgs Defaults m blk
VolatileDB.defaultArgs SomeHasFS m
volFS)
(SomeHasFS m -> DiskPolicy -> LgrDbArgs Defaults m blk
forall (m :: * -> *) blk.
Applicative m =>
SomeHasFS m -> DiskPolicy -> LgrDbArgs Defaults m blk
LgrDB.defaultArgs SomeHasFS m
lgrFS DiskPolicy
diskPolicy)
ChainDbSpecificArgs Defaults m blk
forall (m :: * -> *) blk.
Monad m =>
ChainDbSpecificArgs Defaults m blk
defaultSpecificArgs
where
immFS, volFS, lgrFS :: SomeHasFS m
immFS :: SomeHasFS m
immFS = RelativeMountPoint -> SomeHasFS m
mkFS (RelativeMountPoint -> SomeHasFS m)
-> RelativeMountPoint -> SomeHasFS m
forall a b. (a -> b) -> a -> b
$ FilePath -> RelativeMountPoint
RelativeMountPoint FilePath
"immutable"
volFS :: SomeHasFS m
volFS = RelativeMountPoint -> SomeHasFS m
mkFS (RelativeMountPoint -> SomeHasFS m)
-> RelativeMountPoint -> SomeHasFS m
forall a b. (a -> b) -> a -> b
$ FilePath -> RelativeMountPoint
RelativeMountPoint FilePath
"volatile"
lgrFS :: SomeHasFS m
lgrFS = RelativeMountPoint -> SomeHasFS m
mkFS (RelativeMountPoint -> SomeHasFS m)
-> RelativeMountPoint -> SomeHasFS m
forall a b. (a -> b) -> a -> b
$ FilePath -> RelativeMountPoint
RelativeMountPoint FilePath
"ledger"
fromChainDbArgs ::
forall m blk f. MapHKD f
=> ChainDbArgs f m blk
-> ( ImmutableDB.ImmutableDbArgs f m blk
, VolatileDB.VolatileDbArgs f m blk
, LgrDB.LgrDbArgs f m blk
, ChainDbSpecificArgs f m blk
)
fromChainDbArgs :: ChainDbArgs f m blk
-> (ImmutableDbArgs f m blk, VolatileDbArgs f m blk,
LgrDbArgs f m blk, ChainDbSpecificArgs f m blk)
fromChainDbArgs ChainDbArgs{Word
Tracer m (LedgerDB' blk)
Tracer m (TraceEvent blk)
DiffTime
DiskPolicy
HKD f (m (ExtLedgerState blk))
HKD f (TopLevelConfig blk)
HKD f ChunkInfo
HKD f (ResourceRegistry m)
HKD f (CheckInFuture m blk)
HKD f (blk -> Bool)
SomeHasFS m
BlockValidationPolicy
BlocksPerFile
ValidationPolicy
CacheConfig
cdbBlocksToAddSize :: Word
cdbGcInterval :: DiffTime
cdbGcDelay :: DiffTime
cdbRegistry :: HKD f (ResourceRegistry m)
cdbTraceLedger :: Tracer m (LedgerDB' blk)
cdbTracer :: Tracer m (TraceEvent blk)
cdbImmutableDbCacheConfig :: CacheConfig
cdbCheckInFuture :: HKD f (CheckInFuture m blk)
cdbGenesis :: HKD f (m (ExtLedgerState blk))
cdbCheckIntegrity :: HKD f (blk -> Bool)
cdbChunkInfo :: HKD f ChunkInfo
cdbTopLevelConfig :: HKD f (TopLevelConfig blk)
cdbDiskPolicy :: DiskPolicy
cdbMaxBlocksPerFile :: BlocksPerFile
cdbVolatileDbValidation :: BlockValidationPolicy
cdbImmutableDbValidation :: ValidationPolicy
cdbHasFSLgrDB :: SomeHasFS m
cdbHasFSVolatileDB :: SomeHasFS m
cdbHasFSImmutableDB :: SomeHasFS m
cdbBlocksToAddSize :: forall (f :: * -> *) (m :: * -> *) blk. ChainDbArgs f m blk -> Word
cdbGcInterval :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> DiffTime
cdbGcDelay :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> DiffTime
cdbRegistry :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> HKD f (ResourceRegistry m)
cdbTraceLedger :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> Tracer m (LedgerDB' blk)
cdbTracer :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> Tracer m (TraceEvent blk)
cdbImmutableDbCacheConfig :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> CacheConfig
cdbCheckInFuture :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> HKD f (CheckInFuture m blk)
cdbGenesis :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> HKD f (m (ExtLedgerState blk))
cdbCheckIntegrity :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> HKD f (blk -> Bool)
cdbChunkInfo :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> HKD f ChunkInfo
cdbTopLevelConfig :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> HKD f (TopLevelConfig blk)
cdbDiskPolicy :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> DiskPolicy
cdbMaxBlocksPerFile :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> BlocksPerFile
cdbVolatileDbValidation :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> BlockValidationPolicy
cdbImmutableDbValidation :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> ValidationPolicy
cdbHasFSLgrDB :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> SomeHasFS m
cdbHasFSVolatileDB :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> SomeHasFS m
cdbHasFSImmutableDB :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbArgs f m blk -> SomeHasFS m
..} = (
ImmutableDbArgs :: forall (f :: * -> *) (m :: * -> *) blk.
CacheConfig
-> HKD f (blk -> Bool)
-> HKD f ChunkInfo
-> HKD f (CodecConfig blk)
-> SomeHasFS m
-> HKD f (ResourceRegistry m)
-> Tracer m (TraceEvent blk)
-> ValidationPolicy
-> ImmutableDbArgs f m blk
ImmutableDB.ImmutableDbArgs {
immCacheConfig :: CacheConfig
immCacheConfig = CacheConfig
cdbImmutableDbCacheConfig
, immCheckIntegrity :: HKD f (blk -> Bool)
immCheckIntegrity = HKD f (blk -> Bool)
cdbCheckIntegrity
, immChunkInfo :: HKD f ChunkInfo
immChunkInfo = HKD f ChunkInfo
cdbChunkInfo
, immCodecConfig :: HKD f (CodecConfig blk)
immCodecConfig = Proxy (f (CodecConfig blk))
-> (TopLevelConfig blk -> CodecConfig blk)
-> HKD f (TopLevelConfig blk)
-> HKD f (CodecConfig blk)
forall (f :: * -> *) (proxy :: * -> *) b a.
MapHKD f =>
proxy (f b) -> (a -> b) -> HKD f a -> HKD f b
mapHKD (Proxy (f (CodecConfig blk))
forall k (t :: k). Proxy t
Proxy @(f (CodecConfig blk))) TopLevelConfig blk -> CodecConfig blk
forall blk. TopLevelConfig blk -> CodecConfig blk
configCodec HKD f (TopLevelConfig blk)
cdbTopLevelConfig
, immHasFS :: SomeHasFS m
immHasFS = SomeHasFS m
cdbHasFSImmutableDB
, immRegistry :: HKD f (ResourceRegistry m)
immRegistry = HKD f (ResourceRegistry m)
cdbRegistry
, immTracer :: Tracer m (TraceEvent blk)
immTracer = (TraceEvent blk -> TraceEvent blk)
-> Tracer m (TraceEvent blk) -> Tracer m (TraceEvent blk)
forall (f :: * -> *) a b. Contravariant f => (a -> b) -> f b -> f a
contramap TraceEvent blk -> TraceEvent blk
forall blk. TraceEvent blk -> TraceEvent blk
TraceImmutableDBEvent Tracer m (TraceEvent blk)
cdbTracer
, immValidationPolicy :: ValidationPolicy
immValidationPolicy = ValidationPolicy
cdbImmutableDbValidation
}
, VolatileDbArgs :: forall (f :: * -> *) (m :: * -> *) blk.
HKD f (blk -> Bool)
-> HKD f (CodecConfig blk)
-> SomeHasFS m
-> BlocksPerFile
-> Tracer m (TraceEvent blk)
-> BlockValidationPolicy
-> VolatileDbArgs f m blk
VolatileDB.VolatileDbArgs {
volCheckIntegrity :: HKD f (blk -> Bool)
volCheckIntegrity = HKD f (blk -> Bool)
cdbCheckIntegrity
, volCodecConfig :: HKD f (CodecConfig blk)
volCodecConfig = Proxy (f (CodecConfig blk))
-> (TopLevelConfig blk -> CodecConfig blk)
-> HKD f (TopLevelConfig blk)
-> HKD f (CodecConfig blk)
forall (f :: * -> *) (proxy :: * -> *) b a.
MapHKD f =>
proxy (f b) -> (a -> b) -> HKD f a -> HKD f b
mapHKD (Proxy (f (CodecConfig blk))
forall k (t :: k). Proxy t
Proxy @(f (CodecConfig blk))) TopLevelConfig blk -> CodecConfig blk
forall blk. TopLevelConfig blk -> CodecConfig blk
configCodec HKD f (TopLevelConfig blk)
cdbTopLevelConfig
, volHasFS :: SomeHasFS m
volHasFS = SomeHasFS m
cdbHasFSVolatileDB
, volMaxBlocksPerFile :: BlocksPerFile
volMaxBlocksPerFile = BlocksPerFile
cdbMaxBlocksPerFile
, volValidationPolicy :: BlockValidationPolicy
volValidationPolicy = BlockValidationPolicy
cdbVolatileDbValidation
, volTracer :: Tracer m (TraceEvent blk)
volTracer = (TraceEvent blk -> TraceEvent blk)
-> Tracer m (TraceEvent blk) -> Tracer m (TraceEvent blk)
forall (f :: * -> *) a b. Contravariant f => (a -> b) -> f b -> f a
contramap TraceEvent blk -> TraceEvent blk
forall blk. TraceEvent blk -> TraceEvent blk
TraceVolatileDBEvent Tracer m (TraceEvent blk)
cdbTracer
}
, LgrDbArgs :: forall (f :: * -> *) (m :: * -> *) blk.
DiskPolicy
-> HKD f (m (ExtLedgerState blk))
-> SomeHasFS m
-> HKD f (TopLevelConfig blk)
-> Tracer m (LedgerDB' blk)
-> Tracer m (TraceEvent blk)
-> LgrDbArgs f m blk
LgrDB.LgrDbArgs {
lgrTopLevelConfig :: HKD f (TopLevelConfig blk)
lgrTopLevelConfig = HKD f (TopLevelConfig blk)
cdbTopLevelConfig
, lgrHasFS :: SomeHasFS m
lgrHasFS = SomeHasFS m
cdbHasFSLgrDB
, lgrDiskPolicy :: DiskPolicy
lgrDiskPolicy = DiskPolicy
cdbDiskPolicy
, lgrGenesis :: HKD f (m (ExtLedgerState blk))
lgrGenesis = HKD f (m (ExtLedgerState blk))
cdbGenesis
, lgrTracer :: Tracer m (TraceEvent blk)
lgrTracer = (TraceEvent blk -> TraceEvent blk)
-> Tracer m (TraceEvent blk) -> Tracer m (TraceEvent blk)
forall (f :: * -> *) a b. Contravariant f => (a -> b) -> f b -> f a
contramap TraceEvent blk -> TraceEvent blk
forall blk. TraceEvent blk -> TraceEvent blk
TraceLedgerEvent Tracer m (TraceEvent blk)
cdbTracer
, lgrTraceLedger :: Tracer m (LedgerDB' blk)
lgrTraceLedger = Tracer m (LedgerDB' blk)
cdbTraceLedger
}
, ChainDbSpecificArgs :: forall (f :: * -> *) (m :: * -> *) blk.
Word
-> HKD f (CheckInFuture m blk)
-> DiffTime
-> DiffTime
-> HKD f (ResourceRegistry m)
-> Tracer m (TraceEvent blk)
-> ChainDbSpecificArgs f m blk
ChainDbSpecificArgs {
cdbsTracer :: Tracer m (TraceEvent blk)
cdbsTracer = Tracer m (TraceEvent blk)
cdbTracer
, cdbsRegistry :: HKD f (ResourceRegistry m)
cdbsRegistry = HKD f (ResourceRegistry m)
cdbRegistry
, cdbsGcDelay :: DiffTime
cdbsGcDelay = DiffTime
cdbGcDelay
, cdbsGcInterval :: DiffTime
cdbsGcInterval = DiffTime
cdbGcInterval
, cdbsCheckInFuture :: HKD f (CheckInFuture m blk)
cdbsCheckInFuture = HKD f (CheckInFuture m blk)
cdbCheckInFuture
, cdbsBlocksToAddSize :: Word
cdbsBlocksToAddSize = Word
cdbBlocksToAddSize
}
)
toChainDbArgs ::
ImmutableDB.ImmutableDbArgs f m blk
-> VolatileDB.VolatileDbArgs f m blk
-> LgrDB.LgrDbArgs f m blk
-> ChainDbSpecificArgs f m blk
-> ChainDbArgs f m blk
toChainDbArgs :: ImmutableDbArgs f m blk
-> VolatileDbArgs f m blk
-> LgrDbArgs f m blk
-> ChainDbSpecificArgs f m blk
-> ChainDbArgs f m blk
toChainDbArgs ImmutableDB.ImmutableDbArgs {Tracer m (TraceEvent blk)
HKD f (CodecConfig blk)
HKD f ChunkInfo
HKD f (ResourceRegistry m)
HKD f (blk -> Bool)
SomeHasFS m
ValidationPolicy
CacheConfig
immValidationPolicy :: ValidationPolicy
immTracer :: Tracer m (TraceEvent blk)
immRegistry :: HKD f (ResourceRegistry m)
immHasFS :: SomeHasFS m
immCodecConfig :: HKD f (CodecConfig blk)
immChunkInfo :: HKD f ChunkInfo
immCheckIntegrity :: HKD f (blk -> Bool)
immCacheConfig :: CacheConfig
immValidationPolicy :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> ValidationPolicy
immTracer :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> Tracer m (TraceEvent blk)
immRegistry :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> HKD f (ResourceRegistry m)
immHasFS :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> SomeHasFS m
immCodecConfig :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> HKD f (CodecConfig blk)
immChunkInfo :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> HKD f ChunkInfo
immCheckIntegrity :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> HKD f (blk -> Bool)
immCacheConfig :: forall (f :: * -> *) (m :: * -> *) blk.
ImmutableDbArgs f m blk -> CacheConfig
..}
VolatileDB.VolatileDbArgs {Tracer m (TraceEvent blk)
HKD f (CodecConfig blk)
HKD f (blk -> Bool)
SomeHasFS m
BlockValidationPolicy
BlocksPerFile
volValidationPolicy :: BlockValidationPolicy
volTracer :: Tracer m (TraceEvent blk)
volMaxBlocksPerFile :: BlocksPerFile
volHasFS :: SomeHasFS m
volCodecConfig :: HKD f (CodecConfig blk)
volCheckIntegrity :: HKD f (blk -> Bool)
volTracer :: forall (f :: * -> *) (m :: * -> *) blk.
VolatileDbArgs f m blk -> Tracer m (TraceEvent blk)
volValidationPolicy :: forall (f :: * -> *) (m :: * -> *) blk.
VolatileDbArgs f m blk -> BlockValidationPolicy
volMaxBlocksPerFile :: forall (f :: * -> *) (m :: * -> *) blk.
VolatileDbArgs f m blk -> BlocksPerFile
volHasFS :: forall (f :: * -> *) (m :: * -> *) blk.
VolatileDbArgs f m blk -> SomeHasFS m
volCodecConfig :: forall (f :: * -> *) (m :: * -> *) blk.
VolatileDbArgs f m blk -> HKD f (CodecConfig blk)
volCheckIntegrity :: forall (f :: * -> *) (m :: * -> *) blk.
VolatileDbArgs f m blk -> HKD f (blk -> Bool)
..}
LgrDB.LgrDbArgs {Tracer m (LedgerDB' blk)
Tracer m (TraceEvent blk)
DiskPolicy
HKD f (m (ExtLedgerState blk))
HKD f (TopLevelConfig blk)
SomeHasFS m
lgrTracer :: Tracer m (TraceEvent blk)
lgrTraceLedger :: Tracer m (LedgerDB' blk)
lgrTopLevelConfig :: HKD f (TopLevelConfig blk)
lgrHasFS :: SomeHasFS m
lgrGenesis :: HKD f (m (ExtLedgerState blk))
lgrDiskPolicy :: DiskPolicy
lgrTraceLedger :: forall (f :: * -> *) (m :: * -> *) blk.
LgrDbArgs f m blk -> Tracer m (LedgerDB' blk)
lgrTracer :: forall (f :: * -> *) (m :: * -> *) blk.
LgrDbArgs f m blk -> Tracer m (TraceEvent blk)
lgrGenesis :: forall (f :: * -> *) (m :: * -> *) blk.
LgrDbArgs f m blk -> HKD f (m (ExtLedgerState blk))
lgrDiskPolicy :: forall (f :: * -> *) (m :: * -> *) blk.
LgrDbArgs f m blk -> DiskPolicy
lgrHasFS :: forall (f :: * -> *) (m :: * -> *) blk.
LgrDbArgs f m blk -> SomeHasFS m
lgrTopLevelConfig :: forall (f :: * -> *) (m :: * -> *) blk.
LgrDbArgs f m blk -> HKD f (TopLevelConfig blk)
..}
ChainDbSpecificArgs {Word
Tracer m (TraceEvent blk)
DiffTime
HKD f (ResourceRegistry m)
HKD f (CheckInFuture m blk)
cdbsTracer :: Tracer m (TraceEvent blk)
cdbsRegistry :: HKD f (ResourceRegistry m)
cdbsGcInterval :: DiffTime
cdbsGcDelay :: DiffTime
cdbsCheckInFuture :: HKD f (CheckInFuture m blk)
cdbsBlocksToAddSize :: Word
cdbsTracer :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbSpecificArgs f m blk -> Tracer m (TraceEvent blk)
cdbsRegistry :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbSpecificArgs f m blk -> HKD f (ResourceRegistry m)
cdbsGcInterval :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbSpecificArgs f m blk -> DiffTime
cdbsGcDelay :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbSpecificArgs f m blk -> DiffTime
cdbsCheckInFuture :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbSpecificArgs f m blk -> HKD f (CheckInFuture m blk)
cdbsBlocksToAddSize :: forall (f :: * -> *) (m :: * -> *) blk.
ChainDbSpecificArgs f m blk -> Word
..} = ChainDbArgs :: forall (f :: * -> *) (m :: * -> *) blk.
SomeHasFS m
-> SomeHasFS m
-> SomeHasFS m
-> ValidationPolicy
-> BlockValidationPolicy
-> BlocksPerFile
-> DiskPolicy
-> HKD f (TopLevelConfig blk)
-> HKD f ChunkInfo
-> HKD f (blk -> Bool)
-> HKD f (m (ExtLedgerState blk))
-> HKD f (CheckInFuture m blk)
-> CacheConfig
-> Tracer m (TraceEvent blk)
-> Tracer m (LedgerDB' blk)
-> HKD f (ResourceRegistry m)
-> DiffTime
-> DiffTime
-> Word
-> ChainDbArgs f m blk
ChainDbArgs{
cdbHasFSImmutableDB :: SomeHasFS m
cdbHasFSImmutableDB = SomeHasFS m
immHasFS
, cdbHasFSVolatileDB :: SomeHasFS m
cdbHasFSVolatileDB = SomeHasFS m
volHasFS
, cdbHasFSLgrDB :: SomeHasFS m
cdbHasFSLgrDB = SomeHasFS m
lgrHasFS
, cdbImmutableDbValidation :: ValidationPolicy
cdbImmutableDbValidation = ValidationPolicy
immValidationPolicy
, cdbVolatileDbValidation :: BlockValidationPolicy
cdbVolatileDbValidation = BlockValidationPolicy
volValidationPolicy
, cdbMaxBlocksPerFile :: BlocksPerFile
cdbMaxBlocksPerFile = BlocksPerFile
volMaxBlocksPerFile
, cdbDiskPolicy :: DiskPolicy
cdbDiskPolicy = DiskPolicy
lgrDiskPolicy
, cdbTopLevelConfig :: HKD f (TopLevelConfig blk)
cdbTopLevelConfig = HKD f (TopLevelConfig blk)
lgrTopLevelConfig
, cdbChunkInfo :: HKD f ChunkInfo
cdbChunkInfo = HKD f ChunkInfo
immChunkInfo
, cdbCheckIntegrity :: HKD f (blk -> Bool)
cdbCheckIntegrity = HKD f (blk -> Bool)
immCheckIntegrity
, cdbGenesis :: HKD f (m (ExtLedgerState blk))
cdbGenesis = HKD f (m (ExtLedgerState blk))
lgrGenesis
, cdbCheckInFuture :: HKD f (CheckInFuture m blk)
cdbCheckInFuture = HKD f (CheckInFuture m blk)
cdbsCheckInFuture
, cdbImmutableDbCacheConfig :: CacheConfig
cdbImmutableDbCacheConfig = CacheConfig
immCacheConfig
, cdbTracer :: Tracer m (TraceEvent blk)
cdbTracer = Tracer m (TraceEvent blk)
cdbsTracer
, cdbTraceLedger :: Tracer m (LedgerDB' blk)
cdbTraceLedger = Tracer m (LedgerDB' blk)
lgrTraceLedger
, cdbRegistry :: HKD f (ResourceRegistry m)
cdbRegistry = HKD f (ResourceRegistry m)
cdbsRegistry
, cdbGcDelay :: DiffTime
cdbGcDelay = DiffTime
cdbsGcDelay
, cdbGcInterval :: DiffTime
cdbGcInterval = DiffTime
cdbsGcInterval
, cdbBlocksToAddSize :: Word
cdbBlocksToAddSize = Word
cdbsBlocksToAddSize
}
newtype RelativeMountPoint = RelativeMountPoint FilePath