ouroboros-consensus-1.0.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Ledger.Query

Synopsis

Documentation

data family BlockQueryTypeQueryFootprintTypeType Source #

Different queries supported by the ledger, indexed by the result type.

Instances

Instances details
SerialiseBlockQueryResult ByronBlock BlockQuery Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

All SingleEraBlock xs ⇒ SameDepIndex2 (BlockQuery (HardForkBlock xs) ∷ QueryFootprintTypeType) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (HardForkBlock xs) x a → BlockQuery (HardForkBlock xs) y b → Maybe ('(x, a) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery (DualBlock m a) ∷ QueryFootprintTypeType) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a0 (y ∷ QueryFootprint) b. BlockQuery (DualBlock m a) x a0 → BlockQuery (DualBlock m a) y b → Maybe ('(x, a0) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery ByronBlock x a → BlockQuery ByronBlock y b → Maybe ('(x, a) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprintTypeType) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (ShelleyBlock proto era) x a → BlockQuery (ShelleyBlock proto era) y b → Maybe ('(x, a) :~: '(y, b)) Source #

SerialiseNodeToClient ByronBlock (SomeBlockQuery (BlockQuery ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseHFC xs ⇒ SerialiseBlockQueryResult (HardForkBlock xs) BlockQuery 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient

ShelleyCompatible proto era ⇒ SerialiseBlockQueryResult (ShelleyBlock proto era) BlockQuery Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

encodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) fp result → result → Encoding Source #

decodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) fp result → ∀ s. Decoder s result Source #

(∀ (footprint ∷ QueryFootprint) result. Show (BlockQuery blk footprint result)) ⇒ Show (SomeBlockQuery (BlockQuery blk)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

SerialiseHFC xs ⇒ SerialiseNodeToClient (HardForkBlock xs) (SomeBlockQuery (BlockQuery (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient

All SingleEraBlock xs ⇒ ShowQuery (BlockQuery (HardForkBlock xs) footprint) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showResultBlockQuery (HardForkBlock xs) footprint result → result → String Source #

ShowQuery (BlockQuery (DualBlock m a) footprint) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showResultBlockQuery (DualBlock m a) footprint result → result → String Source #

ShowQuery (BlockQuery ByronBlock fp) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showResultBlockQuery ByronBlock fp result → result → String Source #

ShelleyCompatible proto era ⇒ ShowQuery (BlockQuery (ShelleyBlock proto era) fp) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showResultBlockQuery (ShelleyBlock proto era) fp result → result → String Source #

(ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), ConfigSupportsNode (ShelleyBlock proto era)) ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Typeable xs ⇒ ShowProxy (BlockQuery (HardForkBlock xs) ∷ QueryFootprintTypeType) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

(Typeable m, Typeable a) ⇒ ShowProxy (BlockQuery (DualBlock m a) ∷ QueryFootprintTypeType) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ShowProxy (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(Typeable era, Typeable proto) ⇒ ShowProxy (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprintTypeType) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showProxyProxy (BlockQuery (ShelleyBlock proto era)) → String Source #

All SingleEraBlock xs ⇒ Show (BlockQuery (HardForkBlock xs) footprint result) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showsPrecIntBlockQuery (HardForkBlock xs) footprint result → ShowS #

showBlockQuery (HardForkBlock xs) footprint result → String #

showList ∷ [BlockQuery (HardForkBlock xs) footprint result] → ShowS #

Show (BlockQuery (DualBlock m a) footprint result) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrecIntBlockQuery (DualBlock m a) footprint result → ShowS #

showBlockQuery (DualBlock m a) footprint result → String #

showList ∷ [BlockQuery (DualBlock m a) footprint result] → ShowS #

Show (BlockQuery ByronBlock fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showsPrecIntBlockQuery ByronBlock fp result → ShowS #

showBlockQuery ByronBlock fp result → String #

showList ∷ [BlockQuery ByronBlock fp result] → ShowS #

Show (BlockQuery (ShelleyBlock proto era) fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showsPrecIntBlockQuery (ShelleyBlock proto era) fp result → ShowS #

showBlockQuery (ShelleyBlock proto era) fp result → String #

showList ∷ [BlockQuery (ShelleyBlock proto era) fp result] → ShowS #

Eq (BlockQuery ByronBlock fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

(==)BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool #

(/=)BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool #

Eq (BlockQuery (ShelleyBlock proto era) fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

(==)BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool #

(/=)BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool #

Inject (SomeBlockQuery :.: BlockQuery) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

data BlockQuery ByronBlock fp result Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data BlockQuery (HardForkBlock xs) footprint result 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data BlockQuery (HardForkBlock xs) footprint result where
data BlockQuery (DualBlock m a) footprint result 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data BlockQuery (DualBlock m a) footprint result
data BlockQuery (ShelleyBlock proto era) fp result Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

data BlockQuery (ShelleyBlock proto era) fp result where

Serialisation

decodeShelleyResult ∷ ∀ proto era (fp ∷ QueryFootprint) result. ShelleyCompatible proto era ⇒ ShelleyNodeToClientVersionBlockQuery (ShelleyBlock proto era) fp result → ∀ s. Decoder s result Source #

encodeShelleyQuery ∷ ∀ era proto (fp ∷ QueryFootprint) result. ShelleyBasedEra era ⇒ BlockQuery (ShelleyBlock proto era) fp result → Encoding Source #

encodeShelleyResult ∷ ∀ proto era (fp ∷ QueryFootprint) result. ShelleyCompatible proto era ⇒ ShelleyNodeToClientVersionBlockQuery (ShelleyBlock proto era) fp result → result → Encoding Source #

BlockSupportsHFLedgerQuery instances

answerShelleyLookupQueries Source #

Arguments

∷ ∀ proto era m result blk. (Monad m, ShelleyCompatible proto era) 
⇒ (LedgerTables (LedgerState (ShelleyBlock proto era)) KeysMKLedgerTables (LedgerState blk) KeysMK)

Inject ledger tables

→ (TxOut (LedgerState blk) → TxOut era)

Eject TxOut

→ (TxIn (LedgerState blk) → TxIn)

Eject TxIn

ExtLedgerCfg (ShelleyBlock proto era) 
BlockQuery (ShelleyBlock proto era) 'QFLookupTables result 
ReadOnlyForker' m blk 
→ m result 

answerShelleyTraversingQueries Source #

Arguments

∷ ∀ proto era m result blk. (ShelleyCompatible proto era, Ord (TxIn (LedgerState blk)), Eq (TxOut (LedgerState blk)), MemPack (TxIn (LedgerState blk)), IndexedMemPack (LedgerState blk EmptyMK) (TxOut (LedgerState blk)), Monad m) 
⇒ (TxOut (LedgerState blk) → TxOut era)

Eject TxOut

→ (TxIn (LedgerState blk) → TxIn)

Eject TxIn

→ (∀ result'. BlockQuery (ShelleyBlock proto era) 'QFTraverseTables result' → TxOut (LedgerState blk) → Bool)

Get filter by query

ExtLedgerCfg (ShelleyBlock proto era) 
BlockQuery (ShelleyBlock proto era) 'QFTraverseTables result 
ReadOnlyForker' m blk 
→ m result 

shelleyQFTraverseTablesPredicate ∷ ∀ proto era proto' era' result. (ShelleyBasedEra era, ShelleyBasedEra era') ⇒ BlockQuery (ShelleyBlock proto era) 'QFTraverseTables result → TxOut (LedgerState (ShelleyBlock proto' era')) → Bool Source #

Orphan instances

SameDepIndex2 (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprintTypeType) Source # 
Instance details

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (ShelleyBlock proto era) x a → BlockQuery (ShelleyBlock proto era) y b → Maybe ('(x, a) :~: '(y, b)) Source #

(ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), ConfigSupportsNode (ShelleyBlock proto era), ProtoCrypto proto ~ crypto, Crypto crypto) ⇒ BlockSupportsLedgerQuery (ShelleyBlock proto era) Source # 
Instance details

Methods

answerPureBlockQueryExtLedgerCfg (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) 'QFNoTables result → ExtLedgerState (ShelleyBlock proto era) EmptyMK → result Source #

answerBlockQueryLookupMonadSTM m ⇒ ExtLedgerCfg (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) 'QFLookupTables result → ReadOnlyForker' m (ShelleyBlock proto era) → m result Source #

answerBlockQueryTraverseMonadSTM m ⇒ ExtLedgerCfg (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) 'QFTraverseTables result → ReadOnlyForker' m (ShelleyBlock proto era) → m result Source #

blockQueryIsSupportedOnVersion ∷ ∀ (fp ∷ QueryFootprint) result. BlockQuery (ShelleyBlock proto era) fp result → BlockNodeToClientVersion (ShelleyBlock proto era) → Bool Source #

ShelleyCompatible proto era ⇒ ShowQuery (BlockQuery (ShelleyBlock proto era) fp) Source # 
Instance details

Methods

showResultBlockQuery (ShelleyBlock proto era) fp result → result → String Source #

(Typeable era, Typeable proto) ⇒ ShowProxy (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprintTypeType) Source # 
Instance details

Methods

showProxyProxy (BlockQuery (ShelleyBlock proto era)) → String Source #

Show (BlockQuery (ShelleyBlock proto era) fp result) Source # 
Instance details

Methods

showsPrecIntBlockQuery (ShelleyBlock proto era) fp result → ShowS #

showBlockQuery (ShelleyBlock proto era) fp result → String #

showList ∷ [BlockQuery (ShelleyBlock proto era) fp result] → ShowS #

Eq (BlockQuery (ShelleyBlock proto era) fp result) Source # 
Instance details

Methods

(==)BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool #

(/=)BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool #