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

Kwxm/specification/bitwise #6426

Merged
merged 18 commits into from
Oct 10, 2024
Merged

Kwxm/specification/bitwise #6426

merged 18 commits into from
Oct 10, 2024

Conversation

kwxm
Copy link
Contributor

@kwxm kwxm commented Aug 20, 2024

This adds the specifications of the new bytestring operations and rimpemd_160 to the PLC specification. Most of the new content is in Section 4.3.2 (in cardano/builtins-5.tex). I had to rearrange the notation a bit and also "improved" some of the LaTeX, which has added some changes that are irrelevant to the main purpose of the PR.

A PDF including the updates is attached (recent changes included).
plutus-core-specification.pdf

@kwxm kwxm added Specification Builtins No Changelog Required Add this to skip the Changelog Check labels Aug 20, 2024
@kwxm kwxm requested review from ramsay-t and zliu41 August 20, 2024 13:33
@kwxm
Copy link
Contributor Author

kwxm commented Aug 20, 2024

This fixes #6304 and #6394.

@kwxm
Copy link
Contributor Author

kwxm commented Aug 24, 2024

Oops. I totally messed up the specification of and/or/xorByteString. When the inputs have different lengths the padding/truncation happens on the right,not the left. I'll fix that.

@kwxm
Copy link
Contributor Author

kwxm commented Sep 10, 2024

The and/or/xor problem should be fixed now.

@kwxm kwxm mentioned this pull request Oct 1, 2024
11 tasks
@kwxm
Copy link
Contributor Author

kwxm commented Oct 8, 2024

We'll probably need to move writeBits into the Chang+2 section, but that only exists in this PR, which will have to be rebased on this one. The best approach is probably to merge this PR and that one first, then move writeBits into the appropriate section.

\errorX & \text{otherwise}
\end{cases}$}
& Yes & \\[14mm] %% Odd, but it gives reasonable spacing
\TT{writeBits} & $[\ty{bytestring}, \listOf{\ty{integer}}, $
Copy link
Member

Choose a reason for hiding this comment

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

This is outdated, and I don't think writeBits will make it to Chang+1, as node 10.0 release is imminent, so you may want to remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the previous comment.

@@ -106,6 +106,7 @@ \section{Ledger languages}
\LL{PlutusV2} & 7.0 & Batch 2 \\
\LL{PlutusV2} & 8.0 & Batch 3 \\
\LL{PlutusV3} & 9.0 & Batch 4 \\
\LL{PlutusV3} & 10.0 & Batch 5 \\
Copy link
Member

Choose a reason for hiding this comment

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

This is for future work: we'll need to rework or remove this table, since it would no longer make sense when we start enabling existing builtins for Plutus V1 and V2.

Copy link
Contributor Author

@kwxm kwxm Oct 8, 2024

Choose a reason for hiding this comment

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

See this issue and this comment in @bezirg 's PR.

@zliu41
Copy link
Member

zliu41 commented Oct 8, 2024

We'll probably need to move writeBits into the Chang+2 section

Since we are changing the type signature of writeBits, I'd suggest removing it from this PR and re-adding it later.

@kwxm
Copy link
Contributor Author

kwxm commented Oct 10, 2024

We'll probably need to move writeBits into the Chang+2 section

Since we are changing the type signature of writeBits, I'd suggest removing it from this PR and re-adding it later.

It looks like it'll get into Chang+1, so I'll leave it in. I've updated the specification of writeBits to reflect the change as well: it's a lot simpler now.

@kwxm kwxm merged commit 04ef6f2 into master Oct 10, 2024
22 checks passed
@kwxm kwxm deleted the kwxm/specification/bitwise branch October 10, 2024 13:42
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 Specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants