Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: dummy ProtocolParameters #6131

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
687 changes: 687 additions & 0 deletions bench/tx-generator/src/Cardano/Api/Internal/ProtocolParameters.hs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import qualified Data.Attoparsec.ByteString as Atto
import qualified Data.Yaml as Yaml (encode)

import Cardano.Api
import Cardano.Api.Shelley (ProtocolParameters)
import Cardano.Api.Internal.ProtocolParameters (ProtocolParameters)

import Cardano.Benchmarking.Script.Types
import Cardano.TxGenerator.Internal.Orphans ()
Expand Down
8 changes: 4 additions & 4 deletions bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
module Cardano.Benchmarking.Script.Core
where

import Cardano.Api
import Cardano.Api.Shelley (PlutusScriptOrReferenceInput (..), ProtocolParameters,
ShelleyLedgerEra, convertToLedgerProtocolParameters, protocolParamMaxTxExUnits,
protocolParamPrices)
import Cardano.Api hiding (toLedgerPParams, fromLedgerPParams)
import Cardano.Api.Shelley (PlutusScriptOrReferenceInput (..),
ShelleyLedgerEra)
import Cardano.Api.Internal.ProtocolParameters (toLedgerPParams, fromLedgerPParams, ProtocolParameters, convertToLedgerProtocolParameters, protocolParamPrices, protocolParamMaxTxExUnits)

import Cardano.Benchmarking.GeneratorTx as GeneratorTx (AsyncBenchmarkControl)
import qualified Cardano.Benchmarking.GeneratorTx as GeneratorTx (waitBenchmark, walletBenchmark)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module Cardano.Benchmarking.Script.Types (

import Cardano.Api
import qualified Cardano.Api.Ledger as L
import Cardano.Api.Shelley
import Cardano.Api.Internal.ProtocolParameters (ProtocolParameters)

import Cardano.Benchmarking.OuroborosImports (SigningKeyFile)
import Cardano.Node.Configuration.NodeAddress (NodeIPv4Address)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Cardano.TxGenerator.PlutusContext
where

import Cardano.Api
import Cardano.Api.Shelley (ProtocolParameters (..))
import Cardano.Api.Internal.ProtocolParameters (ProtocolParameters (..))

import Cardano.Ledger.Coin (Coin)
import Cardano.TxGenerator.Setup.Plutus (preExecutePlutusScript)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Cardano.TxGenerator.PureExample
where

import Cardano.Api
import Cardano.Api.Shelley (convertToLedgerProtocolParameters)
import Cardano.Api.Internal.ProtocolParameters (convertToLedgerProtocolParameters)

import qualified Cardano.Ledger.Coin as L
import Cardano.TxGenerator.FundQueue
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import Control.Monad.Writer (runWriter)
import Cardano.CLI.Read (readFileScriptInAnyLang)

import Cardano.Api
import Cardano.Api.Shelley (PlutusScript (..), ProtocolParameters (..), fromAlonzoExUnits,
protocolParamCostModels, toPlutusData)
import Cardano.Api.Shelley (PlutusScript (..), fromAlonzoExUnits, toPlutusData)
import Cardano.Api.Internal.ProtocolParameters (ProtocolParameters (..))
import Cardano.Ledger.Plutus.TxInfo (exBudgetToExUnits)

import qualified PlutusLedgerApi.V1 as PlutusV1
Expand Down
3 changes: 1 addition & 2 deletions bench/tx-generator/src/Cardano/TxGenerator/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ module Cardano.TxGenerator.Types
where

import Cardano.Api
import Cardano.Api.Shelley (ProtocolParameters)

import Cardano.Api.Internal.ProtocolParameters (ProtocolParameters)
import qualified Cardano.Ledger.Coin as L
import Cardano.Ledger.Crypto (StandardCrypto)
import qualified Cardano.Ledger.Shelley.API as Ledger (ShelleyGenesis)
Expand Down
3 changes: 2 additions & 1 deletion bench/tx-generator/test/ApiTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ module Main (module Main) where

import Cardano.Api
import qualified Cardano.Api.Ledger as Api
import Cardano.Api.Shelley (ProtocolParameters (..), fromPlutusData)
import Cardano.Api.Shelley (fromPlutusData)
import Cardano.Api.Internal.ProtocolParameters (ProtocolParameters (..))

#ifdef WITH_LIBRARY
import Cardano.Benchmarking.PlutusScripts
Expand Down
8 changes: 7 additions & 1 deletion bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ library
-- TODO: switch back to -Wwarn=deprecations having dropped Cardano.Api.ProtocolParameters.ProtocolParameters in favour of Cardano.Api.Ledger.PParams
-Wno-deprecations

exposed-modules: Cardano.Benchmarking.Command
exposed-modules: Cardano.Api.Internal.ProtocolParameters
Cardano.Benchmarking.Command
Cardano.Benchmarking.Compiler
Cardano.Benchmarking.GeneratorTx
Cardano.Benchmarking.GeneratorTx.NodeToNode
Expand Down Expand Up @@ -159,6 +160,11 @@ library
, unordered-containers
, yaml

-- Needed by "Data.Either.Combinators (maybeToRight)"
, either
, scientific
, cardano-ledger-babbage >=1.9

default-language: Haskell2010
default-extensions: OverloadedStrings

Expand Down
Loading