cardano-sl-0.4.3: Cardano SL main implementation

Safe HaskellNone
LanguageHaskell2010

Pos.Types.Block.Types

Synopsis

Documentation

data MainBlockchain ssc Source #

Represents blockchain consisting of main blocks, i. e. blocks with transactions and MPC messages.

Instances

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)))))
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))))))
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)))))
type BBlock (MainBlockchain ssc) # 
type BBlock (MainBlockchain ssc) = Block ssc
type ExtraBodyData (MainBlockchain ssc) # 
data Body (MainBlockchain ssc) # 
type BHeaderHash (MainBlockchain ssc) # 
type BBlockHeader (MainBlockchain ssc) # 
type ExtraHeaderData (MainBlockchain ssc) # 
data ConsensusData (MainBlockchain ssc) # 
data BodyProof (MainBlockchain ssc) # 

type MainBlockHeader ssc = GenericBlockHeader (MainBlockchain ssc) Source #

Header of generic main block.

data MainExtraHeaderData Source #

Represents main block header extra data

Constructors

MainExtraHeaderData 

Fields

type BlockHeaderAttributes = Attributes () Source #

Represents main block header attributes: map from 1-byte integer to arbitrary-type value. To be used for extending header with new fields via softfork.

type BlockBodyAttributes = Attributes () Source #

Represents main block body attributes: map from 1-byte integer to arbitrary-type value. To be used for extending block with new fields via softfork.

type BiSsc ssc = (Ssc ssc, Bi (GenericBlockHeader (GenesisBlockchain ssc)), Bi (GenericBlockHeader (MainBlockchain ssc))) Source #

Ssc w/ buildable blockchain

data BlockSignature ssc Source #

Signature of the block. Can be either regular signature from the issuer or delegated signature having a constraint on epoch indices (it means the signature is valid only if block's slot id has epoch inside the constrained interval).

Instances

Eq (BlockSignature ssc) Source # 
Show (BlockSignature ssc) Source # 
Generic (BlockSignature ssc) Source # 

Associated Types

type Rep (BlockSignature ssc) :: * -> * #

Methods

from :: BlockSignature ssc -> Rep (BlockSignature ssc) x #

to :: Rep (BlockSignature ssc) x -> BlockSignature ssc #

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

Methods

rnf :: BlockSignature ssc -> () #

Buildable (BlockSignature ssc) Source # 

Methods

build :: BlockSignature ssc -> Builder #

type Rep (BlockSignature ssc) Source # 
type Rep (BlockSignature ssc) = D1 (MetaData "BlockSignature" "Pos.Types.Block.Types" "cardano-sl-0.4.3-Ku3Vny2rTNkDjtuqkt7DM9" False) ((:+:) (C1 (MetaCons "BlockSignature" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Signature (MainToSign ssc))))) ((:+:) (C1 (MetaCons "BlockPSignatureEpoch" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ProxySigLight (MainToSign ssc))))) (C1 (MetaCons "BlockPSignatureSimple" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (ProxySigHeavy (MainToSign ssc)))))))

data MainToSign ssc Source #

Data to be signed in main block.

type MainBlock ssc = GenericBlock (MainBlockchain ssc) Source #

MainBlock is a block with transactions and MPC messages. It's the main part of our consensus algorithm.

data GenesisBlockchain ssc Source #

Represents blockchain consisting of genesis blocks. Genesis block doesn't have any special payload and is not strictly necessary. However, it is good idea to store list of leaders explicitly, because calculating it may be expensive operation. For example, it is useful for SPV-clients.

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 (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 (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 BBlock (GenesisBlockchain ssc) # 
type BBlock (GenesisBlockchain ssc) = Block ssc
type ExtraBodyData (GenesisBlockchain ssc) # 
data Body (GenesisBlockchain ssc) # 
type BHeaderHash (GenesisBlockchain ssc) # 
type BBlockHeader (GenesisBlockchain ssc) # 
type ExtraHeaderData (GenesisBlockchain ssc) # 
data ConsensusData (GenesisBlockchain ssc) # 
data BodyProof (GenesisBlockchain ssc) # 

type GenesisBlockHeader ssc = GenericBlockHeader (GenesisBlockchain ssc) Source #

Header of Genesis block.

type GenesisBlock ssc = GenericBlock (GenesisBlockchain ssc) Source #

Genesis block parametrized by GenesisBlockchain.

type GenesisBodyAttributes = Attributes () Source #

Represents genesis block header attributes.

type GenesisHeaderAttributes = Attributes () Source #

Represents genesis block header attributes.

type BlockHeader ssc = Either (GenesisBlockHeader ssc) (MainBlockHeader ssc) Source #

Either header of ordinary main block or genesis block.

type Block ssc = Either (GenesisBlock ssc) (MainBlock ssc) Source #

Block.

type BiHeader ssc = Bi (BlockHeader ssc) Source #