Skip to content
Open
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
28 changes: 28 additions & 0 deletions cardano-api/src/Cardano/Api/ProtocolParameters.hs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ import Cardano.Ledger.Conway.PParams qualified as Ledger
import Cardano.Ledger.Dijkstra.PParams qualified as Ledger
import Cardano.Ledger.Hashes (HASH)
import Cardano.Ledger.Plutus.CostModels qualified as Plutus
import Cardano.Ledger.Plutus.ExUnits qualified as Plutus
import Cardano.Ledger.Plutus.Language qualified as Plutus
import Cardano.Ledger.Shelley.API qualified as Ledger
import Cardano.Slotting.Slot (EpochNo (..))
Expand Down Expand Up @@ -291,6 +292,15 @@ data IntroducedInDijkstraPParams era
, idMaxRefScriptSizePerTx :: StrictMaybe Word32
, idRefScriptCostStride :: StrictMaybe (Ledger.NonZero Word32)
, idRefScriptCostMultiplier :: StrictMaybe Ledger.PositiveInterval
, idLeiosAnnouncementPeriodLength :: StrictMaybe Ledger.Milliseconds32
, idLeiosVotePeriodLength :: StrictMaybe Ledger.Milliseconds32
, idLeiosDiffusionPeriodLength :: StrictMaybe Ledger.Milliseconds32
, idLeiosCommitteeSize :: StrictMaybe Word16
, idLeiosQuorumStakeThreshold :: StrictMaybe Ledger.UnitInterval
, idMaxEndorserBlockReferencesSize :: StrictMaybe Word32
, idMaxEndorserBlockTxsSize :: StrictMaybe Word32
, idMaxEndorserBlockExUnits :: StrictMaybe Plutus.OrdExUnits
, idMaxRefScriptSizePerEndorserBlock :: StrictMaybe Word32
}
deriving (Eq, Show)

Expand All @@ -304,6 +314,15 @@ createIntroducedInDijkstraPParams IntroducedInDijkstraPParams{..} =
& Ledger.ppuMaxRefScriptSizePerTxL .~ idMaxRefScriptSizePerTx
& Ledger.ppuRefScriptCostStrideL .~ idRefScriptCostStride
& Ledger.ppuRefScriptCostMultiplierL .~ idRefScriptCostMultiplier
& Ledger.ppuLeiosAnnouncementPeriodLengthL .~ idLeiosAnnouncementPeriodLength
& Ledger.ppuLeiosVotePeriodLengthL .~ idLeiosVotePeriodLength
& Ledger.ppuLeiosDiffusionPeriodLengthL .~ idLeiosDiffusionPeriodLength
& Ledger.ppuLeiosCommitteeSizeL .~ idLeiosCommitteeSize
& Ledger.ppuLeiosQuorumStakeThresholdL .~ idLeiosQuorumStakeThreshold
& Ledger.ppuMaxEndorserBlockReferencesSizeL .~ idMaxEndorserBlockReferencesSize
& Ledger.ppuMaxEndorserBlockTxsSizeL .~ idMaxEndorserBlockTxsSize
& Ledger.ppuMaxEndorserBlockExUnitsL .~ idMaxEndorserBlockExUnits
& Ledger.ppuMaxRefScriptSizePerEndorserBlockL .~ idMaxRefScriptSizePerEndorserBlock

pparamsUpdateToIntroducedInDijkstraPParams
:: Ledger.DijkstraEraPParams ledgerera
Expand All @@ -315,6 +334,15 @@ pparamsUpdateToIntroducedInDijkstraPParams ppupdate =
, idMaxRefScriptSizePerTx = ppupdate ^. Ledger.ppuMaxRefScriptSizePerTxL
, idRefScriptCostStride = ppupdate ^. Ledger.ppuRefScriptCostStrideL
, idRefScriptCostMultiplier = ppupdate ^. Ledger.ppuRefScriptCostMultiplierL
, idLeiosAnnouncementPeriodLength = ppupdate ^. Ledger.ppuLeiosAnnouncementPeriodLengthL
, idLeiosVotePeriodLength = ppupdate ^. Ledger.ppuLeiosVotePeriodLengthL
, idLeiosDiffusionPeriodLength = ppupdate ^. Ledger.ppuLeiosDiffusionPeriodLengthL
, idLeiosCommitteeSize = ppupdate ^. Ledger.ppuLeiosCommitteeSizeL
, idLeiosQuorumStakeThreshold = ppupdate ^. Ledger.ppuLeiosQuorumStakeThresholdL
, idMaxEndorserBlockReferencesSize = ppupdate ^. Ledger.ppuMaxEndorserBlockReferencesSizeL
, idMaxEndorserBlockTxsSize = ppupdate ^. Ledger.ppuMaxEndorserBlockTxsSizeL
, idMaxEndorserBlockExUnits = ppupdate ^. Ledger.ppuMaxEndorserBlockExUnitsL
, idMaxRefScriptSizePerEndorserBlock = ppupdate ^. Ledger.ppuMaxRefScriptSizePerEndorserBlockL
}

createEraBasedProtocolParamUpdate
Expand Down
Loading