Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Genesis config for the spec
Intended for qualified import
import Ouroboros.Consensus.ByronSpec.Ledger.Genesis (ByronSpecGenesis) import qualified Ouroboros.Consensus.ByronSpec.Ledger.Genesis as Genesis
Synopsis
- data ByronSpecGenesis = ByronSpecGenesis {}
- modFeeParams ∷ ((Int, Int) → (Int, Int)) → ByronSpecGenesis → ByronSpecGenesis
- modPBftThreshold ∷ (Double → Double) → ByronSpecGenesis → ByronSpecGenesis
- modPParams ∷ (PParams → PParams) → ByronSpecGenesis → ByronSpecGenesis
- modUtxo ∷ (UTxO → UTxO) → ByronSpecGenesis → ByronSpecGenesis
- modUtxoValues ∷ (Integer → Integer) → ByronSpecGenesis → ByronSpecGenesis
- fromChainEnv ∷ Natural → Environment CHAIN → ByronSpecGenesis
- toChainEnv ∷ ByronSpecGenesis → Environment CHAIN
Documentation
data ByronSpecGenesis Source #
The equivalent of the genesis config for the abstract ledger
ByronSpecGenesis | |
|
Instances
modFeeParams ∷ ((Int, Int) → (Int, Int)) → ByronSpecGenesis → ByronSpecGenesis Source #
Modify the a
and b
fee parameters
modPParams ∷ (PParams → PParams) → ByronSpecGenesis → ByronSpecGenesis Source #
modUtxo ∷ (UTxO → UTxO) → ByronSpecGenesis → ByronSpecGenesis Source #
modUtxoValues ∷ (Integer → Integer) → ByronSpecGenesis → ByronSpecGenesis Source #
Adjust all values in the initial UTxO equally
Conversions
fromChainEnv ∷ Natural → Environment CHAIN → ByronSpecGenesis Source #
Construct genesis config from CHAIN environment
This doesn't make an awful lot of sense, but the abstract spec doesn't have a concept of a genesis config, and instead the CHAIN environment fulfills that role. In order to be able to reuse the test generators, we therefore also define a translation in the opposite direction.
toChainEnv ∷ ByronSpecGenesis → Environment CHAIN Source #
Derive CHAIN rule environment