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

Decide how to deal with multiple cost models in the tests #6088

Open
kwxm opened this issue May 22, 2024 · 4 comments
Open

Decide how to deal with multiple cost models in the tests #6088

kwxm opened this issue May 22, 2024 · 4 comments
Labels

Comments

@kwxm
Copy link
Contributor

kwxm commented May 22, 2024

PR #6087 introduces multiple cost models for Plutus Core. There are many budget tests which currently only use the latest cost model. We should decide what do do with these: for example, should we run the tests with every cost model and have a golden file for each?

@kwxm kwxm added Test Costing Anything relating to costs, fees, gas, etc. Internal Plutus Ledger API labels May 22, 2024
@kwxm
Copy link
Contributor Author

kwxm commented May 23, 2024

Something else to consider is that not all builtins are available in all Plutus Language versions. The on-chain deserialisation process checks for the use of unavailable builtiins and fails if any are found. However many (most?) of our tests are either read from textual UPLC or compiled from PlutusTx and no check for availability is performed, so you can run a program containing a builtin which is actually illegal for the PV/LL in use. We might want to serialise and then deserialise again before test execution in order to avoid this. The same could be done for uplc and so on. In fact, unavailable builtins are currently detected in these situations by giving them costing functions which are maximally expensive, but this isn't ideal and may change. Also this technique is slightly weaker than the deserialisation check because that will reject a script immediately if it contains a prohibited builtin whereas using an expensive costing function will only detect a prohibited builtin when it is called, which may never happen,

@kwxm
Copy link
Contributor Author

kwxm commented May 28, 2024

We may also want to think about nofib-exe. For instance how do we evaluate terms? Do we want a flag saying which Plutus/PV/cost model to use?

@kwxm
Copy link
Contributor Author

kwxm commented May 28, 2024

Also decide what to do with defaultCostModelParams.json.

@kwxm
Copy link
Contributor Author

kwxm commented May 28, 2024

Maybe get rid of defaultCekParametersForTesting altogether: see this comment on PR #6087.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants