-
Notifications
You must be signed in to change notification settings - Fork 15
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
PlutusV3 cost model update with 299 items stripped to 251 #924
Comments
The bug can also be witnessed without doing step 2, thanks to
|
Without too much surprise, this has to do with deserialization of the cost models file. At this point here:
The size of the PlutusV3 model is 251, as witnessed when debugging like this: Just (Cmd.CostModelsFile alonzoOnwards costModelsFile) -> do
liftIO $ putStrLn $ "Reading cost models from: " <> unFile costModelsFile
costModels :: L.CostModels <-
firstExceptT GovernanceActionsCmdCostModelsError $
readCostModels costModelsFile
let x = Map.size $ L.costModelToMap $ snd ((Map.toList $ L.costModelsValid costModels) !! 2)
liftIO $ putStrLn $ "PlutusV3 cost models size:" <> show x
pure . addCostModelsToEraBasedProtocolParametersUpdate alonzoOnwards costModels $
uppNewPParams eraBasedPParams' |
New V3 primitves were added in plutus-1.34 which is not integrated in Ledger uses that It's a ledger design decision to silently truncate excess parameters from cost model map, so that's why this issue is so confusing. |
We should implement cost model input validation: |
Resolved by #949 |
Description
When submitting cost model update where PlutusV3 cost model has 299 entries (this will be the case in Conway protocol version 10) and the cost model is map (not list), some of the items are stripped.
When printing out the proposal using
gov-state
, the PlutusV3 is a list of 251 items.When providing the PlutusV3 cost model items as list, the proposal has correctly 299 items.
Steps to Reproduce
Additional Context
Tested with cardano node rev
9671e7b6a1b91f5a530722937949b86deafaad43
Cost model, action and transaction: issue_cost_model_stripped.tar.gz
The text was updated successfully, but these errors were encountered: