Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data CoreNode c = CoreNode {
- cnGenesisKey ∷ !(SignKeyDSIGN c)
- cnDelegateKey ∷ !(SignKeyDSIGN c)
- cnStakingKey ∷ !(SignKeyDSIGN c)
- cnVRF ∷ !(SignKeyVRF c)
- cnKES ∷ !(SignKeyKES c)
- cnOCert ∷ !(OCert c)
- data CoreNodeKeyInfo c = CoreNodeKeyInfo {
- cnkiKeyPair ∷ (KeyPair 'Payment c, KeyPair 'Staking c)
- cnkiCoreNode ∷ (KeyPair 'Genesis c, AllIssuerKeys c 'GenesisDelegate)
- newtype DecentralizationParam = DecentralizationParam {}
- data KesConfig = KesConfig {}
- coreNodeKeys ∷ ∀ c. PraosCrypto c ⇒ CoreNode c → CoreNodeKeyInfo c
- genCoreNode ∷ ∀ c. PraosCrypto c ⇒ KESPeriod → Gen (CoreNode c)
- incrementMinorProtVer ∷ ProtVer → ProtVer
- initialLovelacePerCoreNode ∷ Word64
- mkCredential ∷ Crypto c ⇒ SignKeyDSIGN c → Credential r c
- mkEpochSize ∷ SecurityParam → Rational → EpochSize
- mkGenesisConfig ∷ ∀ c. PraosCrypto c ⇒ ProtVer → SecurityParam → Rational → DecentralizationParam → Word64 → SlotLength → KesConfig → [CoreNode c] → ShelleyGenesis c
- mkKesConfig ∷ ∀ proxy c. Crypto c ⇒ proxy c → NumSlots → KesConfig
- mkKeyHash ∷ Crypto c ⇒ SignKeyDSIGN c → KeyHash r c
- mkKeyHashVrf ∷ (HashAlgorithm h, VRFAlgorithm vrf) ⇒ SignKeyVRF vrf → Hash h (VerKeyVRF vrf)
- mkKeyPair ∷ Crypto c ⇒ SignKeyDSIGN c → KeyPair r c
- mkLeaderCredentials ∷ PraosCrypto c ⇒ CoreNode c → ShelleyLeaderCredentials c
- mkMASetDecentralizationParamTxs ∷ ∀ proto era. (ShelleyBasedEra era, AllegraEraTxBody era, ShelleyEraTxBody era, AtMostEra AlonzoEra era) ⇒ [CoreNode (EraCrypto era)] → ProtVer → SlotNo → DecentralizationParam → [GenTx (ShelleyBlock proto era)]
- mkProtocolShelley ∷ ∀ m c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) (ShelleyEra c)) ⇒ ShelleyGenesis c → Nonce → ProtVer → CoreNode c → (ProtocolInfo (ShelleyBlock (TPraos c) (ShelleyEra c)), m [BlockForging m (ShelleyBlock (TPraos c) (ShelleyEra c))])
- mkSetDecentralizationParamTxs ∷ ∀ c. ShelleyBasedEra (ShelleyEra c) ⇒ [CoreNode c] → ProtVer → SlotNo → DecentralizationParam → [GenTx (ShelleyBlock (TPraos c) (ShelleyEra c))]
- mkVerKey ∷ Crypto c ⇒ SignKeyDSIGN c → VKey r c
- networkId ∷ Network
- tpraosSlotLength ∷ SlotLength
Documentation
CoreNode | |
|
data CoreNodeKeyInfo c Source #
CoreNodeKeyInfo | |
|
newtype DecentralizationParam Source #
A suitable value for the d
protocol parameter
In the range 0
to 1
, inclusive. Beware the misnomer: 0
means fully
decentralized, and 1
means fully centralized.
Instances
Currently
is the max number of
slots the test can run without needing new ocerts.maxEvolutions
* slotsPerEvolution
TODO This limitation may be lifted by PR #2107, see https://github.com/IntersectMBO/ouroboros-network/issues/2107.
coreNodeKeys ∷ ∀ c. PraosCrypto c ⇒ CoreNode c → CoreNodeKeyInfo c Source #
genCoreNode ∷ ∀ c. PraosCrypto c ⇒ KESPeriod → Gen (CoreNode c) Source #
mkCredential ∷ Crypto c ⇒ SignKeyDSIGN c → Credential r c Source #
mkEpochSize ∷ SecurityParam → Rational → EpochSize Source #
The epoch size, given k
and f
.
INVARIANT: 10 * k / f
must be a whole number.
∷ ∀ c. PraosCrypto c | |
⇒ ProtVer | Initial protocol version |
→ SecurityParam | |
→ Rational | Initial active slot coefficient |
→ DecentralizationParam | |
→ Word64 | Max Lovelace supply, must be >= #coreNodes * initialLovelacePerCoreNode |
→ SlotLength | |
→ KesConfig | |
→ [CoreNode c] | |
→ ShelleyGenesis c |
Note: a KES algorithm supports a particular max number of KES evolutions, but we can configure a potentially lower maximum for the ledger, that's why we take it as an argument.
mkKesConfig ∷ ∀ proxy c. Crypto c ⇒ proxy c → NumSlots → KesConfig Source #
A KesConfig
that will not require more evolutions than this test's crypto
allows.
mkKeyHashVrf ∷ (HashAlgorithm h, VRFAlgorithm vrf) ⇒ SignKeyVRF vrf → Hash h (VerKeyVRF vrf) Source #
mkMASetDecentralizationParamTxs Source #
∷ ∀ proto era. (ShelleyBasedEra era, AllegraEraTxBody era, ShelleyEraTxBody era, AtMostEra AlonzoEra era) | |
⇒ [CoreNode (EraCrypto era)] | |
→ ProtVer | The proposed protocol version |
→ SlotNo | The TTL |
→ DecentralizationParam | The new value |
→ [GenTx (ShelleyBlock proto era)] |
TODO This is a copy-paste-edit of mkSetDecentralizationParamTxs
Our current plan is to replace all of this infrastructure with the ThreadNet rewrite; so we're minimizing the work and maintenance here for now.
mkProtocolShelley ∷ ∀ m c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) (ShelleyEra c)) ⇒ ShelleyGenesis c → Nonce → ProtVer → CoreNode c → (ProtocolInfo (ShelleyBlock (TPraos c) (ShelleyEra c)), m [BlockForging m (ShelleyBlock (TPraos c) (ShelleyEra c))]) Source #
mkSetDecentralizationParamTxs Source #
∷ ∀ c. ShelleyBasedEra (ShelleyEra c) | |
⇒ [CoreNode c] | |
→ ProtVer | The proposed protocol version |
→ SlotNo | The TTL |
→ DecentralizationParam | The new value |
→ [GenTx (ShelleyBlock (TPraos c) (ShelleyEra c))] |