From d56504ed6448d1ff0f577dd53d8c49e1414fb653 Mon Sep 17 00:00:00 2001 From: Renate Eilers Date: Mon, 12 Aug 2024 13:45:54 +0200 Subject: [PATCH] Specialize runForge GenTxs to DiffMK --- .../Cardano/Tools/DBSynthesizer/Forging.hs | 6 +++--- .../Cardano/Tools/DBSynthesizer/Run.hs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Forging.hs b/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Forging.hs index a494301c48..3613e3b7a4 100644 --- a/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Forging.hs +++ b/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Forging.hs @@ -65,7 +65,7 @@ type GenTxs blk mk = SlotNo -> TickedLedgerState blk mk -> IO [Validated (GenTx -- For an extensive commentary of the forging loop, see there. runForge :: - forall blk mk. + forall blk. ( LedgerSupportsProtocol blk ) => EpochSize -> SlotNo @@ -73,7 +73,7 @@ runForge :: -> ChainDB IO blk -> [BlockForging IO blk] -> TopLevelConfig blk - -> GenTxs blk mk + -> GenTxs blk DiffMK -> IO ForgeResult runForge epochSize_ nextSlot opts chainDB blockForging cfg genTxs = do putStrLn $ "--> epoch size: " ++ show epochSize_ @@ -168,7 +168,7 @@ runForge epochSize_ nextSlot opts chainDB blockForging cfg genTxs = do -- Let the caller generate transactions -- TODO @js re-enable! - txs <- lift $ genTxs currentSlot $ undefined tickedLedgerState + txs <- lift $ genTxs currentSlot tickedLedgerState -- Actually produce the block newBlock <- lift $ diff --git a/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Run.hs b/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Run.hs index 0515680253..b2d0ea669f 100644 --- a/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Run.hs +++ b/ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBSynthesizer/Run.hs @@ -24,6 +24,7 @@ import Ouroboros.Consensus.Cardano.Block import Ouroboros.Consensus.Cardano.Node import Ouroboros.Consensus.Config (TopLevelConfig, configStorage) import qualified Ouroboros.Consensus.Fragment.InFuture as InFuture (dontCheck) +import Ouroboros.Consensus.Ledger.Abstract (DiffMK) import qualified Ouroboros.Consensus.Node as Node (stdMkChainDbHasFS) import qualified Ouroboros.Consensus.Node.InitStorage as Node (nodeImmutableDbChunkInfo) @@ -114,7 +115,7 @@ eitherParseJson v = case fromJSON v of synthesize :: ( TopLevelConfig (CardanoBlock StandardCrypto) - -> GenTxs (CardanoBlock StandardCrypto) mk + -> GenTxs (CardanoBlock StandardCrypto) DiffMK ) -> DBSynthesizerConfig -> (CardanoProtocolParams StandardCrypto)