ouroboros-consensus-byronspec-0.1.0.0: ByronSpec ledger integration in the Ouroboros consensus layer
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Synopsis

Type family instances

data family GenTx blk Source #

Generalized transaction

The mempool (and, accordingly, blocks) consist of "generalized transactions"; this could be "proper" transactions (transferring funds) but also other kinds of things such as update proposals, delegations, etc.

Instances

Instances details
Show (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Show (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Generic (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Associated Types

type Rep (GenTx ByronSpecBlock) ∷ TypeType Source #

Generic (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Associated Types

type Rep (Validated (GenTx ByronSpecBlock)) ∷ TypeType Source #

Serialise (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Methods

encodeGenTx ByronSpecBlock → Encoding #

decode ∷ Decoder s (GenTx ByronSpecBlock) #

encodeList ∷ [GenTx ByronSpecBlock] → Encoding #

decodeList ∷ Decoder s [GenTx ByronSpecBlock] #

NoThunks (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Methods

noThunks ∷ Context → GenTx ByronSpecBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → GenTx ByronSpecBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (GenTx ByronSpecBlock) → String #

NoThunks (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Methods

noThunks ∷ Context → Validated (GenTx ByronSpecBlock) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Validated (GenTx ByronSpecBlock) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Validated (GenTx ByronSpecBlock)) → String #

newtype GenTx ByronSpecBlock Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (GenTx ByronSpecBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-byronspec-0.1.0.0-inplace" 'True) (C1 ('MetaCons "ByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByronSpecGenTx)))
type Rep (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-byronspec-0.1.0.0-inplace" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
newtype Validated (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

data family Validated x Source #

" Validated " transaction or block

The ledger defines how to validate transactions and blocks. It's possible the type before and after validation may be distinct (eg Alonzo transactions), which originally motivated this family.

We also gain the related benefit that certain interface functions, such as those that reapply blocks, can have a more precise type now. TODO

Similarly, the Node-to-Client mini protocols can explicitly indicate that the client trusts the blocks from the local server, by having the server send Validated blocks to the client. TODO

Note that validation has different implications for a transaction than for a block. In particular, a validated transaction can be " reapplied " to different ledger states, whereas a validated block must only be " reapplied " to the exact same ledger state (eg as part of rebuilding from an on-disk ledger snapshot).

Since the ledger defines validation, see the ledger details for concrete examples of what determines the validity (wrt to a LedgerState) of a transaction and/or block. Example properties include: a transaction's claimed inputs exist and are still unspent, a block carries a sufficient cryptographic signature, etc.

Instances

Instances details
Show (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Generic (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Associated Types

type Rep (Validated (GenTx ByronSpecBlock)) ∷ TypeType Source #

NoThunks (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Methods

noThunks ∷ Context → Validated (GenTx ByronSpecBlock) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Validated (GenTx ByronSpecBlock) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Validated (GenTx ByronSpecBlock)) → String #

type Rep (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-byronspec-0.1.0.0-inplace" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
newtype Validated (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Orphan instances

LedgerSupportsMempool ByronSpecBlock Source # 
Instance details

Show (GenTx ByronSpecBlock) Source # 
Instance details

Show (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Generic (GenTx ByronSpecBlock) Source # 
Instance details

Associated Types

type Rep (GenTx ByronSpecBlock) ∷ TypeType Source #

Generic (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Associated Types

type Rep (Validated (GenTx ByronSpecBlock)) ∷ TypeType Source #

Serialise (GenTx ByronSpecBlock) Source # 
Instance details

Methods

encodeGenTx ByronSpecBlock → Encoding #

decode ∷ Decoder s (GenTx ByronSpecBlock) #

encodeList ∷ [GenTx ByronSpecBlock] → Encoding #

decodeList ∷ Decoder s [GenTx ByronSpecBlock] #

NoThunks (GenTx ByronSpecBlock) Source # 
Instance details

Methods

noThunks ∷ Context → GenTx ByronSpecBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → GenTx ByronSpecBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (GenTx ByronSpecBlock) → String #

NoThunks (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Methods

noThunks ∷ Context → Validated (GenTx ByronSpecBlock) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Validated (GenTx ByronSpecBlock) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Validated (GenTx ByronSpecBlock)) → String #