-
Notifications
You must be signed in to change notification settings - Fork 155
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
spec for scripts and multi-currency #3
Conversation
\caption{Scripts} | ||
\label{fig:scripts} | ||
\end{figure} | ||
|
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.
although it's an arbitrary type, T
should be mentioned and maybe renamed to R
as in the utxo/scripts paper
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.
yes, R
would be better, thanks! I was going to explain that arbitrary type in a paragraph explaining the scripts in general. Do you think I should mention R
in that figure as well?
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.
I would prefer having something like R : arbitrary return type of redeemer script / input type of validator script
, because I often quickly look at figures like this for reference.
\type{Tx} | ||
& \powerset{\type{TxIn}} \times (\type{Ix} \mapsto | ||
\type{TxOut}) \times \type{Forge} \times \type{Value} | ||
& |
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.
shouldn't the optional Create
also be part of this?
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.
yes, thanks!
\begin{equation*} | ||
tx.create.currency \notin currencies | ||
\end{equation*} | ||
|
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.
There are more validation rules in the paper, e.g., creator has enough money to cover fees, fee is non-negative. Are these implicitly present here?
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.
please check that I am correct (though we'll cover this more when doing property testing), but I think negative fees and cover fees are not an issue since this spec is UTxO only (accounts make some things trickier).
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.
thinking about this a bit more, I realize I'm making an assumption that I'm not stating, namely that Quantity is an alias for Nat. We don't need inverses/subtraction if we don't have accounts.
|
||
\todo[inline]{We need to think carefully about how to handle similar names, | ||
like ``ada", ``Ada", and ``ADA".} | ||
|
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.
in my opinion the policy should offer the lowest risk of surprises, i.e., only uppercase or only lowercase, no UTF-8 etc.
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.
I agree completely!
@JaredCorduan one thing which I was thinking about, is it possible to create a new currency |
Why not putting figure 4 and 6 as a single inference rule? |
yea, I should probably do that to be consistent with our other specs. It's just that figure 4 has so much information in it. Maybe I could define a new predicate that is just the conjunction of fig 4, and place it in a judgment style rule? |
that's an excellent point! As I have it written now it would fail, since in "forge obeys policy" the new currency is not yet inside |
@JaredCorduan right, so currently it isn't possible. But there does not seem to be any problem with allowing it, right? We do have the monetary policy from |
@mgudemann you are totally right, there is no problem, and in fact I think we want to be able to forge and create at the same time. If the script fails, then I think that the entire transaction should fail. I've just pushed a change that separates the state transition rule into two rules. And then I made a note/todo about being careful about the order in which rules are processed (with the understanding that if any rule fails validation, the transaction will not be processed at all). the other solution is to just search for policies in |
# This is the 1st commit message: Alter the endorsement registration rule, so that the set of confirmed proposals remains the same. # This is the commit message #2: Perform cleanup of confirmed proposals in the epoch change rule. # This is the commit message #3: Remove the section that expressed that there were no voting deadlines. There are now. # This is the commit message #4: Define what "endorsement" means in this context. # This is the commit message #5: Explain the acronyms used in the labels of the update-proposal interface. # This is the commit message #6: Add a figure explaining the situation with a too small endorsement window. # This is the commit message #7: Model the software update proposal in the update proposal validity rule. # This is the commit message #8: Make it possible for an update proposal not to change the protocol version.
# This is the 1st commit message: Merge branch 'spec/incentives-kh' of https://github.com/input-output-hk/cardano-ledger-specs into spec/incentives-kh # This is the commit message #2: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #3: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #4: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #5: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #6: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #7: fix user.email Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #8: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com> # This is the commit message #9: overcoming fake make error Signed-off-by: Kevin Hammond <12563287+kevinhammond@users.noreply.github.com>
…udit-pt-3 small shelley ledger spec edits from isabelle review #3
# This is the 1st commit message: Alter the endorsement registration rule, so that the set of confirmed proposals remains the same. # This is the commit message #2: Perform cleanup of confirmed proposals in the epoch change rule. # This is the commit message #3: Remove the section that expressed that there were no voting deadlines. There are now. # This is the commit message #4: Define what "endorsement" means in this context. # This is the commit message #5: Explain the acronyms used in the labels of the update-proposal interface. # This is the commit message #6: Add a figure explaining the situation with a too small endorsement window. # This is the commit message #7: Model the software update proposal in the update proposal validity rule. # This is the commit message #8: Make it possible for an update proposal not to change the protocol version.
* Add a `goldenTestCBOR` function. This function is basically a re-implementation of 'goldenTestBi', but it can be used with values of types that don't have a `Bi` instance. * Implement `goldenTestBi` in terms of `goldenTestCBOR`.
This is the beginning of a spec for a UTxO Ledger that has scripts and mutli-currency. It is essentially putting the two papers An Abstract Model of UTxO-based Cryptocurrencies with Scripts and Multi-Currency Ledgers into a rule style spec.
So far it has the types, basic functions, needed ledger state, validation rules, and a few notes about disabling multi-currency and scripts, and adding extended UTxO.