-
Notifications
You must be signed in to change notification settings - Fork 501
Add memory models for valueData and unValueData #7520
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
base: master
Are you sure you want to change the base?
Conversation
|
I think the easiest way to deal with this would just be to extract the parts that I need and copy them into my branch. |
| such situations. To ensure non-negative memory costs, we further overapproximate the formula | ||
| to remove the negative intercept: | ||
| Memory = 21*(n/2) + 12 = 10.5*n + 12 --approx--> 11*n + 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the problem is negative intercept, why not just make intercept 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the intercept is 0 then for an empty result the memory will be 0 which I don't think we want. Also, I don't really like the way I had to approximate things here, ideally we'd have a way to differentiate between the two cases (empty and non-empty) but I don't think that's possible with the current costing framework.
I've done this now: other things had changed in |
|
@kwxm should I just close this PR then? |
Fixes https://github.com/IntersectMBO/plutus-private/issues/2018
Depends on
DataNodeCountfrom @kwxm 's branch: https://github.com/IntersectMBO/plutus/compare/kwxm/costing/fix-valueData