-
Notifications
You must be signed in to change notification settings - Fork 724
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
Extend Cardano.Api.ProtocolParameters with Alonzo params #2699
Extend Cardano.Api.ProtocolParameters with Alonzo params #2699
Conversation
Note that this extends the branch for PR #2657 so ignore the first 3 commits, and this will need to be rebased after that goes in. This PR is a rebased and tidied up version of PR #2634 by @Jimbo4350. If we're happy with this one we can close the original. (I opened it as a new one entirely since it's actually substantially different so I didn't want to just force push over the top.) |
-- | Cost in ada per word of UTxO storage. | ||
-- | ||
-- /Introduced in Alonzo/ | ||
protocolParamUTxOCostPerWord :: Maybe Lovelace, |
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.
Hi @dcoutts
Does "word" in this context refer to the size of a Data.Word
?
(I notice that we still use "byte" elsewhere, for example, in txFeePerByte
, so I'm guessing the differentiation is deliberate in some way.)
Apologies for the drive-by comment, the PR title piqued my interest and decided to have a look. 😄
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 Alonzo, the protocol parameter
minUTxOValue
is deprecated, and replaced byadaPerUTxOWord
.
This specifies directly the deposit required for storing bytes of data on the ledger in the form of
UTxO entries
It's not clear to me that word means byte, but I think so.
maryProtVer = | ||
ProtVer 4 0 | ||
if npcTestEnableUnstableEras |
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.
Is this to enable testing of a hardfork to Alonzo before consensus has merged their changes?
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. Though I've now moved this patch into this PR instead: #2400
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.
LGTM, but somebody else should approve
e7e87e0
to
3f94692
Compare
3f94692
to
941bca7
Compare
941bca7
to
fe13a75
Compare
fe13a75
to
9d89996
Compare
Needed for using Plutus script witnesses and for protocol parameters. Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
And make it an instance of To/FromJSONKey. We will use this type in the protocol params to index the per-language cost models and prices.
displayError (ScriptDecodeTextEnvelopeError err) = | ||
"Error decoding script: " ++ displayError err | ||
displayError (ScriptDecodeSimpleScriptError err) = | ||
"Syncax error in script: " ++ displayError err |
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.
Typo Syncax
Both ProtocolParameters and ProtocolParametersUpdate. We use AnyPlutusScriptVersion as the map key for the per-language cost models and prices. Conversion functions not yet extended. Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
9d89996
to
91b3d6c
Compare
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.
LGTM
bors merge |
Build succeeded: |
PlutusScriptVersion
type which previously had no constructors at all.ProtocolParameters
andProtocolParametersUpdate
.