Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Ledger.Query
Contents
Synopsis
- data family BlockQuery blk :: Type -> Type
- newtype NonMyopicMemberRewards c = NonMyopicMemberRewards {
- unNonMyopicMemberRewards :: Map (Either Coin (Credential 'Staking c)) (Map (KeyHash 'StakePool c) Coin)
- data StakeSnapshot crypto = StakeSnapshot {
- ssMarkPool :: !Coin
- ssSetPool :: !Coin
- ssGoPool :: !Coin
- data StakeSnapshots crypto = StakeSnapshots {
- ssStakeSnapshots :: !(Map (KeyHash 'StakePool crypto) (StakeSnapshot crypto))
- ssMarkTotal :: !Coin
- ssSetTotal :: !Coin
- ssGoTotal :: !Coin
- querySupportedVersion :: BlockQuery (ShelleyBlock proto era) result -> ShelleyNodeToClientVersion -> Bool
- decodeShelleyQuery :: forall era proto. ShelleyBasedEra era => forall s. Decoder s (SomeSecond BlockQuery (ShelleyBlock proto era))
- decodeShelleyResult :: forall proto era result. ShelleyCompatible proto era => ShelleyNodeToClientVersion -> BlockQuery (ShelleyBlock proto era) result -> forall s. Decoder s result
- encodeShelleyQuery :: forall era proto result. ShelleyBasedEra era => BlockQuery (ShelleyBlock proto era) result -> Encoding
- encodeShelleyResult :: forall proto era result. ShelleyCompatible proto era => ShelleyNodeToClientVersion -> BlockQuery (ShelleyBlock proto era) result -> result -> Encoding
Documentation
data family BlockQuery blk :: Type -> Type #
Instances
SerialiseResult ByronBlock (BlockQuery ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods encodeResult :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> BlockQuery ByronBlock result -> result -> Encoding decodeResult :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> BlockQuery ByronBlock result -> forall s. Decoder s result | |
SerialiseNodeToClient ByronBlock (SomeSecond BlockQuery ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods encodeNodeToClient :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> SomeSecond BlockQuery ByronBlock -> Encoding decodeNodeToClient :: CodecConfig ByronBlock -> BlockNodeToClientVersion ByronBlock -> forall s. Decoder s (SomeSecond BlockQuery ByronBlock) | |
Inject (SomeSecond BlockQuery) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject :: forall x (xs :: [Type]). CanHardFork xs => Exactly xs Bound -> Index xs x -> SomeSecond BlockQuery x -> SomeSecond BlockQuery (HardForkBlock xs) | |
SameDepIndex (BlockQuery ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods sameDepIndex :: BlockQuery ByronBlock a -> BlockQuery ByronBlock b -> Maybe (a :~: b) | |
SameDepIndex (BlockQuery (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods sameDepIndex :: BlockQuery (ShelleyBlock proto era) a -> BlockQuery (ShelleyBlock proto era) b -> Maybe (a :~: b) | |
ShowQuery (BlockQuery ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showResult :: BlockQuery ByronBlock result -> result -> String | |
ShelleyCompatible proto era => ShowQuery (BlockQuery (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods showResult :: BlockQuery (ShelleyBlock proto era) result -> result -> String | |
Show (BlockQuery ByronBlock result) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showsPrec :: Int -> BlockQuery ByronBlock result -> ShowS Source # show :: BlockQuery ByronBlock result -> String Source # showList :: [BlockQuery ByronBlock result] -> ShowS Source # | |
Show (BlockQuery (ShelleyBlock proto era) result) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods showsPrec :: Int -> BlockQuery (ShelleyBlock proto era) result -> ShowS Source # show :: BlockQuery (ShelleyBlock proto era) result -> String Source # showList :: [BlockQuery (ShelleyBlock proto era) result] -> ShowS Source # | |
(forall result. Show (BlockQuery blk result)) => Show (SomeSecond BlockQuery blk) | |
Defined in Ouroboros.Consensus.Ledger.Query | |
Eq (BlockQuery ByronBlock result) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods (==) :: BlockQuery ByronBlock result -> BlockQuery ByronBlock result -> Bool Source # (/=) :: BlockQuery ByronBlock result -> BlockQuery ByronBlock result -> Bool Source # | |
Eq (BlockQuery (ShelleyBlock proto era) result) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods (==) :: BlockQuery (ShelleyBlock proto era) result -> BlockQuery (ShelleyBlock proto era) result -> Bool Source # (/=) :: BlockQuery (ShelleyBlock proto era) result -> BlockQuery (ShelleyBlock proto era) result -> Bool Source # | |
SameDepIndex (BlockQuery blk) => Eq (SomeSecond BlockQuery blk) | |
Defined in Ouroboros.Consensus.Ledger.Query Methods (==) :: SomeSecond BlockQuery blk -> SomeSecond BlockQuery blk -> Bool Source # (/=) :: SomeSecond BlockQuery blk -> SomeSecond BlockQuery blk -> Bool Source # | |
ShelleyCompatible proto era => SerialiseResult (ShelleyBlock proto era) (BlockQuery (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeResult :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToClientVersion (ShelleyBlock proto era) -> BlockQuery (ShelleyBlock proto era) result -> result -> Encoding decodeResult :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToClientVersion (ShelleyBlock proto era) -> BlockQuery (ShelleyBlock proto era) result -> forall s. Decoder s result | |
ShowProxy (BlockQuery ByronBlock) | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showProxy :: Proxy (BlockQuery ByronBlock) -> String | |
(Typeable era, Typeable proto) => ShowProxy (BlockQuery (ShelleyBlock proto era) :: Type -> Type) | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods showProxy :: Proxy (BlockQuery (ShelleyBlock proto era)) -> String | |
ShelleyCompatible proto era => SerialiseNodeToClient (ShelleyBlock proto era) (SomeSecond BlockQuery (ShelleyBlock proto era)) | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToClientVersion (ShelleyBlock proto era) -> SomeSecond BlockQuery (ShelleyBlock proto era) -> Encoding decodeNodeToClient :: CodecConfig (ShelleyBlock proto era) -> BlockNodeToClientVersion (ShelleyBlock proto era) -> forall s. Decoder s (SomeSecond BlockQuery (ShelleyBlock proto era)) | |
data BlockQuery ByronBlock a Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |
data BlockQuery (HardForkBlock xs) a | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query data BlockQuery (HardForkBlock xs) a where
| |
data BlockQuery (ShelleyBlock proto era) a Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query data BlockQuery (ShelleyBlock proto era) a where
|
newtype NonMyopicMemberRewards c Source #
Constructors
NonMyopicMemberRewards | |
Fields
|
Instances
Show (NonMyopicMemberRewards c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query | |
Crypto c => FromCBOR (NonMyopicMemberRewards c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods fromCBOR :: Decoder s (NonMyopicMemberRewards c) label :: Proxy (NonMyopicMemberRewards c) -> Text | |
Crypto c => ToCBOR (NonMyopicMemberRewards c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods toCBOR :: NonMyopicMemberRewards c -> Encoding encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (NonMyopicMemberRewards c) -> Size encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [NonMyopicMemberRewards c] -> Size | |
Eq (NonMyopicMemberRewards c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods (==) :: NonMyopicMemberRewards c -> NonMyopicMemberRewards c -> Bool Source # (/=) :: NonMyopicMemberRewards c -> NonMyopicMemberRewards c -> Bool Source # |
data StakeSnapshot crypto 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
data StakeSnapshots crypto Source #
Constructors
StakeSnapshots | |
Fields
|
Instances
querySupportedVersion :: BlockQuery (ShelleyBlock proto era) result -> ShelleyNodeToClientVersion -> Bool Source #
Is the given query supported by the given ShelleyNodeToClientVersion
?
Serialisation
decodeShelleyQuery :: forall era proto. ShelleyBasedEra era => forall s. Decoder s (SomeSecond BlockQuery (ShelleyBlock proto era)) Source #
decodeShelleyResult :: forall proto era result. ShelleyCompatible proto era => ShelleyNodeToClientVersion -> BlockQuery (ShelleyBlock proto era) result -> forall s. Decoder s result Source #
encodeShelleyQuery :: forall era proto result. ShelleyBasedEra era => BlockQuery (ShelleyBlock proto era) result -> Encoding Source #
encodeShelleyResult :: forall proto era result. ShelleyCompatible proto era => ShelleyNodeToClientVersion -> BlockQuery (ShelleyBlock proto era) result -> result -> Encoding Source #
Orphan instances
SameDepIndex (BlockQuery (ShelleyBlock proto era)) Source # | |
Methods sameDepIndex :: BlockQuery (ShelleyBlock proto era) a -> BlockQuery (ShelleyBlock proto era) b -> Maybe (a :~: b) | |
ShelleyCompatible proto era => ShowQuery (BlockQuery (ShelleyBlock proto era)) Source # | |
Methods showResult :: BlockQuery (ShelleyBlock proto era) result -> result -> String | |
Show (BlockQuery (ShelleyBlock proto era) result) Source # | |
Methods showsPrec :: Int -> BlockQuery (ShelleyBlock proto era) result -> ShowS Source # show :: BlockQuery (ShelleyBlock proto era) result -> String Source # showList :: [BlockQuery (ShelleyBlock proto era) result] -> ShowS Source # | |
Eq (BlockQuery (ShelleyBlock proto era) result) Source # | |
Methods (==) :: BlockQuery (ShelleyBlock proto era) result -> BlockQuery (ShelleyBlock proto era) result -> Bool Source # (/=) :: BlockQuery (ShelleyBlock proto era) result -> BlockQuery (ShelleyBlock proto era) result -> Bool Source # | |
(ShelleyCompatible proto era, ProtoCrypto proto ~ crypto) => QueryLedger (ShelleyBlock proto era) Source # | |
Methods answerBlockQuery :: ExtLedgerCfg (ShelleyBlock proto era) -> BlockQuery (ShelleyBlock proto era) result -> ExtLedgerState (ShelleyBlock proto era) -> result | |
(Typeable era, Typeable proto) => ShowProxy (BlockQuery (ShelleyBlock proto era) :: Type -> Type) Source # | |
Methods showProxy :: Proxy (BlockQuery (ShelleyBlock proto era)) -> String |