Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
newtype
HardForkBlock
xs =
HardForkBlock
{
- getHardForkBlock :: OneEraBlock xs
- data HardForkProtocol (xs :: [ Type ])
- data family LedgerState blk :: Type
- data family BlockConfig blk :: Type
- data family CodecConfig blk :: Type
- data family ConsensusConfig p :: Type
-
data
HardForkLedgerConfig
xs =
HardForkLedgerConfig
{
- hardForkLedgerConfigShape :: !( Shape xs)
- hardForkLedgerConfigPerEra :: !( PerEraLedgerConfig xs)
- data family StorageConfig blk :: Type
- completeConsensusConfig' :: forall blk. HasPartialConsensusConfig ( BlockProtocol blk) => EpochInfo ( Except PastHorizonException ) -> WrapPartialConsensusConfig blk -> ConsensusConfig ( BlockProtocol blk)
- completeConsensusConfig'' :: forall blk. HasPartialConsensusConfig ( BlockProtocol blk) => EpochInfo ( Except PastHorizonException ) -> WrapPartialConsensusConfig blk -> WrapConsensusConfig blk
- completeLedgerConfig' :: forall blk. HasPartialLedgerConfig blk => EpochInfo ( Except PastHorizonException ) -> WrapPartialLedgerConfig blk -> LedgerConfig blk
- completeLedgerConfig'' :: forall blk. HasPartialLedgerConfig blk => EpochInfo ( Except PastHorizonException ) -> WrapPartialLedgerConfig blk -> WrapLedgerConfig blk
- distribLedgerConfig :: CanHardFork xs => EpochInfo ( Except PastHorizonException ) -> LedgerConfig ( HardForkBlock xs) -> NP WrapLedgerConfig xs
- distribTopLevelConfig :: All SingleEraBlock xs => EpochInfo ( Except PastHorizonException ) -> TopLevelConfig ( HardForkBlock xs) -> NP TopLevelConfig xs
- data EpochInfo (m :: Type -> Type )
- type Except e = ExceptT e Identity
Hard fork protocol, block, and ledger state
newtype HardForkBlock xs Source #
Instances
data HardForkProtocol (xs :: [ Type ]) Source #
Instances
data family LedgerState blk :: Type Source #
Ledger state associated with a block
Instances
Config
data family BlockConfig blk :: Type Source #
Static configuration required to work with this type of blocks
Instances
Isomorphic BlockConfig Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary project :: NoHardForks blk => BlockConfig ( HardForkBlock '[blk]) -> BlockConfig blk Source # inject :: NoHardForks blk => BlockConfig blk -> BlockConfig ( HardForkBlock '[blk]) Source # |
|
NoThunks ( BlockConfig ( DualBlock m a)) Source # | |
CanHardFork xs => NoThunks ( BlockConfig ( HardForkBlock xs)) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics noThunks :: Context -> BlockConfig ( HardForkBlock xs) -> IO ( Maybe ThunkInfo ) Source # wNoThunks :: Context -> BlockConfig ( HardForkBlock xs) -> IO ( Maybe ThunkInfo ) Source # showTypeOf :: Proxy ( BlockConfig ( HardForkBlock xs)) -> String Source # |
|
newtype BlockConfig ( HardForkBlock xs) Source # | |
|
|
data BlockConfig ( DualBlock m a) Source # | |
Defined in Ouroboros.Consensus.Ledger.Dual |
data family CodecConfig blk :: Type Source #
Static configuration required for serialisation and deserialisation of types pertaining to this type of block.
Data family instead of type family to get better type inference.
Instances
data family ConsensusConfig p :: Type Source #
Static configuration required to run the consensus protocol
Every method in the
ConsensusProtocol
class takes the consensus
configuration as a parameter, so having this as a data family rather than a
type family resolves most ambiguity.
Defined out of the class so that protocols can define this type without having to define the entire protocol at the same time (or indeed in the same module).
Instances
data HardForkLedgerConfig xs Source #
HardForkLedgerConfig | |
|
Instances
Generic ( HardForkLedgerConfig xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics from :: HardForkLedgerConfig xs -> Rep ( HardForkLedgerConfig xs) x Source # to :: Rep ( HardForkLedgerConfig xs) x -> HardForkLedgerConfig xs Source # |
|
CanHardFork xs => NoThunks ( HardForkLedgerConfig xs) Source # | |
|
|
type Rep ( HardForkLedgerConfig xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics
type
Rep
(
HardForkLedgerConfig
xs) =
D1
('
MetaData
"HardForkLedgerConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" '
False
) (
C1
('
MetaCons
"HardForkLedgerConfig" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"hardForkLedgerConfigShape") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
Shape
xs))
:*:
S1
('
MetaSel
('
Just
"hardForkLedgerConfigPerEra") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
PerEraLedgerConfig
xs))))
|
data family StorageConfig blk :: Type Source #
Config needed for the
NodeInitStorage
class. Defined here to
avoid circular dependencies.
Instances
Functions on config
completeConsensusConfig' :: forall blk. HasPartialConsensusConfig ( BlockProtocol blk) => EpochInfo ( Except PastHorizonException ) -> WrapPartialConsensusConfig blk -> ConsensusConfig ( BlockProtocol blk) Source #
completeConsensusConfig'' :: forall blk. HasPartialConsensusConfig ( BlockProtocol blk) => EpochInfo ( Except PastHorizonException ) -> WrapPartialConsensusConfig blk -> WrapConsensusConfig blk Source #
completeLedgerConfig' :: forall blk. HasPartialLedgerConfig blk => EpochInfo ( Except PastHorizonException ) -> WrapPartialLedgerConfig blk -> LedgerConfig blk Source #
completeLedgerConfig'' :: forall blk. HasPartialLedgerConfig blk => EpochInfo ( Except PastHorizonException ) -> WrapPartialLedgerConfig blk -> WrapLedgerConfig blk Source #
distribLedgerConfig :: CanHardFork xs => EpochInfo ( Except PastHorizonException ) -> LedgerConfig ( HardForkBlock xs) -> NP WrapLedgerConfig xs Source #
distribTopLevelConfig :: All SingleEraBlock xs => EpochInfo ( Except PastHorizonException ) -> TopLevelConfig ( HardForkBlock xs) -> NP TopLevelConfig xs Source #
Convenience re-exports
data EpochInfo (m :: Type -> Type ) Source #
Information about epochs
Different epochs may have different sizes and different slot lengths. This
information is encapsulated by
EpochInfo
. It is parameterized over a monad
m
because the information about how long each epoch is may depend on
information derived from the blockchain itself. It ultimately requires acess
to state, and so either uses the monad for that or uses the monad to reify
failure due to cached state information being too stale for the current
query.