ouroboros-consensus-byron-0.1.0.0: Byron ledger integration in the Ouroboros consensus layer
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Byron.Ledger.Mempool

Description

Byron mempool integration

Synopsis

Mempool integration

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
SerialiseNodeToNode ByronBlock (GenTx ByronBlock) Source #

No CBOR-in-CBOR, because we check for canonical encodings, which means we can use the recomputed encoding for the annotation.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToClient ByronBlock (GenTx ByronBlock) Source #

No CBOR-in-CBOR, because we check for canonical encodings, which means we can use the recomputed encoding for the annotation.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

ShowProxy (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

ShowProxy (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Eq (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Eq (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Ord (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Show (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Show (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Generic (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Associated Types

type Rep (GenTx ByronBlock) :: Type -> Type #

NoThunks (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

NoThunks (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

HasTxId (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Condense (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Condense (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data GenTx ByronBlock Source #

Generalized transactions in Byron

This is effectively the same as AMempoolPayload but we cache the transaction ID (a hash).

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type Rep (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data TxId (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data family TxId tx Source #

A generalized transaction, GenTx, identifier.

Instances

Instances details
SerialiseNodeToNode ByronBlock (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

ShowProxy (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Eq (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Ord (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Show (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

NoThunks (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Condense (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data TxId (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Transaction IDs

Serialisation

decodeByronGenTx :: Decoder s (GenTx ByronBlock) Source #

The ByteString annotation will be the canonical encoding.

While the new implementation does not care about canonical encodings, the old one does. When a generalised transaction arrives that is not in its canonical encoding (only the ATxAux of the ByronTx can be produced by nodes that are not under our control), the old implementation will reject it. Therefore, we need to reject them too. See #905.

We use the ledger to check for canonical encodings: the ledger will check whether the signed hash of the transaction (in the case of a ATxAux, the transaction witness) matches the annotated bytestring. Is therefore important that the annotated bytestring be the canonical encoding, not the original, possibly non-canonical encoding.

Low-level API (primarily for testing)

Auxiliary functions

countByronGenTxs :: ByronBlock -> Word64 Source #

Count all (generalized) transactions in the block

Orphan instances

LedgerSupportsMempool ByronBlock Source # 
Instance details

HasTxs ByronBlock Source # 
Instance details

ShowProxy (GenTx ByronBlock) Source # 
Instance details

ShowProxy (TxId (GenTx ByronBlock)) Source # 
Instance details

Eq (GenTx ByronBlock) Source # 
Instance details

Eq (TxId (GenTx ByronBlock)) Source # 
Instance details

Ord (TxId (GenTx ByronBlock)) Source # 
Instance details

Show (GenTx ByronBlock) Source # 
Instance details

Show (GenTxId ByronBlock) Source # 
Instance details

Generic (GenTx ByronBlock) Source # 
Instance details

Associated Types

type Rep (GenTx ByronBlock) :: Type -> Type #

NoThunks (GenTx ByronBlock) Source # 
Instance details

NoThunks (TxId (GenTx ByronBlock)) Source # 
Instance details

HasTxId (GenTx ByronBlock) Source # 
Instance details

Condense (GenTx ByronBlock) Source # 
Instance details

Condense (GenTxId ByronBlock) Source # 
Instance details

ShowProxy ApplyMempoolPayloadErr Source # 
Instance details