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

CIP-0138 array #6749

Open
wants to merge 6 commits into
base: yura/cip-0138-builtin-array
Choose a base branch
from

Conversation

Unisay
Copy link
Contributor

@Unisay Unisay commented Dec 13, 2024

Closes ##6731

@Unisay Unisay self-assigned this Dec 13, 2024
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 1599c6d to 074629d Compare December 13, 2024 11:46
@Unisay Unisay changed the base branch from master to yura/cip-0138-builtin-array December 13, 2024 11:48
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 074629d to e6dad3a Compare December 13, 2024 14:44
@Unisay Unisay added No Changelog Required Add this to skip the Changelog Check and removed Don't look here yet labels Dec 13, 2024
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 5f9e7e1 to 58f219c Compare December 16, 2024 10:54
@Unisay Unisay marked this pull request as ready for review December 16, 2024 10:59
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 58f219c to d48a07a Compare December 16, 2024 11:08
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from d48a07a to 1f4f7cb Compare December 16, 2024 12:52
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 1f4f7cb to 850bb4d Compare December 16, 2024 13:19
@Unisay Unisay force-pushed the yura/cip-0138-builtin-array branch from fe5c0a3 to 2ac9dba Compare December 16, 2024 13:24
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 850bb4d to 19d137e Compare December 16, 2024 13:26
@Unisay Unisay requested a review from ana-pantilie December 16, 2024 13:52
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 19d137e to a10f2fa Compare December 16, 2024 13:55
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from a10f2fa to c3b233f Compare December 16, 2024 13:59
Copy link
Contributor

@ana-pantilie ana-pantilie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't implement the builtin functions, right? It just defines them and the compiler recognizes them as builtins, but the evaluator doesn't yet know how to evaluate them. I assume that will be done in a separate commit/PR.

@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from c3b233f to 514b31a Compare December 16, 2024 16:08
@@ -97,6 +97,12 @@ data ParamName =
| FstPair'memory'arguments
| HeadList'cpu'arguments
| HeadList'memory'arguments
| LengthArray'cpu'arguments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New parameters must be appended, not inserted in the middle.

And these names don't seem accurate - e.g., ListToArray is linear, so there needs to be an intercept and a slope. If they aren't accurate, then I'm not sure what the point is adding them at all. @kwxm What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also these need to be added to V1 and V2 as well.

Copy link
Contributor Author

@Unisay Unisay Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New parameters must be appended, not inserted in the middle.

👍🏼 I wrote a golden test which will fail if this condition is violated

And these names don't seem accurate - e.g., ListToArray is linear, so there needs to be an intercept and a slope. If they aren't accurate, then I'm not sure what the point is adding them at all.

The point is to make build green. Some parameters have to be added, otherwise CI tests fail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote a golden test which will fail if this condition is violated

How do we update the golden file when new parameters are added?

The point is to make build green. Some parameters have to be added, otherwise CI tests fail.

I'll let @kwxm check whether this is the right thing to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we update the golden file when new parameters are added?

cabal test plutus-ledger-api-test fails if new parameter names were inserted in the middle, not appended.
cabal test plutus-ledger-api-test --test-options --accept updates the golden file.

@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from 48a36dc to 00e6771 Compare December 17, 2024 13:57
@Unisay Unisay requested a review from zliu41 December 17, 2024 13:57
@Unisay Unisay force-pushed the yura/cip-0138-plinth-array branch from ca42326 to a0268bc Compare December 17, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builtins No Changelog Required Add this to skip the Changelog Check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants