{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}

module Test.Consensus.Shelley.Examples (
    -- * Setup
    codecConfig
  , testShelleyGenesis
    -- * Examples
  , examplesAllegra
  , examplesAlonzo
  , examplesBabbage
  , examplesConway
  , examplesMary
  , examplesShelley
  ) where

import qualified Cardano.Ledger.Block as SL
import           Cardano.Ledger.Crypto (Crypto)
import qualified Cardano.Protocol.TPraos.BHeader as SL
import           Data.Coerce (coerce)
import           Data.List.NonEmpty (NonEmpty ((:|)))
import qualified Data.Set as Set
import           Ouroboros.Consensus.Block
import           Ouroboros.Consensus.HeaderValidation
import           Ouroboros.Consensus.Ledger.Extended
import           Ouroboros.Consensus.Ledger.SupportsMempool
import           Ouroboros.Consensus.Protocol.Abstract (TranslateProto,
                     translateChainDepState)
import           Ouroboros.Consensus.Protocol.Praos (Praos)
import           Ouroboros.Consensus.Protocol.Praos.Header
                     (HeaderBody (HeaderBody))
import qualified Ouroboros.Consensus.Protocol.Praos.Header as Praos
import           Ouroboros.Consensus.Protocol.TPraos (TPraos,
                     TPraosState (TPraosState))
import           Ouroboros.Consensus.Shelley.Eras
import           Ouroboros.Consensus.Shelley.HFEras
import           Ouroboros.Consensus.Shelley.Ledger
import           Ouroboros.Consensus.Shelley.Ledger.Query.Types
import           Ouroboros.Consensus.Shelley.Protocol.TPraos ()
import           Ouroboros.Consensus.Storage.Serialisation
import           Ouroboros.Network.Block (Serialised (..))
import           Ouroboros.Network.PeerSelection.LedgerPeers.Type
import           Ouroboros.Network.PeerSelection.RelayAccessPoint
import           Test.Cardano.Ledger.Allegra.Examples.Consensus
                     (ledgerExamplesAllegra)
import           Test.Cardano.Ledger.Alonzo.Examples.Consensus
                     (ledgerExamplesAlonzo)
import           Test.Cardano.Ledger.Babbage.Examples.Consensus
                     (ledgerExamplesBabbage)
import           Test.Cardano.Ledger.Conway.Examples.Consensus
                     (ledgerExamplesConway)
import           Test.Cardano.Ledger.Mary.Examples.Consensus
                     (ledgerExamplesMary)
import           Test.Cardano.Ledger.Shelley.Examples.Consensus
                     (ShelleyLedgerExamples (..), ShelleyResultExamples (..),
                     ledgerExamplesShelley, testShelleyGenesis)
import           Test.Util.Orphans.Arbitrary ()
import           Test.Util.Serialisation.Examples (Examples (..), labelled,
                     unlabelled)
import           Test.Util.Serialisation.SomeResult (SomeResult (..))


{-------------------------------------------------------------------------------
  Examples
-------------------------------------------------------------------------------}

codecConfig :: CodecConfig StandardShelleyBlock
codecConfig :: CodecConfig StandardShelleyBlock
codecConfig = CodecConfig StandardShelleyBlock
forall proto era. CodecConfig (ShelleyBlock proto era)
ShelleyCodecConfig

fromShelleyLedgerExamples ::
     ShelleyCompatible (TPraos (EraCrypto era)) era
  => ShelleyLedgerExamples era
  -> Examples (ShelleyBlock (TPraos (EraCrypto era)) era)
fromShelleyLedgerExamples :: forall era.
ShelleyCompatible (TPraos (EraCrypto era)) era =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (TPraos (EraCrypto era)) era)
fromShelleyLedgerExamples ShelleyLedgerExamples {
                            sleResultExamples :: forall era. ShelleyLedgerExamples era -> ShelleyResultExamples era
sleResultExamples = ShelleyResultExamples{Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
PParams era
ProposedPPUpdates era
ShelleyGenesis (EraCrypto era)
PoolDistr (EraCrypto era)
srePParams :: PParams era
sreProposedPPUpdates :: ProposedPPUpdates era
srePoolDistr :: PoolDistr (EraCrypto era)
sreNonMyopicRewards :: Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
sreShelleyGenesis :: ShelleyGenesis (EraCrypto era)
srePParams :: forall era. ShelleyResultExamples era -> PParams era
sreProposedPPUpdates :: forall era. ShelleyResultExamples era -> ProposedPPUpdates era
srePoolDistr :: forall era. ShelleyResultExamples era -> PoolDistr (EraCrypto era)
sreNonMyopicRewards :: forall era.
ShelleyResultExamples era
-> Map
     (Either Coin (Credential 'Staking (EraCrypto era)))
     (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
sreShelleyGenesis :: forall era.
ShelleyResultExamples era -> ShelleyGenesis (EraCrypto era)
..}
                            , Set (Either Coin (Credential 'Staking (EraCrypto era)))
Tx era
TranslationContext era
NewEpochState era
Block (BHeader (EraCrypto era)) era
ApplyTxError era
HashHeader (EraCrypto era)
ChainDepState (EraCrypto era)
sleBlock :: Block (BHeader (EraCrypto era)) era
sleHashHeader :: HashHeader (EraCrypto era)
sleTx :: Tx era
sleApplyTxError :: ApplyTxError era
sleRewardsCredentials :: Set (Either Coin (Credential 'Staking (EraCrypto era)))
sleNewEpochState :: NewEpochState era
sleChainDepState :: ChainDepState (EraCrypto era)
sleTranslationContext :: TranslationContext era
sleBlock :: forall era.
ShelleyLedgerExamples era -> Block (BHeader (EraCrypto era)) era
sleHashHeader :: forall era. ShelleyLedgerExamples era -> HashHeader (EraCrypto era)
sleTx :: forall era. ShelleyLedgerExamples era -> Tx era
sleApplyTxError :: forall era. ShelleyLedgerExamples era -> ApplyTxError era
sleRewardsCredentials :: forall era.
ShelleyLedgerExamples era
-> Set (Either Coin (Credential 'Staking (EraCrypto era)))
sleNewEpochState :: forall era. ShelleyLedgerExamples era -> NewEpochState era
sleChainDepState :: forall era.
ShelleyLedgerExamples era -> ChainDepState (EraCrypto era)
sleTranslationContext :: forall era. ShelleyLedgerExamples era -> TranslationContext era
..} =
  Examples {
      exampleBlock :: Labelled (ShelleyBlock (TPraos (EraCrypto era)) era)
exampleBlock            = ShelleyBlock (TPraos (EraCrypto era)) era
-> Labelled (ShelleyBlock (TPraos (EraCrypto era)) era)
forall a. a -> Labelled a
unlabelled ShelleyBlock (TPraos (EraCrypto era)) era
blk
    , exampleSerialisedBlock :: Labelled (Serialised (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleSerialisedBlock  = Serialised (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled
     (Serialised (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled Serialised (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {a}. Serialised a
serialisedBlock
    , exampleHeader :: Labelled (Header (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleHeader           = Header (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled (Header (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled (Header (ShelleyBlock (TPraos (EraCrypto era)) era)
 -> Labelled (Header (ShelleyBlock (TPraos (EraCrypto era)) era)))
-> Header (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled (Header (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a b. (a -> b) -> a -> b
$ ShelleyBlock (TPraos (EraCrypto era)) era
-> Header (ShelleyBlock (TPraos (EraCrypto era)) era)
forall blk. GetHeader blk => blk -> Header blk
getHeader ShelleyBlock (TPraos (EraCrypto era)) era
blk
    , exampleSerialisedHeader :: Labelled
  (SerialisedHeader (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleSerialisedHeader = SerialisedHeader (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled
     (SerialisedHeader (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled SerialisedHeader (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {proto} {era}. SerialisedHeader (ShelleyBlock proto era)
serialisedHeader
    , exampleHeaderHash :: Labelled (HeaderHash (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleHeaderHash       = ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
-> Labelled (ShelleyHash (ProtoCrypto (TPraos (EraCrypto era))))
forall a. a -> Labelled a
unlabelled ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
hash
    , exampleGenTx :: Labelled (GenTx (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleGenTx            = GenTx (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled (GenTx (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled GenTx (ShelleyBlock (TPraos (EraCrypto era)) era)
tx
    , exampleGenTxId :: Labelled (GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleGenTxId          = GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled (GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled (GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era)
 -> Labelled (GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era)))
-> GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled (GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a b. (a -> b) -> a -> b
$ GenTx (ShelleyBlock (TPraos (EraCrypto era)) era)
-> GenTxId (ShelleyBlock (TPraos (EraCrypto era)) era)
forall tx. HasTxId tx => tx -> TxId tx
txId GenTx (ShelleyBlock (TPraos (EraCrypto era)) era)
tx
    , exampleApplyTxErr :: Labelled (ApplyTxErr (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleApplyTxErr       = ApplyTxError era -> Labelled (ApplyTxError era)
forall a. a -> Labelled a
unlabelled ApplyTxError era
sleApplyTxError
    , exampleQuery :: Labelled
  (SomeSecond BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleQuery            = Labelled
  (SomeSecond BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era))
queries
    , exampleResult :: Labelled (SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleResult           = Labelled (SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era))
results
    , exampleAnnTip :: Labelled (AnnTip (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleAnnTip           = AnnTip (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled (AnnTip (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled AnnTip (ShelleyBlock (TPraos (EraCrypto era)) era)
annTip
    , exampleLedgerState :: Labelled (LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleLedgerState      = LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled
     (LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
ledgerState
    , exampleChainDepState :: Labelled
  (ChainDepState
     (BlockProtocol (ShelleyBlock (TPraos (EraCrypto era)) era)))
exampleChainDepState    = TPraosState (EraCrypto era)
-> Labelled (TPraosState (EraCrypto era))
forall a. a -> Labelled a
unlabelled TPraosState (EraCrypto era)
chainDepState
    , exampleExtLedgerState :: Labelled
  (ExtLedgerState (ShelleyBlock (TPraos (EraCrypto era)) era))
exampleExtLedgerState   = ExtLedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
-> Labelled
     (ExtLedgerState (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled ExtLedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
extLedgerState
    , exampleSlotNo :: Labelled SlotNo
exampleSlotNo           = SlotNo -> Labelled SlotNo
forall a. a -> Labelled a
unlabelled SlotNo
slotNo
    }
  where
    blk :: ShelleyBlock (TPraos (EraCrypto era)) era
blk = Block (ShelleyProtocolHeader (TPraos (EraCrypto era))) era
-> ShelleyBlock (TPraos (EraCrypto era)) era
forall proto era.
ShelleyCompatible proto era =>
Block (ShelleyProtocolHeader proto) era -> ShelleyBlock proto era
mkShelleyBlock Block (BHeader (EraCrypto era)) era
Block (ShelleyProtocolHeader (TPraos (EraCrypto era))) era
sleBlock
    hash :: ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
hash = Hash
  (ProtoCrypto (TPraos (EraCrypto era))) EraIndependentBlockHeader
-> ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
forall crypto.
Hash crypto EraIndependentBlockHeader -> ShelleyHash crypto
ShelleyHash (Hash
   (ProtoCrypto (TPraos (EraCrypto era))) EraIndependentBlockHeader
 -> ShelleyHash (ProtoCrypto (TPraos (EraCrypto era))))
-> Hash
     (ProtoCrypto (TPraos (EraCrypto era))) EraIndependentBlockHeader
-> ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
forall a b. (a -> b) -> a -> b
$ HashHeader (EraCrypto era)
-> Hash (EraCrypto era) EraIndependentBlockHeader
forall c. HashHeader c -> Hash c EraIndependentBlockHeader
SL.unHashHeader HashHeader (EraCrypto era)
sleHashHeader
    serialisedBlock :: Serialised a
serialisedBlock = ByteString -> Serialised a
forall {k} (a :: k). ByteString -> Serialised a
Serialised ByteString
"<BLOCK>"
    tx :: GenTx (ShelleyBlock (TPraos (EraCrypto era)) era)
tx = Tx era -> GenTx (ShelleyBlock (TPraos (EraCrypto era)) era)
forall era proto.
ShelleyBasedEra era =>
Tx era -> GenTx (ShelleyBlock proto era)
mkShelleyTx Tx era
sleTx
    slotNo :: SlotNo
slotNo = Word64 -> SlotNo
SlotNo Word64
42
    serialisedHeader :: SerialisedHeader (ShelleyBlock proto era)
serialisedHeader =
      GenDepPair Serialised (NestedCtxt Header (ShelleyBlock proto era))
-> SerialisedHeader (ShelleyBlock proto era)
forall blk.
GenDepPair Serialised (NestedCtxt Header blk)
-> SerialisedHeader blk
SerialisedHeaderFromDepPair (GenDepPair Serialised (NestedCtxt Header (ShelleyBlock proto era))
 -> SerialisedHeader (ShelleyBlock proto era))
-> GenDepPair
     Serialised (NestedCtxt Header (ShelleyBlock proto era))
-> SerialisedHeader (ShelleyBlock proto era)
forall a b. (a -> b) -> a -> b
$ NestedCtxt
  Header (ShelleyBlock proto era) (Header (ShelleyBlock proto era))
-> Serialised (Header (ShelleyBlock proto era))
-> GenDepPair
     Serialised (NestedCtxt Header (ShelleyBlock proto era))
forall (f :: * -> *) a (g :: * -> *). f a -> g a -> GenDepPair g f
GenDepPair (NestedCtxt_
  (ShelleyBlock proto era) Header (Header (ShelleyBlock proto era))
-> NestedCtxt
     Header (ShelleyBlock proto era) (Header (ShelleyBlock proto era))
forall (f :: * -> *) blk a.
NestedCtxt_ blk f a -> NestedCtxt f blk a
NestedCtxt NestedCtxt_
  (ShelleyBlock proto era) Header (Header (ShelleyBlock proto era))
forall proto era (f :: * -> *).
NestedCtxt_ (ShelleyBlock proto era) f (f (ShelleyBlock proto era))
CtxtShelley) (ByteString -> Serialised (Header (ShelleyBlock proto era))
forall {k} (a :: k). ByteString -> Serialised a
Serialised ByteString
"<HEADER>")
    queries :: Labelled
  (SomeSecond BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era))
queries = [(String,
  SomeSecond BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era))]
-> Labelled
     (SomeSecond BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. [(String, a)] -> Labelled a
labelled [
          (String
"GetLedgerTip",              BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (Point (ShelleyBlock (TPraos (EraCrypto era)) era))
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (Point (ShelleyBlock (TPraos (EraCrypto era)) era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (Point (ShelleyBlock proto era))
GetLedgerTip)
        , (String
"GetEpochNo",                BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era) EpochNo
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era) EpochNo
forall proto era. BlockQuery (ShelleyBlock proto era) EpochNo
GetEpochNo)
        , (String
"GetCurrentPParams",         BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (PParams era)
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (PParams era)
forall proto era. BlockQuery (ShelleyBlock proto era) (PParams era)
GetCurrentPParams)
        , (String
"GetProposedPParamsUpdates", BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (ProposedPPUpdates era)
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (ProposedPPUpdates era)
forall proto era.
BlockQuery (ShelleyBlock proto era) (ProposedPPUpdates era)
GetProposedPParamsUpdates)
        , (String
"GetStakeDistribution",      BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
forall proto era.
BlockQuery (ShelleyBlock proto era) (PoolDistr (EraCrypto era))
GetStakeDistribution)
        , (String
"GetNonMyopicMemberRewards", BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (NonMyopicMemberRewards (EraCrypto era))
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery
   (ShelleyBlock (TPraos (EraCrypto era)) era)
   (NonMyopicMemberRewards (EraCrypto era))
 -> SomeSecond
      BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era))
-> BlockQuery
     (ShelleyBlock (TPraos (EraCrypto era)) era)
     (NonMyopicMemberRewards (EraCrypto era))
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall a b. (a -> b) -> a -> b
$ Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock (TPraos (EraCrypto era)) era)
     (NonMyopicMemberRewards (EraCrypto era))
forall era proto.
Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock proto era) (NonMyopicMemberRewards (EraCrypto era))
GetNonMyopicMemberRewards Set (Either Coin (Credential 'Staking (EraCrypto era)))
sleRewardsCredentials)
        , (String
"GetGenesisConfig",          BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (CompactGenesis (EraCrypto era))
GetGenesisConfig)
        , (String
"GetBigLedgerPeerSnapshot",  BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) LedgerPeerSnapshot
-> SomeSecond
     BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) LedgerPeerSnapshot
forall proto era.
BlockQuery (ShelleyBlock proto era) LedgerPeerSnapshot
GetBigLedgerPeerSnapshot)
      ]
    results :: Labelled (SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era))
results = [(String, SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era))]
-> Labelled
     (SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era))
forall a. [(String, a)] -> Labelled a
labelled [
          (String
"LedgerTip",              BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (Point (ShelleyBlock (TPraos (EraCrypto era)) era))
-> Point (ShelleyBlock (TPraos (EraCrypto era)) era)
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (Point (ShelleyBlock (TPraos (EraCrypto era)) era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (Point (ShelleyBlock proto era))
GetLedgerTip (ShelleyBlock (TPraos (EraCrypto era)) era
-> Point (ShelleyBlock (TPraos (EraCrypto era)) era)
forall block. HasHeader block => block -> Point block
blockPoint ShelleyBlock (TPraos (EraCrypto era)) era
blk))
        , (String
"EpochNo",                BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era) EpochNo
-> EpochNo
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery (ShelleyBlock (TPraos (EraCrypto era)) era) EpochNo
forall proto era. BlockQuery (ShelleyBlock proto era) EpochNo
GetEpochNo EpochNo
10)
        , (String
"EmptyPParams",           BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (PParams era)
-> PParams era
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (PParams era)
forall proto era. BlockQuery (ShelleyBlock proto era) (PParams era)
GetCurrentPParams PParams era
srePParams)
        , (String
"ProposedPParamsUpdates", BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (ProposedPPUpdates era)
-> ProposedPPUpdates era
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) (ProposedPPUpdates era)
forall proto era.
BlockQuery (ShelleyBlock proto era) (ProposedPPUpdates era)
GetProposedPParamsUpdates ProposedPPUpdates era
sreProposedPPUpdates)
        , (String
"StakeDistribution",      BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
-> PoolDistr (EraCrypto era)
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
forall proto era.
BlockQuery (ShelleyBlock proto era) (PoolDistr (EraCrypto era))
GetStakeDistribution (PoolDistr (EraCrypto era)
 -> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era))
-> PoolDistr (EraCrypto era)
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall a b. (a -> b) -> a -> b
$ PoolDistr (EraCrypto era) -> PoolDistr (EraCrypto era)
forall c. PoolDistr c -> PoolDistr c
fromLedgerPoolDistr PoolDistr (EraCrypto era)
srePoolDistr)
        , (String
"NonMyopicMemberRewards", BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (NonMyopicMemberRewards (EraCrypto era))
-> NonMyopicMemberRewards (EraCrypto era)
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock (TPraos (EraCrypto era)) era)
     (NonMyopicMemberRewards (EraCrypto era))
forall era proto.
Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock proto era) (NonMyopicMemberRewards (EraCrypto era))
GetNonMyopicMemberRewards Set (Either Coin (Credential 'Staking (EraCrypto era)))
forall a. Set a
Set.empty)
                                     (Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
-> NonMyopicMemberRewards (EraCrypto era)
forall c.
Map
  (Either Coin (Credential 'Staking c))
  (Map (KeyHash 'StakePool c) Coin)
-> NonMyopicMemberRewards c
NonMyopicMemberRewards (Map
   (Either Coin (Credential 'Staking (EraCrypto era)))
   (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
 -> NonMyopicMemberRewards (EraCrypto era))
-> Map
     (Either Coin (Credential 'Staking (EraCrypto era)))
     (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
-> NonMyopicMemberRewards (EraCrypto era)
forall a b. (a -> b) -> a -> b
$ Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
sreNonMyopicRewards))
        , (String
"GenesisConfig",          BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
-> CompactGenesis (EraCrypto era)
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (CompactGenesis (EraCrypto era))
GetGenesisConfig (ShelleyGenesis (EraCrypto era) -> CompactGenesis (EraCrypto era)
forall c. ShelleyGenesis c -> CompactGenesis c
compactGenesis ShelleyGenesis (EraCrypto era)
sreShelleyGenesis))
        , (String
"GetBigLedgerPeerSnapshot",
           BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) LedgerPeerSnapshot
-> LedgerPeerSnapshot
-> SomeResult (ShelleyBlock (TPraos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (TPraos (EraCrypto era)) era) LedgerPeerSnapshot
forall proto era.
BlockQuery (ShelleyBlock proto era) LedgerPeerSnapshot
GetBigLedgerPeerSnapshot
                      ((WithOrigin SlotNo,
 [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))])
-> LedgerPeerSnapshot
LedgerPeerSnapshot (SlotNo -> WithOrigin SlotNo
forall t. t -> WithOrigin t
NotOrigin SlotNo
slotNo, [(Rational -> AccPoolStake
AccPoolStake Rational
0.9
                                                             , (Rational -> PoolStake
PoolStake Rational
0.9
                                                               , IP -> PortNumber -> RelayAccessPoint
RelayAccessAddress (IPv4 -> IP
IPv4 IPv4
"1.1.1.1") PortNumber
1234 RelayAccessPoint -> [RelayAccessPoint] -> NonEmpty RelayAccessPoint
forall a. a -> [a] -> NonEmpty a
:| []))])))
        ]
    annTip :: AnnTip (ShelleyBlock (TPraos (EraCrypto era)) era)
annTip = AnnTip {
        annTipSlotNo :: SlotNo
annTipSlotNo  = Word64 -> SlotNo
SlotNo Word64
14
      , annTipBlockNo :: BlockNo
annTipBlockNo = Word64 -> BlockNo
BlockNo Word64
6
      , annTipInfo :: TipInfo (ShelleyBlock (TPraos (EraCrypto era)) era)
annTipInfo    = TipInfo (ShelleyBlock (TPraos (EraCrypto era)) era)
ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
hash
      }
    ledgerState :: LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
ledgerState = ShelleyLedgerState {
        shelleyLedgerTip :: WithOrigin (ShelleyTip (TPraos (EraCrypto era)) era)
shelleyLedgerTip        = ShelleyTip (TPraos (EraCrypto era)) era
-> WithOrigin (ShelleyTip (TPraos (EraCrypto era)) era)
forall t. t -> WithOrigin t
NotOrigin ShelleyTip {
                                    shelleyTipSlotNo :: SlotNo
shelleyTipSlotNo  = Word64 -> SlotNo
SlotNo Word64
9
                                  , shelleyTipBlockNo :: BlockNo
shelleyTipBlockNo = Word64 -> BlockNo
BlockNo Word64
3
                                  , shelleyTipHash :: HeaderHash (ShelleyBlock (TPraos (EraCrypto era)) era)
shelleyTipHash    = HeaderHash (ShelleyBlock (TPraos (EraCrypto era)) era)
ShelleyHash (ProtoCrypto (TPraos (EraCrypto era)))
hash
                                  }
    , shelleyLedgerState :: NewEpochState era
shelleyLedgerState      = NewEpochState era
sleNewEpochState
    , shelleyLedgerTransition :: ShelleyTransition
shelleyLedgerTransition = ShelleyTransitionInfo {shelleyAfterVoting :: Word32
shelleyAfterVoting = Word32
0}
    }
    chainDepState :: TPraosState (EraCrypto era)
chainDepState = WithOrigin SlotNo
-> ChainDepState (EraCrypto era) -> TPraosState (EraCrypto era)
forall c. WithOrigin SlotNo -> ChainDepState c -> TPraosState c
TPraosState (SlotNo -> WithOrigin SlotNo
forall t. t -> WithOrigin t
NotOrigin SlotNo
1) ChainDepState (EraCrypto era)
sleChainDepState
    extLedgerState :: ExtLedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
extLedgerState = LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
-> HeaderState (ShelleyBlock (TPraos (EraCrypto era)) era)
-> ExtLedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
forall blk.
LedgerState blk -> HeaderState blk -> ExtLedgerState blk
ExtLedgerState
                       LedgerState (ShelleyBlock (TPraos (EraCrypto era)) era)
ledgerState
                       (ChainDepState
  (BlockProtocol (ShelleyBlock (TPraos (EraCrypto era)) era))
-> HeaderState (ShelleyBlock (TPraos (EraCrypto era)) era)
forall blk. ChainDepState (BlockProtocol blk) -> HeaderState blk
genesisHeaderState ChainDepState
  (BlockProtocol (ShelleyBlock (TPraos (EraCrypto era)) era))
TPraosState (EraCrypto era)
chainDepState)

-- | TODO Factor this out into something nicer.
fromShelleyLedgerExamplesPraos ::
  forall era.
  ( ShelleyCompatible (Praos (EraCrypto era)) era,
    TranslateProto (TPraos (EraCrypto era)) (Praos (EraCrypto era))
  )
  => ShelleyLedgerExamples era
  -> Examples (ShelleyBlock (Praos (EraCrypto era)) era)
fromShelleyLedgerExamplesPraos :: forall era.
(ShelleyCompatible (Praos (EraCrypto era)) era,
 TranslateProto (TPraos (EraCrypto era)) (Praos (EraCrypto era))) =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (Praos (EraCrypto era)) era)
fromShelleyLedgerExamplesPraos ShelleyLedgerExamples {
                            sleResultExamples :: forall era. ShelleyLedgerExamples era -> ShelleyResultExamples era
sleResultExamples = ShelleyResultExamples{Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
PParams era
ProposedPPUpdates era
ShelleyGenesis (EraCrypto era)
PoolDistr (EraCrypto era)
srePParams :: forall era. ShelleyResultExamples era -> PParams era
sreProposedPPUpdates :: forall era. ShelleyResultExamples era -> ProposedPPUpdates era
srePoolDistr :: forall era. ShelleyResultExamples era -> PoolDistr (EraCrypto era)
sreNonMyopicRewards :: forall era.
ShelleyResultExamples era
-> Map
     (Either Coin (Credential 'Staking (EraCrypto era)))
     (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
sreShelleyGenesis :: forall era.
ShelleyResultExamples era -> ShelleyGenesis (EraCrypto era)
srePParams :: PParams era
sreProposedPPUpdates :: ProposedPPUpdates era
srePoolDistr :: PoolDistr (EraCrypto era)
sreNonMyopicRewards :: Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
sreShelleyGenesis :: ShelleyGenesis (EraCrypto era)
..}
                            , Set (Either Coin (Credential 'Staking (EraCrypto era)))
Tx era
TranslationContext era
NewEpochState era
Block (BHeader (EraCrypto era)) era
ApplyTxError era
HashHeader (EraCrypto era)
ChainDepState (EraCrypto era)
sleBlock :: forall era.
ShelleyLedgerExamples era -> Block (BHeader (EraCrypto era)) era
sleHashHeader :: forall era. ShelleyLedgerExamples era -> HashHeader (EraCrypto era)
sleTx :: forall era. ShelleyLedgerExamples era -> Tx era
sleApplyTxError :: forall era. ShelleyLedgerExamples era -> ApplyTxError era
sleRewardsCredentials :: forall era.
ShelleyLedgerExamples era
-> Set (Either Coin (Credential 'Staking (EraCrypto era)))
sleNewEpochState :: forall era. ShelleyLedgerExamples era -> NewEpochState era
sleChainDepState :: forall era.
ShelleyLedgerExamples era -> ChainDepState (EraCrypto era)
sleTranslationContext :: forall era. ShelleyLedgerExamples era -> TranslationContext era
sleBlock :: Block (BHeader (EraCrypto era)) era
sleHashHeader :: HashHeader (EraCrypto era)
sleTx :: Tx era
sleApplyTxError :: ApplyTxError era
sleRewardsCredentials :: Set (Either Coin (Credential 'Staking (EraCrypto era)))
sleNewEpochState :: NewEpochState era
sleChainDepState :: ChainDepState (EraCrypto era)
sleTranslationContext :: TranslationContext era
..} =
  Examples {
      exampleBlock :: Labelled (ShelleyBlock (Praos (EraCrypto era)) era)
exampleBlock            = ShelleyBlock (Praos (EraCrypto era)) era
-> Labelled (ShelleyBlock (Praos (EraCrypto era)) era)
forall a. a -> Labelled a
unlabelled ShelleyBlock (Praos (EraCrypto era)) era
blk
    , exampleSerialisedBlock :: Labelled (Serialised (ShelleyBlock (Praos (EraCrypto era)) era))
exampleSerialisedBlock  = Serialised (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (Serialised (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled Serialised (ShelleyBlock (Praos (EraCrypto era)) era)
forall {a}. Serialised a
serialisedBlock
    , exampleHeader :: Labelled (Header (ShelleyBlock (Praos (EraCrypto era)) era))
exampleHeader           = Header (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (Header (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled (Header (ShelleyBlock (Praos (EraCrypto era)) era)
 -> Labelled (Header (ShelleyBlock (Praos (EraCrypto era)) era)))
-> Header (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (Header (ShelleyBlock (Praos (EraCrypto era)) era))
forall a b. (a -> b) -> a -> b
$ ShelleyBlock (Praos (EraCrypto era)) era
-> Header (ShelleyBlock (Praos (EraCrypto era)) era)
forall blk. GetHeader blk => blk -> Header blk
getHeader ShelleyBlock (Praos (EraCrypto era)) era
blk
    , exampleSerialisedHeader :: Labelled
  (SerialisedHeader (ShelleyBlock (Praos (EraCrypto era)) era))
exampleSerialisedHeader = SerialisedHeader (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled
     (SerialisedHeader (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled SerialisedHeader (ShelleyBlock (Praos (EraCrypto era)) era)
forall {proto} {era}. SerialisedHeader (ShelleyBlock proto era)
serialisedHeader
    , exampleHeaderHash :: Labelled (HeaderHash (ShelleyBlock (Praos (EraCrypto era)) era))
exampleHeaderHash       = ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
-> Labelled (ShelleyHash (ProtoCrypto (Praos (EraCrypto era))))
forall a. a -> Labelled a
unlabelled ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
hash
    , exampleGenTx :: Labelled (GenTx (ShelleyBlock (Praos (EraCrypto era)) era))
exampleGenTx            = GenTx (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (GenTx (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled GenTx (ShelleyBlock (Praos (EraCrypto era)) era)
tx
    , exampleGenTxId :: Labelled (GenTxId (ShelleyBlock (Praos (EraCrypto era)) era))
exampleGenTxId          = GenTxId (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (GenTxId (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled (GenTxId (ShelleyBlock (Praos (EraCrypto era)) era)
 -> Labelled (GenTxId (ShelleyBlock (Praos (EraCrypto era)) era)))
-> GenTxId (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (GenTxId (ShelleyBlock (Praos (EraCrypto era)) era))
forall a b. (a -> b) -> a -> b
$ GenTx (ShelleyBlock (Praos (EraCrypto era)) era)
-> GenTxId (ShelleyBlock (Praos (EraCrypto era)) era)
forall tx. HasTxId tx => tx -> TxId tx
txId GenTx (ShelleyBlock (Praos (EraCrypto era)) era)
tx
    , exampleApplyTxErr :: Labelled (ApplyTxErr (ShelleyBlock (Praos (EraCrypto era)) era))
exampleApplyTxErr       = ApplyTxError era -> Labelled (ApplyTxError era)
forall a. a -> Labelled a
unlabelled ApplyTxError era
sleApplyTxError
    , exampleQuery :: Labelled
  (SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era))
exampleQuery            = Labelled
  (SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era))
queries
    , exampleResult :: Labelled (SomeResult (ShelleyBlock (Praos (EraCrypto era)) era))
exampleResult           = Labelled (SomeResult (ShelleyBlock (Praos (EraCrypto era)) era))
results
    , exampleAnnTip :: Labelled (AnnTip (ShelleyBlock (Praos (EraCrypto era)) era))
exampleAnnTip           = AnnTip (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled (AnnTip (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled AnnTip (ShelleyBlock (Praos (EraCrypto era)) era)
annTip
    , exampleLedgerState :: Labelled (LedgerState (ShelleyBlock (Praos (EraCrypto era)) era))
exampleLedgerState      = LedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled
     (LedgerState (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled LedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
ledgerState
    , exampleChainDepState :: Labelled
  (ChainDepState
     (BlockProtocol (ShelleyBlock (Praos (EraCrypto era)) era)))
exampleChainDepState    = PraosState (EraCrypto era) -> Labelled (PraosState (EraCrypto era))
forall a. a -> Labelled a
unlabelled ChainDepState (Praos (EraCrypto era))
PraosState (EraCrypto era)
chainDepState
    , exampleExtLedgerState :: Labelled
  (ExtLedgerState (ShelleyBlock (Praos (EraCrypto era)) era))
exampleExtLedgerState   = ExtLedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
-> Labelled
     (ExtLedgerState (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. a -> Labelled a
unlabelled ExtLedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
extLedgerState
    , exampleSlotNo :: Labelled SlotNo
exampleSlotNo           = SlotNo -> Labelled SlotNo
forall a. a -> Labelled a
unlabelled SlotNo
slotNo
    }
  where
    blk :: ShelleyBlock (Praos (EraCrypto era)) era
blk = Block (ShelleyProtocolHeader (Praos (EraCrypto era))) era
-> ShelleyBlock (Praos (EraCrypto era)) era
forall proto era.
ShelleyCompatible proto era =>
Block (ShelleyProtocolHeader proto) era -> ShelleyBlock proto era
mkShelleyBlock (Block (ShelleyProtocolHeader (Praos (EraCrypto era))) era
 -> ShelleyBlock (Praos (EraCrypto era)) era)
-> Block (ShelleyProtocolHeader (Praos (EraCrypto era))) era
-> ShelleyBlock (Praos (EraCrypto era)) era
forall a b. (a -> b) -> a -> b
$ let
      SL.Block BHeader (EraCrypto era)
hdr1 TxSeq era
bdy = Block (BHeader (EraCrypto era)) era
sleBlock in Header (EraCrypto era)
-> TxSeq era -> Block (Header (EraCrypto era)) era
forall era h.
(Era era, EncCBORGroup (TxSeq era), EncCBOR h) =>
h -> TxSeq era -> Block h era
SL.Block (BHeader (EraCrypto era) -> Header (EraCrypto era)
forall c. Crypto c => BHeader c -> Header c
translateHeader BHeader (EraCrypto era)
hdr1) TxSeq era
bdy

    translateHeader :: Crypto c => SL.BHeader c -> Praos.Header c
    translateHeader :: forall c. Crypto c => BHeader c -> Header c
translateHeader (SL.BHeader BHBody c
bhBody SignedKES (KES c) (BHBody c)
bhSig) =
        HeaderBody c -> SignedKES (KES c) (HeaderBody c) -> Header c
forall crypto.
Crypto crypto =>
HeaderBody crypto
-> SignedKES crypto (HeaderBody crypto) -> Header crypto
Praos.Header HeaderBody c
hBody SignedKES (KES c) (HeaderBody c)
hSig
      where
        hBody :: HeaderBody c
hBody = HeaderBody {
          hbBlockNo :: BlockNo
hbBlockNo = BHBody c -> BlockNo
forall c. BHBody c -> BlockNo
SL.bheaderBlockNo BHBody c
bhBody,
          hbSlotNo :: SlotNo
hbSlotNo = BHBody c -> SlotNo
forall c. BHBody c -> SlotNo
SL.bheaderSlotNo BHBody c
bhBody,
          hbPrev :: PrevHash c
hbPrev = BHBody c -> PrevHash c
forall c. BHBody c -> PrevHash c
SL.bheaderPrev BHBody c
bhBody,
          hbVk :: VKey 'BlockIssuer c
hbVk = BHBody c -> VKey 'BlockIssuer c
forall c. BHBody c -> VKey 'BlockIssuer c
SL.bheaderVk BHBody c
bhBody,
          hbVrfVk :: VerKeyVRF c
hbVrfVk = BHBody c -> VerKeyVRF c
forall c. BHBody c -> VerKeyVRF c
SL.bheaderVrfVk BHBody c
bhBody,
          hbVrfRes :: CertifiedVRF (VRF c) InputVRF
hbVrfRes = CertifiedVRF (VRF c) Nonce -> CertifiedVRF (VRF c) InputVRF
forall a b. Coercible a b => a -> b
coerce (CertifiedVRF (VRF c) Nonce -> CertifiedVRF (VRF c) InputVRF)
-> CertifiedVRF (VRF c) Nonce -> CertifiedVRF (VRF c) InputVRF
forall a b. (a -> b) -> a -> b
$ BHBody c -> CertifiedVRF (VRF c) Nonce
forall c. BHBody c -> CertifiedVRF c Nonce
SL.bheaderEta BHBody c
bhBody,
          hbBodySize :: Word32
hbBodySize = BHBody c -> Word32
forall c. BHBody c -> Word32
SL.bsize BHBody c
bhBody,
          hbBodyHash :: Hash c EraIndependentBlockBody
hbBodyHash = BHBody c -> Hash c EraIndependentBlockBody
forall c. BHBody c -> Hash c EraIndependentBlockBody
SL.bhash BHBody c
bhBody,
          hbOCert :: OCert c
hbOCert = BHBody c -> OCert c
forall c. BHBody c -> OCert c
SL.bheaderOCert BHBody c
bhBody,
          hbProtVer :: ProtVer
hbProtVer = BHBody c -> ProtVer
forall c. BHBody c -> ProtVer
SL.bprotver BHBody c
bhBody
        }
        hSig :: SignedKES (KES c) (HeaderBody c)
hSig = SignedKES (KES c) (BHBody c) -> SignedKES (KES c) (HeaderBody c)
forall a b. Coercible a b => a -> b
coerce SignedKES (KES c) (BHBody c)
bhSig
    hash :: ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
hash = Hash
  (ProtoCrypto (Praos (EraCrypto era))) EraIndependentBlockHeader
-> ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
forall crypto.
Hash crypto EraIndependentBlockHeader -> ShelleyHash crypto
ShelleyHash (Hash
   (ProtoCrypto (Praos (EraCrypto era))) EraIndependentBlockHeader
 -> ShelleyHash (ProtoCrypto (Praos (EraCrypto era))))
-> Hash
     (ProtoCrypto (Praos (EraCrypto era))) EraIndependentBlockHeader
-> ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
forall a b. (a -> b) -> a -> b
$ HashHeader (EraCrypto era)
-> Hash (EraCrypto era) EraIndependentBlockHeader
forall c. HashHeader c -> Hash c EraIndependentBlockHeader
SL.unHashHeader HashHeader (EraCrypto era)
sleHashHeader
    serialisedBlock :: Serialised a
serialisedBlock = ByteString -> Serialised a
forall {k} (a :: k). ByteString -> Serialised a
Serialised ByteString
"<BLOCK>"
    tx :: GenTx (ShelleyBlock (Praos (EraCrypto era)) era)
tx = Tx era -> GenTx (ShelleyBlock (Praos (EraCrypto era)) era)
forall era proto.
ShelleyBasedEra era =>
Tx era -> GenTx (ShelleyBlock proto era)
mkShelleyTx Tx era
sleTx
    slotNo :: SlotNo
slotNo = Word64 -> SlotNo
SlotNo Word64
42
    serialisedHeader :: SerialisedHeader (ShelleyBlock proto era)
serialisedHeader =
      GenDepPair Serialised (NestedCtxt Header (ShelleyBlock proto era))
-> SerialisedHeader (ShelleyBlock proto era)
forall blk.
GenDepPair Serialised (NestedCtxt Header blk)
-> SerialisedHeader blk
SerialisedHeaderFromDepPair (GenDepPair Serialised (NestedCtxt Header (ShelleyBlock proto era))
 -> SerialisedHeader (ShelleyBlock proto era))
-> GenDepPair
     Serialised (NestedCtxt Header (ShelleyBlock proto era))
-> SerialisedHeader (ShelleyBlock proto era)
forall a b. (a -> b) -> a -> b
$ NestedCtxt
  Header (ShelleyBlock proto era) (Header (ShelleyBlock proto era))
-> Serialised (Header (ShelleyBlock proto era))
-> GenDepPair
     Serialised (NestedCtxt Header (ShelleyBlock proto era))
forall (f :: * -> *) a (g :: * -> *). f a -> g a -> GenDepPair g f
GenDepPair (NestedCtxt_
  (ShelleyBlock proto era) Header (Header (ShelleyBlock proto era))
-> NestedCtxt
     Header (ShelleyBlock proto era) (Header (ShelleyBlock proto era))
forall (f :: * -> *) blk a.
NestedCtxt_ blk f a -> NestedCtxt f blk a
NestedCtxt NestedCtxt_
  (ShelleyBlock proto era) Header (Header (ShelleyBlock proto era))
forall proto era (f :: * -> *).
NestedCtxt_ (ShelleyBlock proto era) f (f (ShelleyBlock proto era))
CtxtShelley) (ByteString -> Serialised (Header (ShelleyBlock proto era))
forall {k} (a :: k). ByteString -> Serialised a
Serialised ByteString
"<HEADER>")
    queries :: Labelled
  (SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era))
queries = [(String,
  SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era))]
-> Labelled
     (SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. [(String, a)] -> Labelled a
labelled [
          (String
"GetLedgerTip",              BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (Point (ShelleyBlock (Praos (EraCrypto era)) era))
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (Point (ShelleyBlock (Praos (EraCrypto era)) era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (Point (ShelleyBlock proto era))
GetLedgerTip)
        , (String
"GetEpochNo",                BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) EpochNo
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) EpochNo
forall proto era. BlockQuery (ShelleyBlock proto era) EpochNo
GetEpochNo)
        , (String
"GetCurrentPParams",         BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) (PParams era)
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) (PParams era)
forall proto era. BlockQuery (ShelleyBlock proto era) (PParams era)
GetCurrentPParams)
        , (String
"GetProposedPParamsUpdates", BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era) (ProposedPPUpdates era)
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era) (ProposedPPUpdates era)
forall proto era.
BlockQuery (ShelleyBlock proto era) (ProposedPPUpdates era)
GetProposedPParamsUpdates)
        , (String
"GetStakeDistribution",      BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
forall proto era.
BlockQuery (ShelleyBlock proto era) (PoolDistr (EraCrypto era))
GetStakeDistribution)
        , (String
"GetNonMyopicMemberRewards", BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (NonMyopicMemberRewards (EraCrypto era))
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery
   (ShelleyBlock (Praos (EraCrypto era)) era)
   (NonMyopicMemberRewards (EraCrypto era))
 -> SomeSecond
      BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era))
-> BlockQuery
     (ShelleyBlock (Praos (EraCrypto era)) era)
     (NonMyopicMemberRewards (EraCrypto era))
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall a b. (a -> b) -> a -> b
$ Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock (Praos (EraCrypto era)) era)
     (NonMyopicMemberRewards (EraCrypto era))
forall era proto.
Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock proto era) (NonMyopicMemberRewards (EraCrypto era))
GetNonMyopicMemberRewards Set (Either Coin (Credential 'Staking (EraCrypto era)))
sleRewardsCredentials)
        , (String
"GetGenesisConfig",          BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
-> SomeSecond BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (CompactGenesis (EraCrypto era))
GetGenesisConfig)
      ]
    results :: Labelled (SomeResult (ShelleyBlock (Praos (EraCrypto era)) era))
results = [(String, SomeResult (ShelleyBlock (Praos (EraCrypto era)) era))]
-> Labelled (SomeResult (ShelleyBlock (Praos (EraCrypto era)) era))
forall a. [(String, a)] -> Labelled a
labelled [
          (String
"LedgerTip",              BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (Point (ShelleyBlock (Praos (EraCrypto era)) era))
-> Point (ShelleyBlock (Praos (EraCrypto era)) era)
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (Point (ShelleyBlock (Praos (EraCrypto era)) era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (Point (ShelleyBlock proto era))
GetLedgerTip (ShelleyBlock (Praos (EraCrypto era)) era
-> Point (ShelleyBlock (Praos (EraCrypto era)) era)
forall block. HasHeader block => block -> Point block
blockPoint ShelleyBlock (Praos (EraCrypto era)) era
blk))
        , (String
"EpochNo",                BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) EpochNo
-> EpochNo -> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) EpochNo
forall proto era. BlockQuery (ShelleyBlock proto era) EpochNo
GetEpochNo EpochNo
10)
        , (String
"EmptyPParams",           BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) (PParams era)
-> PParams era
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery (ShelleyBlock (Praos (EraCrypto era)) era) (PParams era)
forall proto era. BlockQuery (ShelleyBlock proto era) (PParams era)
GetCurrentPParams PParams era
srePParams)
        , (String
"ProposedPParamsUpdates", BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era) (ProposedPPUpdates era)
-> ProposedPPUpdates era
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era) (ProposedPPUpdates era)
forall proto era.
BlockQuery (ShelleyBlock proto era) (ProposedPPUpdates era)
GetProposedPParamsUpdates ProposedPPUpdates era
sreProposedPPUpdates)
        , (String
"StakeDistribution",      BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
-> PoolDistr (EraCrypto era)
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (PoolDistr (EraCrypto era))
forall proto era.
BlockQuery (ShelleyBlock proto era) (PoolDistr (EraCrypto era))
GetStakeDistribution (PoolDistr (EraCrypto era)
 -> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era))
-> PoolDistr (EraCrypto era)
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall a b. (a -> b) -> a -> b
$ PoolDistr (EraCrypto era) -> PoolDistr (EraCrypto era)
forall c. PoolDistr c -> PoolDistr c
fromLedgerPoolDistr PoolDistr (EraCrypto era)
srePoolDistr)
        , (String
"NonMyopicMemberRewards", BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (NonMyopicMemberRewards (EraCrypto era))
-> NonMyopicMemberRewards (EraCrypto era)
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock (Praos (EraCrypto era)) era)
     (NonMyopicMemberRewards (EraCrypto era))
forall era proto.
Set (Either Coin (Credential 'Staking (EraCrypto era)))
-> BlockQuery
     (ShelleyBlock proto era) (NonMyopicMemberRewards (EraCrypto era))
GetNonMyopicMemberRewards Set (Either Coin (Credential 'Staking (EraCrypto era)))
forall a. Set a
Set.empty)
                                     (Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
-> NonMyopicMemberRewards (EraCrypto era)
forall c.
Map
  (Either Coin (Credential 'Staking c))
  (Map (KeyHash 'StakePool c) Coin)
-> NonMyopicMemberRewards c
NonMyopicMemberRewards (Map
   (Either Coin (Credential 'Staking (EraCrypto era)))
   (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
 -> NonMyopicMemberRewards (EraCrypto era))
-> Map
     (Either Coin (Credential 'Staking (EraCrypto era)))
     (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
-> NonMyopicMemberRewards (EraCrypto era)
forall a b. (a -> b) -> a -> b
$ Map
  (Either Coin (Credential 'Staking (EraCrypto era)))
  (Map (KeyHash 'StakePool (EraCrypto era)) Coin)
sreNonMyopicRewards))
        , (String
"GenesisConfig",          BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
-> CompactGenesis (EraCrypto era)
-> SomeResult (ShelleyBlock (Praos (EraCrypto era)) era)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult BlockQuery
  (ShelleyBlock (Praos (EraCrypto era)) era)
  (CompactGenesis (EraCrypto era))
forall proto era.
BlockQuery
  (ShelleyBlock proto era) (CompactGenesis (EraCrypto era))
GetGenesisConfig (ShelleyGenesis (EraCrypto era) -> CompactGenesis (EraCrypto era)
forall c. ShelleyGenesis c -> CompactGenesis c
compactGenesis ShelleyGenesis (EraCrypto era)
sreShelleyGenesis))
        ]
    annTip :: AnnTip (ShelleyBlock (Praos (EraCrypto era)) era)
annTip = AnnTip {
        annTipSlotNo :: SlotNo
annTipSlotNo  = Word64 -> SlotNo
SlotNo Word64
14
      , annTipBlockNo :: BlockNo
annTipBlockNo = Word64 -> BlockNo
BlockNo Word64
6
      , annTipInfo :: TipInfo (ShelleyBlock (Praos (EraCrypto era)) era)
annTipInfo    = TipInfo (ShelleyBlock (Praos (EraCrypto era)) era)
ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
hash
      }
    ledgerState :: LedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
ledgerState = ShelleyLedgerState {
        shelleyLedgerTip :: WithOrigin (ShelleyTip (Praos (EraCrypto era)) era)
shelleyLedgerTip        = ShelleyTip (Praos (EraCrypto era)) era
-> WithOrigin (ShelleyTip (Praos (EraCrypto era)) era)
forall t. t -> WithOrigin t
NotOrigin ShelleyTip {
                                    shelleyTipSlotNo :: SlotNo
shelleyTipSlotNo  = Word64 -> SlotNo
SlotNo Word64
9
                                  , shelleyTipBlockNo :: BlockNo
shelleyTipBlockNo = Word64 -> BlockNo
BlockNo Word64
3
                                  , shelleyTipHash :: HeaderHash (ShelleyBlock (Praos (EraCrypto era)) era)
shelleyTipHash    = HeaderHash (ShelleyBlock (Praos (EraCrypto era)) era)
ShelleyHash (ProtoCrypto (Praos (EraCrypto era)))
hash
                                  }
    , shelleyLedgerState :: NewEpochState era
shelleyLedgerState      = NewEpochState era
sleNewEpochState
    , shelleyLedgerTransition :: ShelleyTransition
shelleyLedgerTransition = ShelleyTransitionInfo {shelleyAfterVoting :: Word32
shelleyAfterVoting = Word32
0}
    }
    chainDepState :: ChainDepState (Praos (EraCrypto era))
chainDepState = Proxy (TPraos (EraCrypto era), Praos (EraCrypto era))
-> ChainDepState (TPraos (EraCrypto era))
-> ChainDepState (Praos (EraCrypto era))
forall protoFrom protoTo.
TranslateProto protoFrom protoTo =>
Proxy (protoFrom, protoTo)
-> ChainDepState protoFrom -> ChainDepState protoTo
translateChainDepState (forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @(TPraos (EraCrypto era), Praos (EraCrypto era)))
      (ChainDepState (TPraos (EraCrypto era))
 -> ChainDepState (Praos (EraCrypto era)))
-> ChainDepState (TPraos (EraCrypto era))
-> ChainDepState (Praos (EraCrypto era))
forall a b. (a -> b) -> a -> b
$ WithOrigin SlotNo
-> ChainDepState (EraCrypto era) -> TPraosState (EraCrypto era)
forall c. WithOrigin SlotNo -> ChainDepState c -> TPraosState c
TPraosState (SlotNo -> WithOrigin SlotNo
forall t. t -> WithOrigin t
NotOrigin SlotNo
1) ChainDepState (EraCrypto era)
sleChainDepState
    extLedgerState :: ExtLedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
extLedgerState = LedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
-> HeaderState (ShelleyBlock (Praos (EraCrypto era)) era)
-> ExtLedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
forall blk.
LedgerState blk -> HeaderState blk -> ExtLedgerState blk
ExtLedgerState
                       LedgerState (ShelleyBlock (Praos (EraCrypto era)) era)
ledgerState
                       (ChainDepState
  (BlockProtocol (ShelleyBlock (Praos (EraCrypto era)) era))
-> HeaderState (ShelleyBlock (Praos (EraCrypto era)) era)
forall blk. ChainDepState (BlockProtocol blk) -> HeaderState blk
genesisHeaderState ChainDepState
  (BlockProtocol (ShelleyBlock (Praos (EraCrypto era)) era))
ChainDepState (Praos (EraCrypto era))
chainDepState)



examplesShelley :: Examples StandardShelleyBlock
examplesShelley :: Examples StandardShelleyBlock
examplesShelley = ShelleyLedgerExamples StandardShelley
-> Examples
     (ShelleyBlock (TPraos (EraCrypto StandardShelley)) StandardShelley)
forall era.
ShelleyCompatible (TPraos (EraCrypto era)) era =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (TPraos (EraCrypto era)) era)
fromShelleyLedgerExamples ShelleyLedgerExamples StandardShelley
ledgerExamplesShelley

examplesAllegra :: Examples StandardAllegraBlock
examplesAllegra :: Examples StandardAllegraBlock
examplesAllegra = ShelleyLedgerExamples StandardAllegra
-> Examples
     (ShelleyBlock (TPraos (EraCrypto StandardAllegra)) StandardAllegra)
forall era.
ShelleyCompatible (TPraos (EraCrypto era)) era =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (TPraos (EraCrypto era)) era)
fromShelleyLedgerExamples ShelleyLedgerExamples StandardAllegra
ledgerExamplesAllegra

examplesMary :: Examples StandardMaryBlock
examplesMary :: Examples StandardMaryBlock
examplesMary = ShelleyLedgerExamples StandardMary
-> Examples
     (ShelleyBlock (TPraos (EraCrypto StandardMary)) StandardMary)
forall era.
ShelleyCompatible (TPraos (EraCrypto era)) era =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (TPraos (EraCrypto era)) era)
fromShelleyLedgerExamples ShelleyLedgerExamples StandardMary
ledgerExamplesMary

examplesAlonzo :: Examples StandardAlonzoBlock
examplesAlonzo :: Examples StandardAlonzoBlock
examplesAlonzo = ShelleyLedgerExamples StandardAlonzo
-> Examples
     (ShelleyBlock (TPraos (EraCrypto StandardAlonzo)) StandardAlonzo)
forall era.
ShelleyCompatible (TPraos (EraCrypto era)) era =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (TPraos (EraCrypto era)) era)
fromShelleyLedgerExamples ShelleyLedgerExamples StandardAlonzo
ledgerExamplesAlonzo

examplesBabbage :: Examples StandardBabbageBlock
examplesBabbage :: Examples StandardBabbageBlock
examplesBabbage = ShelleyLedgerExamples StandardBabbage
-> Examples
     (ShelleyBlock (Praos (EraCrypto StandardBabbage)) StandardBabbage)
forall era.
(ShelleyCompatible (Praos (EraCrypto era)) era,
 TranslateProto (TPraos (EraCrypto era)) (Praos (EraCrypto era))) =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (Praos (EraCrypto era)) era)
fromShelleyLedgerExamplesPraos ShelleyLedgerExamples StandardBabbage
ledgerExamplesBabbage

examplesConway :: Examples StandardConwayBlock
examplesConway :: Examples StandardConwayBlock
examplesConway = ShelleyLedgerExamples StandardConway
-> Examples
     (ShelleyBlock (Praos (EraCrypto StandardConway)) StandardConway)
forall era.
(ShelleyCompatible (Praos (EraCrypto era)) era,
 TranslateProto (TPraos (EraCrypto era)) (Praos (EraCrypto era))) =>
ShelleyLedgerExamples era
-> Examples (ShelleyBlock (Praos (EraCrypto era)) era)
fromShelleyLedgerExamplesPraos ShelleyLedgerExamples StandardConway
ledgerExamplesConway