Plutus cost model: validate sizes in genesis files#724
Conversation
e7abb54 to
82c6d28
Compare
82c6d28 to
6632c4c
Compare
| , protocolUpdateUTxOCostPerByte = Nothing | ||
| } | ||
| where | ||
| mCostModels :: Maybe (Plutus.CostModels) |
Check warning
Code scanning / hlint
Redundant bracket
| costModels :: Either | ||
| CostModelNotEnoughParametersError | ||
| (Maybe (Map AnyPlutusScriptVersion CostModel)) | ||
| costModels = sequence $ fromAlonzoCostModels <$> mCostModels |
Check warning
Code scanning / hlint
Use mapM
| (\(Ledger.ProtVer a b) -> (Ledger.getVersion a, b)) | ||
| <$> strictMaybeToMaybe (ppu ^. ppuProtocolVersionL) | ||
| } | ||
| (fromAlonzoCommonPParamsUpdate ppu) <&> \ppu' -> |
Check notice
Code scanning / hlint
Redundant bracket
| (fromAlonzoCommonPParamsUpdate ppu) | ||
| { protocolUpdateUTxOCostPerByte = unCoinPerByte <$> strictMaybeToMaybe (ppu ^. ppuCoinsPerUTxOByteL) | ||
| } | ||
| (fromAlonzoCommonPParamsUpdate ppu) <&> \ppu' -> |
Check notice
Code scanning / hlint
Redundant bracket
| (\(Ledger.ProtVer a b) -> (Ledger.getVersion a, b)) | ||
| <$> strictMaybeToMaybe (ppu ^. ppuProtocolVersionL) | ||
| } | ||
| (fromBabbageCommonPParamsUpdate ppu) <&> \ppu' -> |
Check notice
Code scanning / hlint
Redundant bracket
| (fromAlonzoPParams pp) | ||
| { protocolParamUTxOCostPerByte = Just . unCoinPerWord $ pp ^. ppCoinsPerUTxOWordL | ||
| } | ||
| (fromAlonzoPParams pp) <&> \pp' -> |
Check notice
Code scanning / hlint
Redundant bracket
| { protocolParamUTxOCostPerByte = Just . unCoinPerByte $ pp ^. ppCoinsPerUTxOByteL | ||
| , protocolParamDecentralization = Nothing | ||
| } | ||
| (fromAlonzoPParams pp) <&> \pp' -> |
Check notice
Code scanning / hlint
Redundant bracket
3d6de33 to
dc0d52b
Compare
dc0d52b to
bb8f66f
Compare
bb8f66f to
2a1154b
Compare
| fromAlonzoCostModel :: Alonzo.CostModel -> CostModel | ||
| fromAlonzoCostModel m = CostModel $ Alonzo.getCostModelParams m | ||
|
|
||
| validateCostModelSize |
|
This PR is stale because it has been open 45 days with no activity. |
|
This PR is stale because it has been open 45 days with no activity. |
|
This PR is stale because it has been open 45 days with no activity. |
|
This PR is stale because it has been open 45 days with no activity. |
|
This PR is stale because it has been open 45 days with no activity. |
|
This PR is stale because it has been open 45 days with no activity. |
|
Closing — this PR has been open for over 14 months, is conflicting with master, and has had no activity. The approach of validating cost model sizes at deserialization time can be revisited in a fresh PR if still needed. |
Changelog
Context
API part of IntersectMBO/cardano-cli#928
How to trust this PR
TBD
Checklist