bcc-api-1.99.0
Safe HaskellNone
LanguageHaskell2010

Bcc.Api.Query

Description

Queries from local clients to the node.

Synopsis

Queries

data QueryInMode mode result where Source #

Constructors

QueryCurrentEraConsensusModeIsMultiEra mode → QueryInMode mode AnyBccEra 
QueryInEraEraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result) 
QueryEraHistoryConsensusModeIsMultiEra mode → QueryInMode mode (EraHistory mode) 
QuerySystemStartQueryInMode mode SystemStart 

Instances

Instances details
Show (QueryInMode mode result) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

showsPrecIntQueryInMode mode result → ShowS Source #

showQueryInMode mode result → String Source #

showList ∷ [QueryInMode mode result] → ShowS Source #

data QueryInEra era result where Source #

Constructors

QueryColeUpdateStateQueryInEra ColeEra ColeUpdateState 
QueryInSophieBasedEraSophieBasedEra era → QueryInSophieBasedEra era result → QueryInEra era result 

Instances

Instances details
Show (QueryInEra era result) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

showsPrecIntQueryInEra era result → ShowS Source #

showQueryInEra era result → String Source #

showList ∷ [QueryInEra era result] → ShowS Source #

data QueryUTxOFilter Source #

Getting the whole UTxO is obviously not efficient since the result can be huge. Filtering by address is also not efficient because it requires a linear search.

The QueryUTxOFilterByTxIn is efficient since it fits with the structure of the UTxO (which is indexed by TxIn).

Constructors

QueryUTxOWhole

O(n) time and space for utxo size n

QueryUTxOByAddress (Set AddressAny)

O(n) time, O(m) space for utxo size n, and address set size m

QueryUTxOByTxIn (Set TxIn)

O(m log n) time, O(m) space for utxo size n, and address set size m

Instances

Instances details
Eq QueryUTxOFilter Source # 
Instance details

Defined in Bcc.Api.Query

Show QueryUTxOFilter Source # 
Instance details

Defined in Bcc.Api.Query

newtype UTxO era Source #

Constructors

UTxO (Map TxIn (TxOut era)) 

Instances

Instances details
Eq (UTxO era) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

(==)UTxO era → UTxO era → Bool Source #

(/=)UTxO era → UTxO era → Bool Source #

Show (UTxO era) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

showsPrecIntUTxO era → ShowS Source #

showUTxO era → String Source #

showList ∷ [UTxO era] → ShowS Source #

IsBccEra era ⇒ ToJSON (UTxO era) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

toJSONUTxO era → Value #

toEncodingUTxO era → Encoding #

toJSONList ∷ [UTxO era] → Value #

toEncodingList ∷ [UTxO era] → Encoding #

data UTxOInAnyEra where Source #

Constructors

UTxOInAnyEraBccEra era → UTxO era → UTxOInAnyEra 

Instances

Instances details
Show UTxOInAnyEra Source # 
Instance details

Defined in Bcc.Api.Query

Internal conversion functions

toConsensusQuery ∷ ∀ mode block result. ConsensusBlockForMode mode ~ block ⇒ QueryInMode mode result → Some (Query block) Source #

fromConsensusQueryResult ∷ ∀ mode block result result'. ConsensusBlockForMode mode ~ block ⇒ QueryInMode mode result → Query block result' → result' → result Source #

Wrapper types used in queries

newtype SerialisedDebugLedgerState era Source #

Constructors

SerialisedDebugLedgerState (Serialised (NewEpochState (SophieLedgerEra era))) 

newtype ProtocolState era Source #

Constructors

ProtocolState (Serialised (ChainDepState (Crypto (SophieLedgerEra era)))) 

data DebugLedgerState era where Source #

Constructors

DebugLedgerStateSophieLedgerEra era ~ ledgerera ⇒ NewEpochState ledgerera → DebugLedgerState era 

Instances

Instances details
(IsSophieBasedEra era, SophieLedgerEra era ~ ledgerera, SophieBasedEra ledgerera, ToJSON (PParams ledgerera), ToJSON (PParamsDelta ledgerera), ToJSON (TxOut ledgerera)) ⇒ ToJSON (DebugLedgerState era) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

toJSONDebugLedgerState era → Value #

toEncodingDebugLedgerState era → Encoding #

toJSONList ∷ [DebugLedgerState era] → Value #

toEncodingList ∷ [DebugLedgerState era] → Encoding #

(Typeable era, TransLedgerState FromCBOR (SophieLedgerEra era)) ⇒ FromCBOR (DebugLedgerState era) Source # 
Instance details

Defined in Bcc.Api.Query

Methods

fromCBOR ∷ Decoder s (DebugLedgerState era) #

labelProxy (DebugLedgerState era) → Text #

data EraHistory mode where Source #

Constructors

EraHistoryConsensusBlockForMode mode ~ HardForkBlock xs ⇒ ConsensusMode mode → Interpreter xs → EraHistory mode 

newtype SystemStart #

Constructors

SystemStart 

Instances

Instances details
Eq SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Show SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Generic SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Associated Types

type Rep SystemStartTypeType Source #

FromJSON SystemStart Source # 
Instance details

Defined in Bcc.Api.Orphans

Methods

parseJSON ∷ Value → Parser SystemStart #

parseJSONList ∷ Value → Parser [SystemStart] #

NoThunks SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Methods

noThunks ∷ Context → SystemStartIO (Maybe ThunkInfo)

wNoThunks ∷ Context → SystemStartIO (Maybe ThunkInfo)

showTypeOfProxy SystemStartString

ToJSON SystemStart Source # 
Instance details

Defined in Bcc.Api.Orphans

Methods

toJSONSystemStart → Value #

toEncodingSystemStart → Encoding #

toJSONList ∷ [SystemStart] → Value #

toEncodingList ∷ [SystemStart] → Encoding #

FromCBOR SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Methods

fromCBOR ∷ Decoder s SystemStart #

labelProxy SystemStartText #

ToCBOR SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Methods

toCBORSystemStart → Encoding #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SystemStart → Size #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SystemStart] → Size #

Serialise SystemStart 
Instance details

Defined in Bcc.Slotting.Time

Methods

encodeSystemStart → Encoding

decode ∷ Decoder s SystemStart

encodeList ∷ [SystemStart] → Encoding

decodeList ∷ Decoder s [SystemStart]

type Rep SystemStart 
Instance details

Defined in Bcc.Slotting.Time

type Rep SystemStart = D1 ('MetaData "SystemStart" "Bcc.Slotting.Time" "bcc-slotting-0.1.0.0-31796ee1b38506581e134229951d26120392aac1ce6c978fbf7438ab37ed4173" 'True) (C1 ('MetaCons "SystemStart" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSystemStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))

newtype SlotsInEpoch Source #

Constructors

SlotsInEpoch Word64 

slotToEpochSlotNoEraHistory mode → Either PastHorizonException (EpochNo, SlotsInEpoch, SlotsToEpochEnd) Source #

data family LedgerState blk #

Instances

Instances details
Isomorphic LedgerState 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ LedgerState (HardForkBlock '[blk]) → LedgerState blk

inject ∷ NoHardForks blk ⇒ LedgerState blk → LedgerState (HardForkBlock '[blk])

CanHardFork xs ⇒ Eq (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Basics

Methods

(==)LedgerState (HardForkBlock xs) → LedgerState (HardForkBlock xs) → Bool Source #

(/=)LedgerState (HardForkBlock xs) → LedgerState (HardForkBlock xs) → Bool Source #

CanHardFork xs ⇒ Show (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Basics

Methods

showsPrecIntLedgerState (HardForkBlock xs) → ShowS Source #

showLedgerState (HardForkBlock xs) → String Source #

showList ∷ [LedgerState (HardForkBlock xs)] → ShowS Source #

CanHardFork xs ⇒ NoThunks (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → LedgerState (HardForkBlock xs) → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → LedgerState (HardForkBlock xs) → IO (Maybe ThunkInfo)

showTypeOfProxy (LedgerState (HardForkBlock xs)) → String

Isomorphic (Ticked :.: LedgerState) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ (Ticked :.: LedgerState) (HardForkBlock '[blk]) → (Ticked :.: LedgerState) blk

inject ∷ NoHardForks blk ⇒ (Ticked :.: LedgerState) blk → (Ticked :.: LedgerState) (HardForkBlock '[blk])

data LedgerState ColeBlock 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

data LedgerState ColeBlock = ColeLedgerState {}
type TranslationError era (LedgerState :.: SophieBlock) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.SophieHFC

type TranslationError era (LedgerState :.: SophieBlock) = Void
type Rep (LedgerState ColeBlock) 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

type Rep (LedgerState ColeBlock) = D1 ('MetaData "LedgerState" "Shardagnostic.Consensus.Cole.Ledger.Ledger" "shardagnostic-consensus-cole-0.1.0.0-57763277a1dd4886d3500cfbed814a9e504ca4cde3b422e2c25ec9b5f4284c42" 'False) (C1 ('MetaCons "ColeLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "coleLedgerTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin BlockNo)) :*: (S1 ('MetaSel ('Just "coleLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "coleLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ColeTransition))))
type Rep (LedgerState (SophieBlock era)) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

type Rep (LedgerState (SophieBlock era)) = D1 ('MetaData "LedgerState" "Shardagnostic.Consensus.Sophie.Ledger.Ledger" "shardagnostic-consensus-sophie-0.1.0.0-78dae6cdce618e392ec705722a54aafcdfaf8e601dcc8aefa7ad8f77cf55bc12" 'False) (C1 ('MetaCons "SophieLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "sophieLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (SophieTip era))) :*: (S1 ('MetaSel ('Just "sophieLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "sophieLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SophieTransition))))
type Rep (Ticked (LedgerState ColeBlock)) 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

type Rep (Ticked (LedgerState ColeBlock)) = D1 ('MetaData "Ticked" "Shardagnostic.Consensus.Cole.Ledger.Ledger" "shardagnostic-consensus-cole-0.1.0.0-57763277a1dd4886d3500cfbed814a9e504ca4cde3b422e2c25ec9b5f4284c42" 'False) (C1 ('MetaCons "TickedColeLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedColeLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedColeLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 ColeTransition)))
type Rep (Ticked (LedgerState (HardForkBlock xs))) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Ledger

type Rep (Ticked (LedgerState (HardForkBlock xs))) = D1 ('MetaData "Ticked" "Shardagnostic.Consensus.HardFork.Combinator.Ledger" "shardagnostic-consensus-0.1.0.0-2aa8c817087060cd06754d8c0d3120b1c34fe53aa604e25131dc3c88e2ebf8ad" 'False) (C1 ('MetaCons "TickedHardForkLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedHardForkLedgerStateTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransitionInfo) :*: S1 ('MetaSel ('Just "tickedHardForkLedgerStatePerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HardForkState (Ticked :.: LedgerState) xs))))
type Rep (Ticked (LedgerState (SophieBlock era))) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

type Rep (Ticked (LedgerState (SophieBlock era))) = D1 ('MetaData "Ticked" "Shardagnostic.Consensus.Sophie.Ledger.Ledger" "shardagnostic-consensus-sophie-0.1.0.0-78dae6cdce618e392ec705722a54aafcdfaf8e601dcc8aefa7ad8f77cf55bc12" 'False) (C1 ('MetaCons "TickedSophieLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "untickedSophieLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (SophieTip era))) :*: (S1 ('MetaSel ('Just "tickedSophieLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SophieTransition) :*: S1 ('MetaSel ('Just "tickedSophieLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)))))
type HeaderHash (LedgerState blk) 
Instance details

Defined in Shardagnostic.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk) = HeaderHash blk
type AuxLedgerEvent (LedgerState ColeBlock) 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

type AuxLedgerEvent (LedgerState ColeBlock) = VoidLedgerEvent (LedgerState ColeBlock)
type AuxLedgerEvent (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Ledger

type AuxLedgerEvent (LedgerState (HardForkBlock xs)) = OneEraLedgerEvent xs
type AuxLedgerEvent (LedgerState (SophieBlock era)) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

type AuxLedgerEvent (LedgerState (SophieBlock era)) = SophieLedgerEvent era
type LedgerErr (LedgerState ColeBlock) 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

type LedgerErr (LedgerState ColeBlock) = ChainValidationError
type LedgerErr (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Ledger

type LedgerErr (LedgerState (HardForkBlock xs)) = HardForkLedgerError xs
type LedgerErr (LedgerState (SophieBlock era)) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

type LedgerErr (LedgerState (SophieBlock era)) = SophieLedgerError era
type LedgerCfg (LedgerState ColeBlock) 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

type LedgerCfg (LedgerState ColeBlock) = Config
type LedgerCfg (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Basics

type LedgerCfg (LedgerState (HardForkBlock xs)) = HardForkLedgerConfig xs
type LedgerCfg (LedgerState (SophieBlock era)) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

type LedgerCfg (LedgerState (SophieBlock era)) = SophieLedgerConfig era
newtype LedgerState (HardForkBlock xs) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Basics

newtype LedgerState (HardForkBlock xs) = HardForkLedgerState {}
data LedgerState (SophieBlock era) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

data LedgerState (SophieBlock era) = SophieLedgerState {}
data Ticked (LedgerState ColeBlock) 
Instance details

Defined in Shardagnostic.Consensus.Cole.Ledger.Ledger

data Ticked (LedgerState ColeBlock) = TickedColeLedgerState {}
data Ticked (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Shardagnostic.Consensus.HardFork.Combinator.Ledger

data Ticked (LedgerState (HardForkBlock xs)) = TickedHardForkLedgerState {}
data Ticked (LedgerState (SophieBlock era)) 
Instance details

Defined in Shardagnostic.Consensus.Sophie.Ledger.Ledger

data Ticked (LedgerState (SophieBlock era)) = TickedSophieLedgerState {}

getProgressSlotNoEraHistory mode → Either PastHorizonException (RelativeTime, SlotLength) Source #

Internal conversion functions

toLedgerUTxOSophieLedgerEra era ~ ledgerera ⇒ Crypto ledgerera ~ StandardCrypto ⇒ SophieBasedEra era → UTxO era → UTxO ledgerera Source #

fromLedgerUTxOSophieLedgerEra era ~ ledgerera ⇒ Crypto ledgerera ~ StandardCrypto ⇒ SophieBasedEra era → UTxO ledgerera → UTxO era Source #