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

Ouroboros.Consensus.Ledger.Query

Synopsis

Documentation

data family Query blk :: Type -> Type Source #

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

Instances

Instances details
ShowQuery (Query (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showResult :: Query (DualBlock m a) result -> result -> String #

All SingleEraBlock xs => ShowQuery (Query (HardForkBlock xs)) Source # 
Instance details

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

Methods

showResult :: Query (HardForkBlock xs) result -> result -> String #

SameDepIndex (Query (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

sameDepIndex :: Query (DualBlock m a) a0 -> Query (DualBlock m a) b -> Maybe (a0 :~: b) Source #

All SingleEraBlock xs => SameDepIndex (Query (HardForkBlock xs)) Source # 
Instance details

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

Methods

sameDepIndex :: Query (HardForkBlock xs) a -> Query (HardForkBlock xs) b -> Maybe (a :~: b) Source #

SerialiseHFC xs => SerialiseResult (HardForkBlock xs) (Query (HardForkBlock xs)) Source # 
Instance details

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

SerialiseHFC xs => SerialiseNodeToClient (HardForkBlock xs) (SomeSecond Query (HardForkBlock xs)) Source # 
Instance details

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

SameDepIndex (Query blk) => Eq (SomeSecond Query blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

Methods

(==) :: SomeSecond Query blk -> SomeSecond Query blk -> Bool #

(/=) :: SomeSecond Query blk -> SomeSecond Query blk -> Bool #

(forall result. Show (Query blk result)) => Show (SomeSecond Query blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

Show (Query (DualBlock m a) result) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec :: Int -> Query (DualBlock m a) result -> ShowS #

show :: Query (DualBlock m a) result -> String #

showList :: [Query (DualBlock m a) result] -> ShowS #

All SingleEraBlock xs => Show (Query (HardForkBlock xs) result) Source # 
Instance details

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

Methods

showsPrec :: Int -> Query (HardForkBlock xs) result -> ShowS #

show :: Query (HardForkBlock xs) result -> String #

showList :: [Query (HardForkBlock xs) result] -> ShowS #

(Typeable m, Typeable a) => ShowProxy (Query (DualBlock m a) :: Type -> Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Typeable xs => ShowProxy (Query (HardForkBlock xs) :: Type -> Type) Source # 
Instance details

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

data Query (HardForkBlock xs) a Source # 
Instance details

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

data Query (HardForkBlock xs) a where
data Query (DualBlock m a) result Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Query (DualBlock m a) result

class (ShowQuery (Query blk), SameDepIndex (Query blk)) => QueryLedger blk where Source #

Query the ledger extended state.

Used by the LocalStateQuery protocol to allow clients to query the extended ledger state.

Methods

answerQuery :: ExtLedgerCfg blk -> Query blk result -> ExtLedgerState blk -> result Source #

Answer the given query about the extended ledger state.

Instances

Instances details
All SingleEraBlock xs => QueryLedger (HardForkBlock xs) Source # 
Instance details

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

Bridge m a => QueryLedger (DualBlock m a) Source #

Not used in the tests: no constructors

Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

answerQuery :: ExtLedgerCfg (DualBlock m a) -> Query (DualBlock m a) result -> ExtLedgerState (DualBlock m a) -> result Source #

class (forall result. Show (query result)) => ShowQuery (query :: Type -> Type) where #

Methods

showResult :: query result -> result -> String #

Instances

Instances details
ShowQuery QueryAnytime Source # 
Instance details

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

Methods

showResult :: QueryAnytime result -> result -> String #

ShowQuery (Query (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showResult :: Query (DualBlock m a) result -> result -> String #

All SingleEraBlock xs => ShowQuery (Query (HardForkBlock xs)) Source # 
Instance details

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

Methods

showResult :: Query (HardForkBlock xs) result -> result -> String #

All SingleEraBlock xs => ShowQuery (QueryHardFork xs) Source # 
Instance details

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

Methods

showResult :: QueryHardFork xs result -> result -> String #

All SingleEraBlock xs => ShowQuery (QueryIfCurrent xs) Source # 
Instance details

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

Methods

showResult :: QueryIfCurrent xs result -> result -> String #