Skip to content

Commit efe0b3d

Browse files
authored
Merge pull request #729 from IntersectMBO/smelc/remove-protocol-parameters
Remove ProtocolParameters
2 parents 1c5de16 + 84d0510 commit efe0b3d

File tree

9 files changed

+2
-827
lines changed

9 files changed

+2
-827
lines changed

cardano-api/cardano-api.cabal

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ test-suite cardano-api-test
368368
Test.Cardano.Api.Metadata
369369
Test.Cardano.Api.Ord
370370
Test.Cardano.Api.Orphans
371-
Test.Cardano.Api.ProtocolParameters
372371
Test.Cardano.Api.RawBytes
373372
Test.Cardano.Api.Transaction.Autobalance
374373
Test.Cardano.Api.TxBody
@@ -396,7 +395,6 @@ test-suite cardano-api-golden
396395
cardano-data >=1.0,
397396
cardano-ledger-alonzo,
398397
cardano-ledger-api >=1.9,
399-
cardano-ledger-babbage >=1.9,
400398
cardano-ledger-binary,
401399
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
402400
cardano-ledger-shelley,
@@ -425,7 +423,6 @@ test-suite cardano-api-golden
425423
other-modules:
426424
Test.Golden.Cardano.Api.Genesis
427425
Test.Golden.Cardano.Api.Ledger
428-
Test.Golden.Cardano.Api.ProtocolParameters
429426
Test.Golden.Cardano.Api.Script
430427
Test.Golden.Cardano.Api.Value
431428
Test.Golden.ErrorsSpec

cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ module Test.Gen.Cardano.Api.Typed
3030
, genMaybePraosNonce
3131
, genPraosNonce
3232
, genValidProtocolParameters
33-
, genProtocolParameters
3433
, genValueNestedRep
3534
, genValueNestedBundle
3635
, genByronKeyWitness
@@ -1194,40 +1193,7 @@ genPraosNonce = makePraosNonce <$> Gen.bytes (Range.linear 0 32)
11941193
genMaybePraosNonce :: Gen (Maybe PraosNonce)
11951194
genMaybePraosNonce = Gen.maybe genPraosNonce
11961195

1197-
genProtocolParameters :: CardanoEra era -> Gen ProtocolParameters
1198-
genProtocolParameters era = do
1199-
protocolParamProtocolVersion <- (,) <$> genNat <*> genNat
1200-
protocolParamDecentralization <- Gen.maybe genRational
1201-
protocolParamExtraPraosEntropy <- genMaybePraosNonce
1202-
protocolParamMaxBlockHeaderSize <- genNat
1203-
protocolParamMaxBlockBodySize <- genNat
1204-
protocolParamMaxTxSize <- genNat
1205-
protocolParamTxFeeFixed <- genLovelace
1206-
protocolParamTxFeePerByte <- genLovelace
1207-
protocolParamMinUTxOValue <- Gen.maybe genLovelace
1208-
protocolParamStakeAddressDeposit <- genLovelace
1209-
protocolParamStakePoolDeposit <- genLovelace
1210-
protocolParamMinPoolCost <- genLovelace
1211-
protocolParamPoolRetireMaxEpoch <- genEpochInterval
1212-
protocolParamStakePoolTargetNum <- genWord16
1213-
protocolParamPoolPledgeInfluence <- genRationalInt64
1214-
protocolParamMonetaryExpansion <- genRational
1215-
protocolParamTreasuryCut <- genRational
1216-
let protocolParamCostModels = mempty
1217-
-- TODO: Babbage figure out how to deal with
1218-
-- asymmetric cost model JSON instances
1219-
protocolParamPrices <- Gen.maybe genExecutionUnitPrices
1220-
protocolParamMaxTxExUnits <- Gen.maybe genExecutionUnits
1221-
protocolParamMaxBlockExUnits <- Gen.maybe genExecutionUnits
1222-
protocolParamMaxValueSize <- Gen.maybe genNat
1223-
protocolParamCollateralPercent <- Gen.maybe genNat
1224-
protocolParamMaxCollateralInputs <- Gen.maybe genNat
1225-
protocolParamUTxOCostPerByte <-
1226-
inEonForEra @BabbageEraOnwards (pure Nothing) (const (Just <$> genLovelace)) era
1227-
1228-
pure ProtocolParameters{..}
1229-
1230-
-- | Generate valid protocol parameters which pass validations in Cardano.Api.Internal.ProtocolParameters
1196+
-- | Generate valid protocol parameters which pass validations in Cardano.Api.ProtocolParameters
12311197
genValidProtocolParameters :: ShelleyBasedEra era -> Gen (LedgerProtocolParameters era)
12321198
genValidProtocolParameters sbe = shelleyBasedEraTestConstraints sbe $ LedgerProtocolParameters <$> Q.arbitrary
12331199

cardano-api/src/Cardano/Api.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,6 @@ module Cardano.Api
976976
, ProtocolParametersConversionError (..)
977977

978978
-- ** Conversions
979-
, toLedgerPParams
980-
, fromLedgerPParams
981979
, toCtxUTxOTxOut
982980
-- TODO: arrange not to export these
983981
, fromNetworkMagic

0 commit comments

Comments
 (0)