Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
Instances
Eq SystemTag Source # | |
Ord SystemTag Source # | |
Defined in Cardano.Chain.Update.SystemTag |
|
Show SystemTag Source # | |
Generic SystemTag Source # | |
NFData SystemTag Source # | |
Defined in Cardano.Chain.Update.SystemTag |
|
ToJSON SystemTag Source # | |
ToJSONKey SystemTag Source # | |
Defined in Cardano.Chain.Update.SystemTag |
|
ToCBOR SystemTag Source # | |
FromCBOR SystemTag Source # | |
Buildable SystemTag Source # | |
NoThunks SystemTag Source # | |
type Rep SystemTag Source # | |
Defined in Cardano.Chain.Update.SystemTag
type
Rep
SystemTag
=
D1
('
MetaData
"SystemTag" "Cardano.Chain.Update.SystemTag" "cardano-ledger-byron-0.1.0.0-1U5kXR8zMRrE7QjCz70XVD" '
True
) (
C1
('
MetaCons
"SystemTag" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"getSystemTag") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
Text
)))
|
data SystemTagError Source #
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
Instances
data SoftwareVersionError Source #
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.
SoftforkRule | |
|
Instances
data ProtocolVersion Source #
Communication protocol version
Instances
data ProtocolParametersUpdate Source #
Data which represents modifications of block (aka protocol) version
ProtocolParametersUpdate | |
|
Instances
data ProtocolParameters Source #
Data which is associated with
BlockVersion
ProtocolParameters | |
|
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
APayload | |
|
Instances
newtype InstallerHash Source #
The hash of the installer of the new application
Instances
newtype ApplicationName Source #
Instances
applicationNameMaxLength :: Integral i => i Source #
data ApplicationNameError Source #
Instances
checkApplicationName :: MonadError ApplicationNameError m => ApplicationName -> m () Source #
Smart constructor of
ApplicationName