-
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
Adding pphash and making hash to data map #2067
Conversation
da6b396
to
a49b709
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.
Couple of changes, otherwise looks good.
data EraIndependentPP | ||
|
||
-- Hash of a subset of Protocol Parameters relevant to Plutus script evaluation | ||
newtype PPHash crypto |
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 add this to a new module (maybe Cardano.Ledger.Alonzo.ProtocolParameters
) rather than adding it to TxBody
.
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 is already a PParams
module in Alonzo, ok if I put it there?
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.
Ah, indeed, perfect!
ToCBOR (TxOut era) | ||
where | ||
toCBOR (TxOutCompact addr cv dh) = | ||
encode $ | ||
Rec TxOutCompact !> To addr !> To cv !> To dh | ||
Rec @(CompactAddr (Crypto era) -> CompactForm (Core.Value era) -> StrictMaybe (DataHash (Crypto era)) -> TxOut era) |
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 change really needed? I can't see anything in this PR which would precipitate it?
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.
changed the type application to CompactTxOut @era instead
@@ -45,9 +46,10 @@ instance Arbitrary ExUnits where | |||
arbitrary = ExUnits <$> arbitrary <*> arbitrary | |||
|
|||
instance | |||
( Era era, | |||
Mock (Crypto era), | |||
( ShelleyBased era, |
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.
We're trying to deprecate the various ShelleyBased
constraints, so you should use the various UseFoo
constraints as needed.
a89e905
to
da2ba0d
Compare
This PR
TxBody
Data
set inTxWitness
to a hash-indexed map