Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Chain.Update
Synopsis
- module Cardano.Chain.Update.Vote
-
newtype
SystemTag
=
SystemTag
{
- getSystemTag :: Text
- data SystemTagError
- checkSystemTag :: MonadError SystemTagError m => SystemTag -> m ()
- systemTagMaxLength :: Integral i => i
- osHelper :: OS -> Text
- archHelper :: Arch -> Text
-
data
SoftwareVersion
=
SoftwareVersion
{
- svAppName :: ! ApplicationName
- svNumber :: ! NumSoftwareVersion
- data SoftwareVersionError = SoftwareVersionApplicationNameError ApplicationNameError
- type NumSoftwareVersion = Word32
- checkSoftwareVersion :: MonadError SoftwareVersionError m => SoftwareVersion -> m ()
-
data
SoftforkRule
=
SoftforkRule
{
- srInitThd :: ! LovelacePortion
- srMinThd :: ! LovelacePortion
- srThdDecrement :: ! LovelacePortion
- data ProtocolVersion = ProtocolVersion { }
-
data
ProtocolParametersUpdate
=
ProtocolParametersUpdate
{
- ppuScriptVersion :: !( Maybe Word16 )
- ppuSlotDuration :: !( Maybe Natural )
- ppuMaxBlockSize :: !( Maybe Natural )
- ppuMaxHeaderSize :: !( Maybe Natural )
- ppuMaxTxSize :: !( Maybe Natural )
- ppuMaxProposalSize :: !( Maybe Natural )
- ppuMpcThd :: !( Maybe LovelacePortion )
- ppuHeavyDelThd :: !( Maybe LovelacePortion )
- ppuUpdateVoteThd :: !( Maybe LovelacePortion )
- ppuUpdateProposalThd :: !( Maybe LovelacePortion )
- ppuUpdateProposalTTL :: !( Maybe SlotNumber )
- ppuSoftforkRule :: !( Maybe SoftforkRule )
- ppuTxFeePolicy :: !( Maybe TxFeePolicy )
- ppuUnlockStakeEpoch :: !( Maybe EpochNumber )
- isEmpty :: ProtocolParametersUpdate -> Bool
- apply :: ProtocolParametersUpdate -> ProtocolParameters -> ProtocolParameters
-
data
ProtocolParameters
=
ProtocolParameters
{
- ppScriptVersion :: ! Word16
- ppSlotDuration :: ! Natural
- ppMaxBlockSize :: ! Natural
- ppMaxHeaderSize :: ! Natural
- ppMaxTxSize :: ! Natural
- ppMaxProposalSize :: ! Natural
- ppMpcThd :: ! LovelacePortion
- ppHeavyDelThd :: ! LovelacePortion
- ppUpdateVoteThd :: ! LovelacePortion
- ppUpdateProposalThd :: ! LovelacePortion
- ppUpdateProposalTTL :: ! SlotNumber
- ppSoftforkRule :: ! SoftforkRule
- ppTxFeePolicy :: ! TxFeePolicy
- ppUnlockStakeEpoch :: ! EpochNumber
- upAdptThd :: Word8 -> ProtocolParameters -> Int
- isBootstrapEraPP :: ProtocolParameters -> EpochNumber -> Bool
- module Cardano.Chain.Update.Proposal
- type Proof = Hash Payload
- mkProof :: Payload -> Proof
- recoverProof :: APayload ByteString -> Proof
-
data
APayload
a =
APayload
{
- payloadProposal :: !( Maybe ( AProposal a))
- payloadVotes :: ![ AVote a]
- payloadAnnotation :: a
- type Payload = APayload ()
- payload :: Maybe Proposal -> [ Vote ] -> Payload
- newtype InstallerHash = InstallerHash { }
- newtype ApplicationName = ApplicationName { }
- applicationNameMaxLength :: Integral i => i
- data ApplicationNameError
- checkApplicationName :: MonadError ApplicationNameError m => ApplicationName -> m ()
Documentation
module Cardano.Chain.Update.Vote
Tag of system for which update data is purposed, e.g. win64, mac32
Constructors
SystemTag | |
Fields
|
Instances
data SystemTagError Source #
Constructors
SystemTagNotAscii Text | |
SystemTagTooLong Text |
Instances
checkSystemTag :: MonadError SystemTagError m => SystemTag -> m () Source #
systemTagMaxLength :: Integral i => i Source #
osHelper :: OS -> Text Source #
Helper to turn an
OS
into a
Text
compatible with the
systemTag
previously used in 'configuration.yaml'
archHelper :: Arch -> Text Source #
Helper to turn an
Arch
into a
Text
compatible with the
systemTag
previously used in 'configuration.yaml'
data SoftwareVersion Source #
Software version
Constructors
SoftwareVersion | |
Fields
|
Instances
data SoftwareVersionError Source #
Constructors
SoftwareVersionApplicationNameError ApplicationNameError |
Instances
type NumSoftwareVersion = Word32 Source #
Numeric software version associated with
ApplicationName
checkSoftwareVersion :: MonadError SoftwareVersionError m => SoftwareVersion -> m () Source #
A software version is valid iff its application name is valid
data SoftforkRule Source #
Values defining softfork resolution rule
If a proposal is confirmed at the
s
-th epoch, softfork resolution
threshold at the
t
-th epoch will be 'max spMinThd (spInitThd - (t - s) *
spThdDecrement)'.
Softfork resolution threshold is the portion of total stake such that if total stake of issuers of blocks with some block version is greater than this portion, this block version becomes adopted.
Constructors
SoftforkRule | |
Fields
|
Instances
data ProtocolVersion Source #
Communication protocol version
Instances
data ProtocolParametersUpdate Source #
Data which represents modifications of block (aka protocol) version
Constructors
ProtocolParametersUpdate | |
Fields
|
Instances
data ProtocolParameters Source #
Data which is associated with
BlockVersion
Constructors
ProtocolParameters | |
Fields
|
Instances
upAdptThd :: Word8 -> ProtocolParameters -> Int Source #
In Byron we do not have a
upAdptThd
protocol parameter, so we have to
use the existing ones.
lovelacePortionToRational . srMinThd . ppSoftforkRule
will give us the
ratio (in the interval
[0, 1]
) of the total stake that has to endorse a
protocol version to become adopted. In genesis configuration, this ratio
will evaluate to
0.6
, so if we have 7 genesis keys,
upAdptThd = 4
.
isBootstrapEraPP :: ProtocolParameters -> EpochNumber -> Bool Source #
Version of
isBootstrapEra
which takes
ProtocolParameters
instead of
unlock stake epoch
recoverProof :: APayload ByteString -> Proof Source #
Update System payload
Constructors
APayload | |
Fields
|
Instances
newtype InstallerHash Source #
The hash of the installer of the new application
Constructors
InstallerHash | |
Fields |
Instances
newtype ApplicationName Source #
Constructors
ApplicationName | |
Fields |
Instances
applicationNameMaxLength :: Integral i => i Source #
data ApplicationNameError Source #
Constructors
ApplicationNameTooLong Text | |
ApplicationNameNotAscii Text |
Instances
checkApplicationName :: MonadError ApplicationNameError m => ApplicationName -> m () Source #
Smart constructor of
ApplicationName