ouroboros-consensus-cardano-0.22.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Ledger.Query

Synopsis

Documentation

data family BlockQuery blk ∷ TypeType Source #

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

Instances

Instances details
SerialiseResult ByronBlock (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToClient ByronBlock (SomeSecond BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SameDepIndex (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

SameDepIndex (BlockQuery (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

sameDepIndexBlockQuery (ShelleyBlock proto era) a → BlockQuery (ShelleyBlock proto era) b → Maybe (a :~: b) Source #

ShowQuery (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showResultBlockQuery ByronBlock result → result → String Source #

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

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

Show (BlockQuery ByronBlock result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showsPrecIntBlockQuery ByronBlock result → ShowS #

showBlockQuery ByronBlock result → String #

showList ∷ [BlockQuery ByronBlock result] → ShowS #

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showsPrecIntBlockQuery (ShelleyBlock proto era) result → ShowS #

showBlockQuery (ShelleyBlock proto era) result → String #

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

Eq (BlockQuery ByronBlock result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

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

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

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

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

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

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

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

encodeResultCodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) result → result → Encoding Source #

decodeResultCodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) result → ∀ s. Decoder s result Source #

ShowProxy (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

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

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

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Inject (SomeSecond BlockQuery) 
Instance details

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

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ InjectionIndex xs x → SomeSecond BlockQuery x → SomeSecond BlockQuery (HardForkBlock xs) Source #

(∀ result. Show (BlockQuery blk result)) ⇒ Show (SomeSecond BlockQuery blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

SameDepIndex (BlockQuery blk) ⇒ Eq (SomeSecond BlockQuery blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

data BlockQuery ByronBlock a Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data BlockQuery (HardForkBlock xs) a 
Instance details

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

data BlockQuery (HardForkBlock xs) a where
data BlockQuery (ShelleyBlock proto era) a Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

data BlockQuery (ShelleyBlock proto era) a where

data StakeSnapshot Source #

The stake snapshot returns information about the mark, set, go ledger snapshots for a pool, plus the total active stake for each snapshot that can be used in a sigma calculation.

Each snapshot is taken at the end of a different era. The go snapshot is the current one and was taken two epochs earlier, set was taken one epoch ago, and mark was taken immediately before the start of the current epoch.

Constructors

StakeSnapshot 

Fields

Instances

Instances details
Generic StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Associated Types

type Rep StakeSnapshotTypeType #

Show StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

FromCBOR StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

ToCBOR StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

NFData StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

rnfStakeSnapshot → () #

Eq StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

type Rep StakeSnapshot Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

type Rep StakeSnapshot = D1 ('MetaData "StakeSnapshot" "Ouroboros.Consensus.Shelley.Ledger.Query" "ouroboros-consensus-cardano-0.22.0.0-inplace" 'False) (C1 ('MetaCons "StakeSnapshot" 'PrefixI 'True) (S1 ('MetaSel ('Just "ssMarkPool") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: (S1 ('MetaSel ('Just "ssSetPool") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "ssGoPool") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))

data StakeSnapshots Source #

Instances

Instances details
Generic StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Associated Types

type Rep StakeSnapshotsTypeType #

Show StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

FromCBOR StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

ToCBOR StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

NFData StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

rnfStakeSnapshots → () #

Eq StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

type Rep StakeSnapshots Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

type Rep StakeSnapshots = D1 ('MetaData "StakeSnapshots" "Ouroboros.Consensus.Shelley.Ledger.Query" "ouroboros-consensus-cardano-0.22.0.0-inplace" 'False) (C1 ('MetaCons "StakeSnapshots" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ssStakeSnapshots") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) StakeSnapshot)) :*: S1 ('MetaSel ('Just "ssMarkTotal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "ssSetTotal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "ssGoTotal") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))

Serialisation

decodeShelleyQuery ∷ ∀ era proto. ShelleyBasedEra era ⇒ ∀ s. Decoder s (SomeSecond BlockQuery (ShelleyBlock proto era)) Source #

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

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

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

Orphan instances

SameDepIndex (BlockQuery (ShelleyBlock proto era)) Source # 
Instance details

Methods

sameDepIndexBlockQuery (ShelleyBlock proto era) a → BlockQuery (ShelleyBlock proto era) b → Maybe (a :~: b) Source #

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

Methods

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

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

Methods

showsPrecIntBlockQuery (ShelleyBlock proto era) result → ShowS #

showBlockQuery (ShelleyBlock proto era) result → String #

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

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

Methods

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

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

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

Methods

answerBlockQueryExtLedgerCfg (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) result → ExtLedgerState (ShelleyBlock proto era) → result Source #

blockQueryIsSupportedOnVersionBlockQuery (ShelleyBlock proto era) result → BlockNodeToClientVersion (ShelleyBlock proto era) → Bool Source #

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

Methods

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