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

add MIR changes to Alonzo spec #2579

Merged
merged 1 commit into from Jan 5, 2022
Merged

add MIR changes to Alonzo spec #2579

merged 1 commit into from Jan 5, 2022

Conversation

JaredCorduan
Copy link
Contributor

Additionally, added a new check to the Alonzo MIR rule that ensures that the Coin valued used in transfers (reserves <-> treasury) is always non-negative. This does mean that the predicate serialization has changed, but as this is a governance feature we should be fine (cc @nc6).

eras/alonzo/formal-spec/mir.tex Show resolved Hide resolved
\label{fig:dcert-mir-trans}
\end{figure}

\begin{figure}[ht]
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if it's worth it, but we could get rid of the code duplication in MIR by having a single rule for it and defining an acnt' to be either of the two options depending on the condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's true, as I mention in the comment above, that is actually how the code works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot to attempt this after the first review, I've done it now, see what you think. It was a bit hard to keep the horizontal space within the table, but I think it looks okay-ish. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should probably make these "reduce copy" changes to the shelley spec as well now...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I've changed the Shelley MIR transitions as well now. The compare nicely now.

eras/alonzo/formal-spec/mir.tex Show resolved Hide resolved
@JaredCorduan JaredCorduan force-pushed the jc/alonzo-mir branch 2 times, most recently from 644d829 to 3f7569a Compare December 8, 2021 21:14
eras/alonzo/formal-spec/mir.tex Show resolved Hide resolved
eras/alonzo/formal-spec/mir.tex Outdated Show resolved Hide resolved
eras/alonzo/formal-spec/mir.tex Outdated Show resolved Hide resolved
eras/alonzo/formal-spec/mir.tex Outdated Show resolved Hide resolved
eras/alonzo/formal-spec/mir.tex Show resolved Hide resolved
@JaredCorduan
Copy link
Contributor Author

I somehow broke the latex build, I will fix that tomorrow

Re-wrote the Shelley MIR transitions to be more compact
(in the style newly added to the Alonzo spec).

Additionally, added a new check to the Alonzo MIR rule (implementation)
that ensures that the Coin valued used in transfers (reserves <->
treasury) is always non-negative.
Copy link
Contributor

@WhatisRT WhatisRT left a comment

Choose a reason for hiding this comment

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

LGTM!

@WhatisRT WhatisRT merged commit f91a876 into master Jan 5, 2022
@iohk-bors iohk-bors bot deleted the jc/alonzo-mir branch January 5, 2022 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants