Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PParams = PParams {}
- newtype BkSgnCntT = BkSgnCntT Double
- newtype UpAdptThd = UpAdptThd Double
- newtype FactorB = FactorB Int
- newtype FactorA = FactorA Int
- data ProtVer = ProtVer {}
- newtype UpId = UpId Int
- bkSgnCntT ∷ Lens' PParams BkSgnCntT
- bkSlotsPerEpoch ∷ Lens' PParams SlotCount
- factorA ∷ Lens' PParams FactorA
- factorB ∷ Lens' PParams FactorB
- maxBkSz ∷ Lens' PParams Natural
- maxHdrSz ∷ Lens' PParams Natural
- maxPropSz ∷ Lens' PParams Natural
- maxTxSz ∷ Lens' PParams Natural
- scriptVersion ∷ Lens' PParams Natural
- upAdptThd ∷ Lens' PParams UpAdptThd
- upTtl ∷ Lens' PParams SlotCount
- data SwVer = SwVer {}
- newtype ApVer = ApVer Natural
- newtype ApName = ApName String
- pvAlt ∷ Lens' ProtVer Natural
- pvMaj ∷ Lens' ProtVer Natural
- pvMin ∷ Lens' ProtVer Natural
- data UProp = UProp {}
- data Metadata = Metadata
- type STag = String
- type UpSD = (ProtVer, PParams, SwVer, Set STag, Metadata)
- svName ∷ Lens' SwVer ApName
- svVer ∷ Lens' SwVer ApVer
- data Vote = Vote {}
- data UpregPredicateFailure
- data UPREG
- data UpvPredicateFailure
- data UPV
- data UppvvPredicateFailure
- data UPPVV
- data UpsvvPredicateFailure
- data UPSVV
- data UpdateConstraintViolation
- upId ∷ Lens' UProp UpId
- upIssuer ∷ Lens' UProp VKey
- upMdt ∷ Lens' UProp Metadata
- upPV ∷ Lens' UProp ProtVer
- upParams ∷ Lens' UProp PParams
- upSTags ∷ Lens' UProp (Set STag)
- upSig ∷ Lens' UProp (Sig UpSD)
- upSwVer ∷ Lens' UProp SwVer
- upSigData ∷ Lens' UProp UpSD
- getUpSigData ∷ UProp → UpSD
- mkUProp ∷ UpId → VKey → ProtVer → PParams → SwVer → Set STag → Metadata → UProp
- inMap ∷ (Ord key, Eq v) ⇒ key → v → Map key v → Bool
- invertMap ∷ (Ord k, Ord v) ⇒ Map k v → Map v (Set k)
- invertBijection ∷ Ord v ⇒ Map k v → Map v k
- (==>) ∷ Bool → Bool → Bool
- pvCanFollow ∷ ProtVer → ProtVer → Bool
- checkUpdateConstraints ∷ PParams → UProp → [UpdateConstraintViolation]
- (<=?) ∷ Ord a ⇒ a → a → Maybe (a, Threshold a)
- orError ∷ Maybe (a, b) → (a → b → e) → Maybe e
- canUpdate ∷ PParams → UProp → Rule UPPVV ctx ()
- svCanFollow ∷ Map ApName (ApVer, Slot, Metadata) → (ApName, ApVer) → Bool
- data UpiecPredicateFailure = PVBUMPFailure (PredicateFailure PVBUMP)
- data UPIEC
- data PvbumpPredicateFailure = NoPVBUMPFailure
- data PVBUMP
- data UpiendPredicateFailure = UPENDFailure (PredicateFailure UPEND)
- data UPIEND
- data UpivotesPredicateFailure = ApplyVotesFailure (PredicateFailure APPLYVOTES)
- data UPIVOTES
- data ApplyVotesPredicateFailure = UpivoteFailure (PredicateFailure UPIVOTE)
- data APPLYVOTES
- data UpivotePredicateFailure = UPVOTEFailure (PredicateFailure UPVOTE)
- data UPIVOTE
- data UpiregPredicateFailure = UPREGFailure (PredicateFailure UPREG)
- data UPIREG
- type UPIState = ((ProtVer, PParams), [(Slot, (ProtVer, PParams))], Map ApName (ApVer, Slot, Metadata), Map UpId (ProtVer, PParams), Map UpId (ApName, ApVer, Metadata), Map UpId Slot, Set (UpId, VKeyGenesis), Set (ProtVer, VKeyGenesis), Map UpId Slot)
- type UPIEnv = (Slot, Bimap VKeyGenesis VKey, BlockCount, Word8)
- data UpendPredicateFailure
- data UPEND
- data FadsPredicateFailure
- data FADS
- data UpvotePredicateFailure
- data UPVOTE
- data AddvotePredicateFailure
- data ADDVOTE
- vCaster ∷ Lens' Vote VKey
- vPropId ∷ Lens' Vote UpId
- vSig ∷ Lens' Vote (Sig UpId)
- mkVote ∷ VKey → UpId → Vote
- findKey ∷ (v → Bool) → Map k v → Maybe (k, v)
- delegationMap ∷ UPIEnv → Bimap VKeyGenesis VKey
- fstUPIState ∷ UPIState → (ProtVer, PParams)
- sndUPIState ∷ UPIState → [(Slot, (ProtVer, PParams))]
- trdUPIState ∷ UPIState → Map ApName (ApVer, Slot, Metadata)
- emptyUPIState ∷ UPIState
- initialPParams ∷ PParams
- protocolVersion ∷ UPIState → ProtVer
- protocolParameters ∷ UPIState → PParams
- applicationVersions ∷ UPIState → Map ApName (ApVer, Slot, Metadata)
- confirmedProposals ∷ UPIState → Map UpId Slot
- futureAdoptions ∷ UPIState → [(Slot, (ProtVer, PParams))]
- endorsements ∷ UPIState → Set (ProtVer, VKeyGenesis)
- registeredProtocolUpdateProposals ∷ UPIState → Map UpId (ProtVer, PParams)
- upiEnvGen ∷ Gen UPIEnv
- dmapGen ∷ Word8 → Gen (Bimap VKeyGenesis VKey)
- ppsUpdateFrom ∷ PParams → Gen PParams
- increasingProbabilityAt ∷ Gen a → (a, a) → Gen a
- randomUpId ∷ Gen UpId
- reSign ∷ UProp → UProp
- pickHighlyEndorsedProtocolVersion ∷ [(ProtVer, Set VKeyGenesis)] → Gen (Maybe ProtVer)
- updateProposalAndVotesGen ∷ UPIEnv → UPIState → Gen (Maybe UProp, [Vote])
- protocolVersionEndorsementGen ∷ UPIEnv → UPIState → Gen ProtVer
- type family PredicateFailure a
Documentation
Protocol parameters.
PParams | |
|
Instances
Instances
Instances
Instances
Instances
Protocol version
Instances
Instances
Data UpId Source # | |
Defined in Byron.Spec.Ledger.Update gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → UpId → c UpId Source # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c UpId Source # toConstr ∷ UpId → Constr Source # dataTypeOf ∷ UpId → DataType Source # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c UpId) Source # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c UpId) Source # gmapT ∷ (∀ b. Data b ⇒ b → b) → UpId → UpId Source # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → UpId → r Source # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → UpId → r Source # gmapQ ∷ (∀ d. Data d ⇒ d → u) → UpId → [u] Source # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → UpId → u Source # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → UpId → m UpId Source # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → UpId → m UpId Source # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → UpId → m UpId Source # | |
Generic UpId Source # | |
Show UpId Source # | |
HasTypeReps UpId Source # | |
Eq UpId Source # | |
Ord UpId Source # | |
Hashable UpId Source # | |
NoThunks UpId Source # | |
type Rep UpId Source # | |
Defined in Byron.Spec.Ledger.Update |
Instances
Application version
Instances
Instances
Update proposal
Instances
For now we do not have any requirements on metadata.
Instances
System tag, this represents a target operating system for the update (e.g.
linux
, win64
, or mac32
).
type UpSD = (ProtVer, PParams, SwVer, Set STag, Metadata) Source #
Part of the update proposal which must be signed
Instances
data UpregPredicateFailure Source #
These PredicateFailure
s are all throwable.
Instances
Instances
data UpvPredicateFailure Source #
These PredicateFailure
s are all throwable.
UPPVVFailure (PredicateFailure UPPVV) | |
UPSVVFailure (PredicateFailure UPSVV) | |
AVChangedInPVUpdate ApName ApVer (Maybe (ApVer, Slot, Metadata)) | |
ParamsChangedInSVUpdate | |
PVChangedInSVUpdate |
Instances
Update proposal validity
Instances
data UppvvPredicateFailure Source #
These PredicateFailure
s are all "throwable". The disjunction of the
rules' preconditions is not True
- the PredicateFailure
s represent
False
cases.
Instances
Instances
data UpsvvPredicateFailure Source #
These PredicateFailure
s are all "throwable". The disjunction of the
rules' preconditions is not True
- the PredicateFailure
s represent
False
cases.
Instances
Update Proposal Software Version Validation
Instances
data UpdateConstraintViolation Source #
Violations on the constraints of the allowed values for new protocol parameters.
BlockSizeTooLarge Natural (Threshold Natural) | |
TransactionSizeTooLarge Natural (Threshold Natural) | |
ScriptVersionTooLarge Natural (Threshold Natural) | |
ScriptVersionTooSmall Natural (Threshold Natural) |
Instances
getUpSigData ∷ UProp → UpSD Source #
invertMap ∷ (Ord k, Ord v) ⇒ Map k v → Map v (Set k) Source #
Invert a map
Examples:
>>>
import qualified Data.Map.Strict as Map
>>>
import Byron.Spec.Ledger.Update (invertMap)
>>>
invertMap (Map.fromList [('a', 1 :: Int), ('b', 2), ('c', 3), ('d', 1)])
fromList [(1,fromList "ad"),(2,fromList "b"),(3,fromList "c")]
invertBijection ∷ Ord v ⇒ Map k v → Map v k Source #
Invert a map which we assert to be a bijection. If this map is not a bijection, the behaviour is not guaranteed.
Examples:
>>>
import qualified Data.Map.Strict as Map
>>>
invertBijection (Map.fromList [('a', 1 :: Int), ('b', 2), ('c', 3)])
fromList [(1,'a'),(2,'b'),(3,'c')]
Check whether a protocol version can follow the current protocol version.
checkUpdateConstraints ∷ PParams → UProp → [UpdateConstraintViolation] Source #
Check whether an update proposal marks a valid update
data UpiecPredicateFailure Source #
Instances
Instances
data PvbumpPredicateFailure Source #
Instances
Instances
data UpiendPredicateFailure Source #
Instances
Instances
data UpivotesPredicateFailure Source #
Instances
Instances
data ApplyVotesPredicateFailure Source #
Instances
data APPLYVOTES Source #
Instances
data UpivotePredicateFailure Source #