cardano-sl-0.4.3: Cardano SL main implementation

Safe HaskellNone
LanguageHaskell2010

Pos.Types.Block.Instances

Contents

Synopsis

Documentation

data family BodyProof p :: * #

Proof of data stored in the body. Ensures immutability.

Instances

type Rep (BodyProof (GenesisBlockchain ssc)) # 
type Rep (BodyProof (GenesisBlockchain ssc)) = D1 (MetaData "BodyProof" "Pos.Types.Block.Instances" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) (C1 (MetaCons "GenesisProof" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (Hash SlotLeaders))))
type Rep (BodyProof (MainBlockchain ssc)) # 
type Rep (BodyProof (MainBlockchain ssc)) = D1 (MetaData "BodyProof" "Pos.Types.Block.Instances" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) (C1 (MetaCons "MainProof" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "mpTxProof") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TxProof)) (S1 (MetaSel (Just Symbol "mpMpcProof") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (SscProof ssc)))) ((:*:) (S1 (MetaSel (Just Symbol "mpProxySKsProof") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (Hash [ProxySKHeavy]))) (S1 (MetaSel (Just Symbol "mpUpdateProof") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 UpdateProof)))))
data BodyProof (GenesisBlockchain ssc) # 
data BodyProof (MainBlockchain ssc) # 

data family ConsensusData p :: * #

Consensus data which can be used to check consensus properties.

Instances

type Rep (ConsensusData (GenesisBlockchain ssc)) # 
type Rep (ConsensusData (GenesisBlockchain ssc)) = D1 (MetaData "ConsensusData" "Pos.Types.Block.Instances" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) (C1 (MetaCons "GenesisConsensusData" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gcdEpoch") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 EpochIndex)) (S1 (MetaSel (Just Symbol "_gcdDifficulty") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 ChainDifficulty))))
type Rep (ConsensusData (MainBlockchain ssc)) # 
type Rep (ConsensusData (MainBlockchain ssc)) = D1 (MetaData "ConsensusData" "Pos.Types.Block.Instances" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) (C1 (MetaCons "MainConsensusData" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_mcdSlot") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 SlotId)) (S1 (MetaSel (Just Symbol "_mcdLeaderKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PublicKey))) ((:*:) (S1 (MetaSel (Just Symbol "_mcdDifficulty") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 ChainDifficulty)) (S1 (MetaSel (Just Symbol "_mcdSignature") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (BlockSignature ssc))))))
data ConsensusData (GenesisBlockchain ssc) # 
data ConsensusData (MainBlockchain ssc) # 

data family Body p :: * #

Body contains payload and other heavy data.

Instances

type Rep (Body (GenesisBlockchain ssc)) # 
type Rep (Body (GenesisBlockchain ssc)) = D1 (MetaData "Body" "Pos.Types.Block.Instances" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) (C1 (MetaCons "GenesisBody" PrefixI True) (S1 (MetaSel (Just Symbol "_gbLeaders") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 SlotLeaders)))
type Rep (Body (MainBlockchain ssc)) # 
type Rep (Body (MainBlockchain ssc)) = D1 (MetaData "Body" "Pos.Types.Block.Instances" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) (C1 (MetaCons "MainBody" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_mbTxPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TxPayload)) (S1 (MetaSel (Just Symbol "_mbMpc") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (SscPayload ssc)))) ((:*:) (S1 (MetaSel (Just Symbol "_mbProxySKs") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [ProxySKHeavy])) (S1 (MetaSel (Just Symbol "_mbUpdatePayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 UpdatePayload)))))
data Body (GenesisBlockchain ssc) # 
data Body (MainBlockchain ssc) # 

MainBlock and GenesisBlock lenses

blockSignature :: Lens' (MainBlock ssc) (BlockSignature ssc) Source #

Lens from MainBlock to Signature.

blockTxas :: Getter (MainBlock ssc) [TxAux] Source #

Getter from MainBlock to a list of transactions together with auxiliary data.

mbMpc :: Lens' (Body (MainBlockchain ssc)) (SscPayload ssc) Source #

Lens for SscPayload in main block body.

mbTxPayload :: Lens' (Body (MainBlockchain ssc)) TxPayload Source #

Lens for transaction payload in main block body.

mbTxs :: Lens' (Body (MainBlockchain ssc)) (MerkleTree Tx) Source #

Lens for transaction tree in main block body.

mbWitnesses :: Lens' (Body (MainBlockchain ssc)) [TxWitness] Source #

Lens for witness list in main block body.

mbProxySKs :: Lens' (Body (MainBlockchain ssc)) [ProxySKHeavy] Source #

Lens for ProxySKs in main block body.

HeaderHash related functions

blockHeaderHash :: BiHeader ssc => BlockHeader ssc -> HeaderHash Source #

This function is required because type inference fails in attempts to hash only Right or Left.

Orphan instances

HasBlockVersion MainExtraHeaderData Source # 
HasSoftwareVersion MainExtraHeaderData Source # 
HasHeaderHash HeaderHash Source # 
HasEpochIndex SlotId Source # 
Eq (Body (GenesisBlockchain ssc)) Source # 
(Eq (SscPayload ssc), Ssc ssc) => Eq (Body (MainBlockchain ssc)) Source # 

Methods

(==) :: Body (MainBlockchain ssc) -> Body (MainBlockchain ssc) -> Bool #

(/=) :: Body (MainBlockchain ssc) -> Body (MainBlockchain ssc) -> Bool #

Eq (ConsensusData (GenesisBlockchain ssc)) Source # 
Eq (ConsensusData (MainBlockchain ssc)) Source # 
Eq (BodyProof (GenesisBlockchain ssc)) Source # 
Ssc ssc => Eq (BodyProof (MainBlockchain ssc)) Source # 
Show (Body (GenesisBlockchain ssc)) Source # 
Ssc ssc => Show (Body (MainBlockchain ssc)) Source # 
Show (ConsensusData (GenesisBlockchain ssc)) Source # 
Show (ConsensusData (MainBlockchain ssc)) Source # 
Show (BodyProof (GenesisBlockchain ssc)) Source # 
Ssc ssc => Show (BodyProof (MainBlockchain ssc)) Source # 
Generic (Body (GenesisBlockchain ssc)) Source # 

Associated Types

type Rep (Body (GenesisBlockchain ssc)) :: * -> * #

Generic (Body (MainBlockchain ssc)) Source # 

Associated Types

type Rep (Body (MainBlockchain ssc)) :: * -> * #

Methods

from :: Body (MainBlockchain ssc) -> Rep (Body (MainBlockchain ssc)) x #

to :: Rep (Body (MainBlockchain ssc)) x -> Body (MainBlockchain ssc) #

Generic (ConsensusData (GenesisBlockchain ssc)) Source # 
Generic (ConsensusData (MainBlockchain ssc)) Source # 

Associated Types

type Rep (ConsensusData (MainBlockchain ssc)) :: * -> * #

Generic (BodyProof (GenesisBlockchain ssc)) Source # 

Associated Types

type Rep (BodyProof (GenesisBlockchain ssc)) :: * -> * #

Generic (BodyProof (MainBlockchain ssc)) Source # 

Associated Types

type Rep (BodyProof (MainBlockchain ssc)) :: * -> * #

Ssc ssc => NFData (Body (GenesisBlockchain ssc)) Source # 

Methods

rnf :: Body (GenesisBlockchain ssc) -> () #

Ssc ssc => NFData (Body (MainBlockchain ssc)) Source # 

Methods

rnf :: Body (MainBlockchain ssc) -> () #

Ssc ssc => NFData (ConsensusData (GenesisBlockchain ssc)) Source # 

Methods

rnf :: ConsensusData (GenesisBlockchain ssc) -> () #

Ssc ssc => NFData (ConsensusData (MainBlockchain ssc)) Source # 

Methods

rnf :: ConsensusData (MainBlockchain ssc) -> () #

Ssc ssc => NFData (BodyProof (GenesisBlockchain ssc)) Source # 

Methods

rnf :: BodyProof (GenesisBlockchain ssc) -> () #

Ssc ssc => NFData (BodyProof (MainBlockchain ssc)) Source # 

Methods

rnf :: BodyProof (MainBlockchain ssc) -> () #

Ssc ssc => NFData (GenesisBlock ssc) Source # 

Methods

rnf :: GenesisBlock ssc -> () #

Ssc ssc => NFData (MainBlock ssc) Source # 

Methods

rnf :: MainBlock ssc -> () #

(~) * (BHeaderHash b) HeaderHash => HasPrevBlock (GenericBlockHeader b) Source # 
(~) * (BHeaderHash b) HeaderHash => HasPrevBlock (GenericBlock b) Source # 
HasDifficulty (ConsensusData (GenesisBlockchain ssc)) Source # 
HasDifficulty (ConsensusData (MainBlockchain ssc)) Source # 
HasDifficulty (Block ssc) Source # 
HasDifficulty (BlockHeader ssc) Source # 
HasDifficulty (GenesisBlock ssc) Source # 
HasDifficulty (GenesisBlockHeader ssc) Source # 
HasDifficulty (MainBlock ssc) Source # 
HasDifficulty (MainBlockHeader ssc) Source # 
HasBlockVersion (MainBlock ssc) Source # 
HasBlockVersion (MainBlockHeader ssc) Source # 
HasSoftwareVersion (MainBlock ssc) Source # 
HasSoftwareVersion (MainBlockHeader ssc) Source # 
BiHeader ssc => HasHeaderHash (Block ssc) Source # 

Methods

headerHash :: Block ssc -> HeaderHash #

BiHeader ssc => HasHeaderHash (BlockHeader ssc) Source # 
BiHeader ssc => HasHeaderHash (GenesisBlock ssc) Source # 
BiHeader ssc => HasHeaderHash (GenesisBlockHeader ssc) Source # 
BiHeader ssc => HasHeaderHash (MainBlock ssc) Source # 

Methods

headerHash :: MainBlock ssc -> HeaderHash #

BiHeader ssc => HasHeaderHash (MainBlockHeader ssc) Source # 
HasEpochIndex (GenesisBlock ssc) Source # 
HasEpochIndex (GenesisBlockHeader ssc) Source # 
HasEpochIndex (MainBlock ssc) Source # 
HasEpochIndex (MainBlockHeader ssc) Source # 
HasEpochOrSlot (GenesisBlock ssc) Source # 
HasEpochOrSlot (GenesisBlockHeader ssc) Source # 
HasEpochOrSlot (MainBlock ssc) Source # 
HasEpochOrSlot (MainBlockHeader ssc) Source # 
BiHeader ssc => IsHeader (BlockHeader ssc) Source # 
BiHeader ssc => IsHeader (GenesisBlockHeader ssc) Source # 
BiHeader ssc => IsHeader (MainBlockHeader ssc) Source # 
BiHeader ssc => IsGenesisHeader (GenesisBlockHeader ssc) Source # 
BiHeader ssc => IsMainHeader (MainBlockHeader ssc) Source # 
Blockchain (GenesisBlockchain ssc) Source # 
(SscHelpersClass ssc, Bi TxWitness, Bi UpdatePayload, Bi EpochIndex) => Blockchain (MainBlockchain ssc) Source # 
BiSsc ssc => Buildable (BlockHeader ssc) Source # 

Methods

build :: BlockHeader ssc -> Builder #

BiSsc ssc => Buildable (GenesisBlock ssc) Source # 

Methods

build :: GenesisBlock ssc -> Builder #

BiSsc ssc => Buildable (GenesisBlockHeader ssc) Source # 
(Bi UpdateProposal, BiSsc ssc) => Buildable (MainBlock ssc) Source # 

Methods

build :: MainBlock ssc -> Builder #

BiSsc ssc => Buildable (MainBlockHeader ssc) Source # 

Methods

build :: MainBlockHeader ssc -> Builder #

(HasPrevBlock s, HasPrevBlock s') => HasPrevBlock (Either s s') Source # 
HasPrevBlock s => HasPrevBlock (s, z) Source #

Class for something that has previous block (lens to Hash for this block).

Methods

prevBlockL :: Lens' (s, z) HeaderHash #

(HasEpochIndex a, HasEpochIndex b) => HasEpochIndex (Either a b) Source # 
(HasEpochOrSlot a, HasEpochOrSlot b) => HasEpochOrSlot (Either a b) Source #