Safe Haskell | None |
---|---|
Language | Haskell2010 |
Node IPC protocols
Synopsis
- connectToLocalNode :: MonadIO m => LocalNodeConnectInfo -> LocalNodeClientProtocolsInMode -> m ()
- connectToLocalNodeWithVersion :: MonadIO m => LocalNodeConnectInfo -> (NodeToClientVersion -> LocalNodeClientProtocolsInMode) -> m ()
- data LocalNodeConnectInfo = LocalNodeConnectInfo {}
- data LocalNodeClientParams where
- LocalNodeClientParamsSingleBlock :: forall block. (ProtocolClient block, LedgerSupportsProtocol (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto))) => ProtocolClientInfoArgs block -> (NodeToClientVersion -> LocalNodeClientProtocolsForBlock block) -> LocalNodeClientParams
- LocalNodeClientParamsCardano :: forall block. (ProtocolClient block, CardanoHardForkConstraints (ConsensusCryptoForBlock block)) => ProtocolClientInfoArgs block -> (NodeToClientVersion -> LocalNodeClientProtocolsForBlock block) -> LocalNodeClientParams
- mkLocalNodeClientParams :: ConsensusModeParams -> (NodeToClientVersion -> LocalNodeClientProtocolsInMode) -> LocalNodeClientParams
- data LocalNodeClientProtocols block point tip slot tx txid txerr (query :: Type -> Type) (m :: Type -> Type) = LocalNodeClientProtocols {
- localChainSyncClient :: LocalChainSyncClient block point tip m
- localTxSubmissionClient :: Maybe (LocalTxSubmissionClient tx txerr m ())
- localStateQueryClient :: Maybe (LocalStateQueryClient block point query m ())
- localTxMonitoringClient :: Maybe (LocalTxMonitorClient txid tx slot m ())
- data LocalChainSyncClient block point tip (m :: Type -> Type)
- = NoLocalChainSyncClient
- | LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ())
- | LocalChainSyncClient (ChainSyncClient block point tip m ())
- type LocalNodeClientProtocolsInMode = LocalNodeClientProtocols BlockInMode ChainPoint ChainTip SlotNo TxInMode TxIdInMode TxValidationErrorInCardanoMode QueryInMode IO
- data ConsensusModeParams where
- newtype EpochSlots = EpochSlots {}
- newtype ChainSyncClient header point tip (m :: Type -> Type) a = ChainSyncClient {
- runChainSyncClient :: m (ClientStIdle header point tip m a)
- newtype ChainSyncClientPipelined header point tip (m :: Type -> Type) a = ChainSyncClientPipelined {
- runChainSyncClientPipelined :: m (ClientPipelinedStIdle 'Z header point tip m a)
- data BlockInMode where
- BlockInMode :: forall era. CardanoEra era -> Block era -> BlockInMode
- newtype LocalTxSubmissionClient tx reject (m :: Type -> Type) a = LocalTxSubmissionClient {
- runLocalTxSubmissionClient :: m (LocalTxClientStIdle tx reject m a)
- data TxInMode where
- TxInMode :: forall era. ShelleyBasedEra era -> Tx era -> TxInMode
- TxInByronSpecial :: GenTx ByronBlock -> TxInMode
- data TxValidationErrorInCardanoMode
- data TxValidationError era
- submitTxToNodeLocal :: MonadIO m => LocalNodeConnectInfo -> TxInMode -> m (SubmitResult TxValidationErrorInCardanoMode)
- data SubmitResult reason
- = SubmitSuccess
- | SubmitFail reason
- newtype LocalStateQueryClient block point (query :: Type -> Type) (m :: Type -> Type) a = LocalStateQueryClient {
- runLocalStateQueryClient :: m (ClientStIdle block point query m a)
- data AcquiringFailure
- data QueryInMode result where
- QueryCurrentEra :: QueryInMode AnyCardanoEra
- QueryInEra :: forall era result1. QueryInEra era result1 -> QueryInMode (Either EraMismatch result1)
- QueryEraHistory :: QueryInMode EraHistory
- QuerySystemStart :: QueryInMode SystemStart
- QueryChainBlockNo :: QueryInMode (WithOrigin BlockNo)
- QueryChainPoint :: QueryInMode ChainPoint
- data QueryInEra era result where
- QueryByronUpdateState :: QueryInEra ByronEra ByronUpdateState
- QueryInShelleyBasedEra :: forall era result. ShelleyBasedEra era -> QueryInShelleyBasedEra era result -> QueryInEra era result
- data QueryInShelleyBasedEra era result where
- QueryEpoch :: forall era. QueryInShelleyBasedEra era EpochNo
- QueryGenesisParameters :: forall era. QueryInShelleyBasedEra era (GenesisParameters ShelleyEra)
- QueryProtocolParameters :: forall era. QueryInShelleyBasedEra era (PParams (ShelleyLedgerEra era))
- QueryProtocolParametersUpdate :: forall era. QueryInShelleyBasedEra era (Map (Hash GenesisKey) ProtocolParametersUpdate)
- QueryStakeDistribution :: forall era. QueryInShelleyBasedEra era (Map (Hash StakePoolKey) Rational)
- QueryUTxO :: forall era. QueryUTxOFilter -> QueryInShelleyBasedEra era (UTxO era)
- QueryStakeAddresses :: forall era. Set StakeCredential -> NetworkId -> QueryInShelleyBasedEra era (Map StakeAddress Coin, Map StakeAddress PoolId)
- QueryStakePools :: forall era. QueryInShelleyBasedEra era (Set PoolId)
- QueryStakePoolParameters :: forall era. Set PoolId -> QueryInShelleyBasedEra era (Map PoolId StakePoolParameters)
- QueryDebugLedgerState :: forall era. QueryInShelleyBasedEra era (SerialisedDebugLedgerState era)
- QueryProtocolState :: forall era. QueryInShelleyBasedEra era (ProtocolState era)
- QueryCurrentEpochState :: forall era. QueryInShelleyBasedEra era (SerialisedCurrentEpochState era)
- QueryPoolState :: forall era. Maybe (Set PoolId) -> QueryInShelleyBasedEra era (SerialisedPoolState era)
- QueryPoolDistribution :: forall era. Maybe (Set PoolId) -> QueryInShelleyBasedEra era (SerialisedPoolDistribution era)
- QueryStakeSnapshot :: forall era. Maybe (Set PoolId) -> QueryInShelleyBasedEra era (SerialisedStakeSnapshots era)
- QueryStakeDelegDeposits :: forall era. Set StakeCredential -> QueryInShelleyBasedEra era (Map StakeCredential Coin)
- QueryAccountState :: forall era. QueryInShelleyBasedEra era AccountState
- QueryConstitution :: forall era. QueryInShelleyBasedEra era (Constitution (ShelleyLedgerEra era))
- QueryGovState :: forall era. QueryInShelleyBasedEra era (GovState (ShelleyLedgerEra era))
- QueryDRepState :: forall era. Set (Credential 'DRepRole StandardCrypto) -> QueryInShelleyBasedEra era (Map (Credential 'DRepRole StandardCrypto) (DRepState StandardCrypto))
- QueryDRepStakeDistr :: forall era. Set (DRep StandardCrypto) -> QueryInShelleyBasedEra era (Map (DRep StandardCrypto) Coin)
- QuerySPOStakeDistr :: forall era. Set (KeyHash 'StakePool StandardCrypto) -> QueryInShelleyBasedEra era (Map (KeyHash 'StakePool StandardCrypto) Coin)
- QueryCommitteeMembersState :: forall era. Set (Credential 'ColdCommitteeRole StandardCrypto) -> Set (Credential 'HotCommitteeRole StandardCrypto) -> Set MemberStatus -> QueryInShelleyBasedEra era (CommitteeMembersState StandardCrypto)
- QueryStakeVoteDelegatees :: forall era. Set StakeCredential -> QueryInShelleyBasedEra era (Map StakeCredential (DRep StandardCrypto))
- queryNodeLocalState :: LocalNodeConnectInfo -> Target ChainPoint -> QueryInMode result -> ExceptT AcquiringFailure IO result
- newtype LocalTxMonitorClient txid tx slot (m :: Type -> Type) a = LocalTxMonitorClient {
- runLocalTxMonitorClient :: m (ClientStIdle txid tx slot m a)
- data LocalTxMonitoringQuery
- data LocalTxMonitoringResult
- data MempoolSizeAndCapacity = MempoolSizeAndCapacity {
- capacityInBytes :: !Word32
- sizeInBytes :: !Word32
- numberOfTxs :: !Word32
- queryTxMonitoringLocal :: MonadIO m => LocalNodeConnectInfo -> LocalTxMonitoringQuery -> m LocalTxMonitoringResult
- data EraHistory where
- EraHistory :: forall (xs :: [Type]). CardanoBlock StandardCrypto ~ HardForkBlock xs => Interpreter xs -> EraHistory
- getProgress :: SlotNo -> EraHistory -> Either PastHorizonException (RelativeTime, SlotLength)
- getLocalChainTip :: MonadIO m => LocalNodeConnectInfo -> m ChainTip
- toAcquiringFailure :: AcquireFailure -> AcquiringFailure
- data NodeToClientVersion
- data UnsupportedNtcVersionError = UnsupportedNtcVersionError !MinNodeToClientVersion !NodeToClientVersion
Node interaction
Operations that involve talking to a local Cardano node.
connectToLocalNode :: MonadIO m => LocalNodeConnectInfo -> LocalNodeClientProtocolsInMode -> m () Source #
Establish a connection to a local node and execute the given set of protocol handlers.
connectToLocalNodeWithVersion :: MonadIO m => LocalNodeConnectInfo -> (NodeToClientVersion -> LocalNodeClientProtocolsInMode) -> m () Source #
Establish a connection to a local node and execute the given set of protocol handlers parameterized on the negotiated node-to-client protocol version.
data LocalNodeConnectInfo Source #
data LocalNodeClientParams where Source #
This type defines the boundary between the mode-parametrised style used in this API and the block-parametrised style used by the underlying network and consensus libraries.
This interface itself is in the block-parametrised style, with the block type itself being an hidden/existential type.
It bundles together all the necessary class instances, the consensus protocol client identifier, and the set of client side mini-protocol handlers for the node-to-client protocol.
LocalNodeClientParamsSingleBlock :: forall block. (ProtocolClient block, LedgerSupportsProtocol (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto))) => ProtocolClientInfoArgs block -> (NodeToClientVersion -> LocalNodeClientProtocolsForBlock block) -> LocalNodeClientParams | |
LocalNodeClientParamsCardano :: forall block. (ProtocolClient block, CardanoHardForkConstraints (ConsensusCryptoForBlock block)) => ProtocolClientInfoArgs block -> (NodeToClientVersion -> LocalNodeClientProtocolsForBlock block) -> LocalNodeClientParams |
mkLocalNodeClientParams :: ConsensusModeParams -> (NodeToClientVersion -> LocalNodeClientProtocolsInMode) -> LocalNodeClientParams Source #
Convert from the mode-parametrised style to the block-parametrised style.
data LocalNodeClientProtocols block point tip slot tx txid txerr (query :: Type -> Type) (m :: Type -> Type) Source #
The protocols we can use with a local node. Use in conjunction with
connectToLocalNode
.
These protocols use the types from the rest of this API. The conversion
to/from the types used by the underlying wire formats is handled by
connectToLocalNode
.
LocalNodeClientProtocols | |
|
data LocalChainSyncClient block point tip (m :: Type -> Type) Source #
NoLocalChainSyncClient | |
LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ()) | |
LocalChainSyncClient (ChainSyncClient block point tip m ()) |
type LocalNodeClientProtocolsInMode = LocalNodeClientProtocols BlockInMode ChainPoint ChainTip SlotNo TxInMode TxIdInMode TxValidationErrorInCardanoMode QueryInMode IO Source #
Modes
TODO move to Cardano.Api
data ConsensusModeParams where Source #
The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.
It is in fact only the Byron era that requires extra parameters, but this is
of course inherited by the CardanoMode
that uses the Byron era. The reason
this parameter is needed stems from unfortunate design decisions from the
legacy Byron era. The slots per epoch are needed to be able to decode
epoch boundary blocks from the Byron era.
It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.
Instances
Show ConsensusModeParams Source # | |
Defined in Cardano.Api.Modes |
newtype EpochSlots Source #
The number of slots per epoch.
Instances
Chain sync protocol
newtype ChainSyncClient header point tip (m :: Type -> Type) a Source #
A chain sync protocol client, on top of some effect m
.
The first choice of request is within that m
.
ChainSyncClient | |
|
newtype ChainSyncClientPipelined header point tip (m :: Type -> Type) a Source #
Pipelined chain sync client. It can only pipeline MsgRequestNext
messages, while the MsgFindIntersect
are non pipelined. This has a penalty
cost of an RTT, but they are sent relatively seldom and their response might
impact how many messages one would like to pipeline. It also simplifies the
receiver callback.
ChainSyncClientPipelined | |
|
data BlockInMode where Source #
A Block
in one of the eras.
TODO Rename this to BlockInEra
BlockInMode :: forall era. CardanoEra era -> Block era -> BlockInMode |
Instances
Show BlockInMode Source # | |
Defined in Cardano.Api.Block |
Local tx submission
newtype LocalTxSubmissionClient tx reject (m :: Type -> Type) a Source #
LocalTxSubmissionClient | |
|
A Tx
in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode
this type is a sum of the
different transaction types for all the eras. It is used in the
LocalTxSubmission protocol.
TxInMode :: forall era. ShelleyBasedEra era -> Tx era -> TxInMode | Shelley based transactions. |
TxInByronSpecial :: GenTx ByronBlock -> TxInMode | Legacy Byron transactions and things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs. |
data TxValidationErrorInCardanoMode Source #
A TxValidationError
in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
Instances
ToJSON TxValidationErrorInCardanoMode Source # | |
Defined in Cardano.Api.InMode toJSON :: TxValidationErrorInCardanoMode -> Value # toEncoding :: TxValidationErrorInCardanoMode -> Encoding # toJSONList :: [TxValidationErrorInCardanoMode] -> Value # toEncodingList :: [TxValidationErrorInCardanoMode] -> Encoding # | |
Show TxValidationErrorInCardanoMode Source # | |
Defined in Cardano.Api.InMode |
data TxValidationError era Source #
The transaction validations errors that can occur from trying to submit a transaction to a local node. The errors are specific to an era.
Instances
ToJSON (TxValidationError era) Source # | |||||
Defined in Cardano.Api.InMode toJSON :: TxValidationError era -> Value # toEncoding :: TxValidationError era -> Encoding # toJSONList :: [TxValidationError era] -> Value # toEncodingList :: [TxValidationError era] -> Encoding # omitField :: TxValidationError era -> Bool # | |||||
Generic (TxValidationError era) Source # | |||||
Defined in Cardano.Api.InMode
from :: TxValidationError era -> Rep (TxValidationError era) x Source # to :: Rep (TxValidationError era) x -> TxValidationError era Source # | |||||
Show (TxValidationError era) Source # | |||||
Defined in Cardano.Api.InMode | |||||
type Rep (TxValidationError era) Source # | |||||
Defined in Cardano.Api.InMode type Rep (TxValidationError era) = D1 ('MetaData "TxValidationError" "Cardano.Api.InMode" "cardano-api-10.3.0.0-inplace-internal" 'False) (C1 ('MetaCons "ByronTxValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ApplyTxErr ByronBlock))) :+: C1 ('MetaCons "ShelleyTxValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ShelleyBasedEra era)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)))))) |
submitTxToNodeLocal :: MonadIO m => LocalNodeConnectInfo -> TxInMode -> m (SubmitResult TxValidationErrorInCardanoMode) Source #
data SubmitResult reason Source #
Isomorphic with Maybe but with a name that better describes its purpose and usage.
SubmitSuccess | |
SubmitFail reason |
Instances
Functor SubmitResult | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type fmap :: (a -> b) -> SubmitResult a -> SubmitResult b Source # (<$) :: a -> SubmitResult b -> SubmitResult a Source # | |
Eq reason => Eq (SubmitResult reason) | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type (==) :: SubmitResult reason -> SubmitResult reason -> Bool Source # (/=) :: SubmitResult reason -> SubmitResult reason -> Bool Source # |
Local state query
newtype LocalStateQueryClient block point (query :: Type -> Type) (m :: Type -> Type) a Source #
LocalStateQueryClient | |
|
data AcquiringFailure Source #
Establish a connection to a node and execute a single query using the local state query protocol.
Instances
Show AcquiringFailure Source # | |
Defined in Cardano.Api.IPC | |
Eq AcquiringFailure Source # | |
Defined in Cardano.Api.IPC (==) :: AcquiringFailure -> AcquiringFailure -> Bool Source # (/=) :: AcquiringFailure -> AcquiringFailure -> Bool Source # |
data QueryInMode result where Source #
QueryCurrentEra :: QueryInMode AnyCardanoEra | |
QueryInEra :: forall era result1. QueryInEra era result1 -> QueryInMode (Either EraMismatch result1) | |
QueryEraHistory :: QueryInMode EraHistory | |
QuerySystemStart :: QueryInMode SystemStart | |
QueryChainBlockNo :: QueryInMode (WithOrigin BlockNo) | |
QueryChainPoint :: QueryInMode ChainPoint |
Instances
Show (QueryInMode result) Source # | |
Defined in Cardano.Api.Query | |
NodeToClientVersionOf (QueryInMode result) Source # | |
Defined in Cardano.Api.Query nodeToClientVersionOf :: QueryInMode result -> NodeToClientVersion Source # |
data QueryInEra era result where Source #
QueryByronUpdateState :: QueryInEra ByronEra ByronUpdateState | |
QueryInShelleyBasedEra :: forall era result. ShelleyBasedEra era -> QueryInShelleyBasedEra era result -> QueryInEra era result |
Instances
Show (QueryInEra era result) Source # | |
Defined in Cardano.Api.Query | |
NodeToClientVersionOf (QueryInEra era result) Source # | |
Defined in Cardano.Api.Query nodeToClientVersionOf :: QueryInEra era result -> NodeToClientVersion Source # |
data QueryInShelleyBasedEra era result where Source #
QueryEpoch :: forall era. QueryInShelleyBasedEra era EpochNo | |
QueryGenesisParameters :: forall era. QueryInShelleyBasedEra era (GenesisParameters ShelleyEra) | |
QueryProtocolParameters :: forall era. QueryInShelleyBasedEra era (PParams (ShelleyLedgerEra era)) | |
QueryProtocolParametersUpdate :: forall era. QueryInShelleyBasedEra era (Map (Hash GenesisKey) ProtocolParametersUpdate) | |
QueryStakeDistribution :: forall era. QueryInShelleyBasedEra era (Map (Hash StakePoolKey) Rational) | |
QueryUTxO :: forall era. QueryUTxOFilter -> QueryInShelleyBasedEra era (UTxO era) | |
QueryStakeAddresses :: forall era. Set StakeCredential -> NetworkId -> QueryInShelleyBasedEra era (Map StakeAddress Coin, Map StakeAddress PoolId) | |
QueryStakePools :: forall era. QueryInShelleyBasedEra era (Set PoolId) | |
QueryStakePoolParameters :: forall era. Set PoolId -> QueryInShelleyBasedEra era (Map PoolId StakePoolParameters) | |
QueryDebugLedgerState :: forall era. QueryInShelleyBasedEra era (SerialisedDebugLedgerState era) | |
QueryProtocolState :: forall era. QueryInShelleyBasedEra era (ProtocolState era) | |
QueryCurrentEpochState :: forall era. QueryInShelleyBasedEra era (SerialisedCurrentEpochState era) | |
QueryPoolState :: forall era. Maybe (Set PoolId) -> QueryInShelleyBasedEra era (SerialisedPoolState era) | |
QueryPoolDistribution :: forall era. Maybe (Set PoolId) -> QueryInShelleyBasedEra era (SerialisedPoolDistribution era) | |
QueryStakeSnapshot :: forall era. Maybe (Set PoolId) -> QueryInShelleyBasedEra era (SerialisedStakeSnapshots era) | |
QueryStakeDelegDeposits :: forall era. Set StakeCredential -> QueryInShelleyBasedEra era (Map StakeCredential Coin) | |
QueryAccountState :: forall era. QueryInShelleyBasedEra era AccountState | |
QueryConstitution :: forall era. QueryInShelleyBasedEra era (Constitution (ShelleyLedgerEra era)) | |
QueryGovState :: forall era. QueryInShelleyBasedEra era (GovState (ShelleyLedgerEra era)) | |
QueryDRepState :: forall era. Set (Credential 'DRepRole StandardCrypto) -> QueryInShelleyBasedEra era (Map (Credential 'DRepRole StandardCrypto) (DRepState StandardCrypto)) | |
QueryDRepStakeDistr :: forall era. Set (DRep StandardCrypto) -> QueryInShelleyBasedEra era (Map (DRep StandardCrypto) Coin) | |
QuerySPOStakeDistr :: forall era. Set (KeyHash 'StakePool StandardCrypto) -> QueryInShelleyBasedEra era (Map (KeyHash 'StakePool StandardCrypto) Coin) | |
QueryCommitteeMembersState :: forall era. Set (Credential 'ColdCommitteeRole StandardCrypto) -> Set (Credential 'HotCommitteeRole StandardCrypto) -> Set MemberStatus -> QueryInShelleyBasedEra era (CommitteeMembersState StandardCrypto) | |
QueryStakeVoteDelegatees :: forall era. Set StakeCredential -> QueryInShelleyBasedEra era (Map StakeCredential (DRep StandardCrypto)) |
Instances
Show (QueryInShelleyBasedEra era result) Source # | |
Defined in Cardano.Api.Query | |
NodeToClientVersionOf (QueryInShelleyBasedEra era result) Source # | Mapping for queries in Shelley-based eras returning minimal node-to-client protocol versions. More information about queries versioning can be found: * https://ouroboros-network.cardano.intersectmbo.org/ouroboros-network/Ouroboros-Network-NodeToClient.html#t:NodeToClientVersion * https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/QueryVersioning/#implementation |
Defined in Cardano.Api.Query nodeToClientVersionOf :: QueryInShelleyBasedEra era result -> NodeToClientVersion Source # |
queryNodeLocalState :: LocalNodeConnectInfo -> Target ChainPoint -> QueryInMode result -> ExceptT AcquiringFailure IO result Source #
Local tx monitoring
newtype LocalTxMonitorClient txid tx slot (m :: Type -> Type) a Source #
A tx monitor client, on top of some effect m
.
LocalTxMonitorClient | |
|
data LocalTxMonitoringQuery Source #
LocalTxMonitoringQueryTx TxIdInMode | Query if a particular tx exists in the mempool. Note that, the absence of a transaction does not imply anything about how the transaction was processed: it may have been dropped, or inserted in a block. |
LocalTxMonitoringSendNextTx | The mempool is modeled as an ordered list of transactions and thus, can
be traversed linearly. |
LocalTxMonitoringMempoolInformation | Ask the server about the current mempool's capacity and sizes. This is fixed in a given snapshot. |
data LocalTxMonitoringResult Source #
LocalTxMonitoringTxExists TxId SlotNo | Slot number at which the mempool snapshot was taken |
LocalTxMonitoringTxDoesNotExist TxId SlotNo | Slot number at which the mempool snapshot was taken |
LocalTxMonitoringNextTx (Maybe TxInMode) SlotNo | Slot number at which the mempool snapshot was taken |
LocalTxMonitoringMempoolSizeAndCapacity MempoolSizeAndCapacity SlotNo | Slot number at which the mempool snapshot was taken |
Instances
ToJSON LocalTxMonitoringResult Source # | |
Defined in Cardano.Api.IPC toJSON :: LocalTxMonitoringResult -> Value # toEncoding :: LocalTxMonitoringResult -> Encoding # toJSONList :: [LocalTxMonitoringResult] -> Value # toEncodingList :: [LocalTxMonitoringResult] -> Encoding # |
data MempoolSizeAndCapacity Source #
Describes the MemPool sizes and capacity for a given snapshot.
MempoolSizeAndCapacity | |
|
Instances
Generic MempoolSizeAndCapacity | |||||
Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type
| |||||
Show MempoolSizeAndCapacity | |||||
NFData MempoolSizeAndCapacity | |||||
Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type rnf :: MempoolSizeAndCapacity -> () Source # | |||||
Eq MempoolSizeAndCapacity | |||||
type Rep MempoolSizeAndCapacity | |||||
Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type type Rep MempoolSizeAndCapacity = D1 ('MetaData "MempoolSizeAndCapacity" "Ouroboros.Network.Protocol.LocalTxMonitor.Type" "ouroboros-network-protocols-0.11.0.0-dbe28cd85e90450a9093c991f088d6578c0430a256ce4e92bae45a7dc596c689" 'False) (C1 ('MetaCons "MempoolSizeAndCapacity" 'PrefixI 'True) (S1 ('MetaSel ('Just "capacityInBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "sizeInBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32) :*: S1 ('MetaSel ('Just "numberOfTxs") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32)))) |
queryTxMonitoringLocal :: MonadIO m => LocalNodeConnectInfo -> LocalTxMonitoringQuery -> m LocalTxMonitoringResult Source #
data EraHistory where Source #
EraHistory :: forall (xs :: [Type]). CardanoBlock StandardCrypto ~ HardForkBlock xs => Interpreter xs -> EraHistory |
getProgress :: SlotNo -> EraHistory -> Either PastHorizonException (RelativeTime, SlotLength) Source #
Common queries
getLocalChainTip :: MonadIO m => LocalNodeConnectInfo -> m ChainTip Source #
Helpers
data NodeToClientVersion Source #
Enumeration of node to client protocol versions.
NodeToClientV_9 | enabled |
NodeToClientV_10 | added |
NodeToClientV_11 | added |
NodeToClientV_12 | added |
NodeToClientV_13 | enabled |
NodeToClientV_14 | added |
NodeToClientV_15 | added |
NodeToClientV_16 | added |
NodeToClientV_17 | added |
NodeToClientV_18 | added |
Instances
Bounded NodeToClientVersion | |||||
Enum NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version succ :: NodeToClientVersion -> NodeToClientVersion Source # pred :: NodeToClientVersion -> NodeToClientVersion Source # toEnum :: Int -> NodeToClientVersion Source # fromEnum :: NodeToClientVersion -> Int Source # enumFrom :: NodeToClientVersion -> [NodeToClientVersion] Source # enumFromThen :: NodeToClientVersion -> NodeToClientVersion -> [NodeToClientVersion] Source # enumFromTo :: NodeToClientVersion -> NodeToClientVersion -> [NodeToClientVersion] Source # enumFromThenTo :: NodeToClientVersion -> NodeToClientVersion -> NodeToClientVersion -> [NodeToClientVersion] Source # | |||||
Generic NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version
from :: NodeToClientVersion -> Rep NodeToClientVersion x Source # to :: Rep NodeToClientVersion x -> NodeToClientVersion Source # | |||||
Show NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version | |||||
NFData NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version rnf :: NodeToClientVersion -> () Source # | |||||
Eq NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version (==) :: NodeToClientVersion -> NodeToClientVersion -> Bool Source # (/=) :: NodeToClientVersion -> NodeToClientVersion -> Bool Source # | |||||
Ord NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version compare :: NodeToClientVersion -> NodeToClientVersion -> Ordering Source # (<) :: NodeToClientVersion -> NodeToClientVersion -> Bool Source # (<=) :: NodeToClientVersion -> NodeToClientVersion -> Bool Source # (>) :: NodeToClientVersion -> NodeToClientVersion -> Bool Source # (>=) :: NodeToClientVersion -> NodeToClientVersion -> Bool Source # max :: NodeToClientVersion -> NodeToClientVersion -> NodeToClientVersion Source # min :: NodeToClientVersion -> NodeToClientVersion -> NodeToClientVersion Source # | |||||
MonadReader NodeToClientVersion (LocalStateQueryExpr block point query r m) Source # | |||||
Defined in Cardano.Api.IPC.Monad ask :: LocalStateQueryExpr block point query r m NodeToClientVersion Source # local :: (NodeToClientVersion -> NodeToClientVersion) -> LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m a Source # reader :: (NodeToClientVersion -> a) -> LocalStateQueryExpr block point query r m a Source # | |||||
type Rep NodeToClientVersion | |||||
Defined in Ouroboros.Network.NodeToClient.Version type Rep NodeToClientVersion = D1 ('MetaData "NodeToClientVersion" "Ouroboros.Network.NodeToClient.Version" "ouroboros-network-api-0.10.0.0-cb32018ffcd98ec8fbe69633d0872adc69c773a0eb1390c5d0762a8b4b3e0a5b" 'False) (((C1 ('MetaCons "NodeToClientV_9" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NodeToClientV_10" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NodeToClientV_11" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NodeToClientV_12" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NodeToClientV_13" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "NodeToClientV_14" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NodeToClientV_15" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NodeToClientV_16" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NodeToClientV_17" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NodeToClientV_18" 'PrefixI 'False) (U1 :: Type -> Type))))) |
data UnsupportedNtcVersionError Source #
Instances
Show UnsupportedNtcVersionError Source # | |
Defined in Cardano.Api.IPC.Version | |
Eq UnsupportedNtcVersionError Source # | |
Defined in Cardano.Api.IPC.Version |