-
Notifications
You must be signed in to change notification settings - Fork 158
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
remove annotators from PParams FromCBOR instances #2190
Conversation
6cf05ac
to
fe69982
Compare
@@ -507,13 +491,12 @@ pattern OtherView n <- LangDepViewConstr (Memo (RawOtherView cm) _) | |||
|
|||
{-# COMPLETE PlutusView {- OtherView -} #-} | |||
|
|||
instance (Typeable era) => FromCBOR (Annotator (LangDepView era)) where | |||
instance (Typeable era) => FromCBOR (LangDepView era) where |
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.
This is probably never used
FromCBOR (PParamsDelta era), | ||
ToCBOR (PParamsDelta era) | ||
) => | ||
FromCBOR (Annotator (TxBodyRaw 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.
Any site using this instance is probably doing something wrong
This is to satisfy the constraints of the FromCBOR
instance of Mem
@@ -165,16 +164,22 @@ deriving instance | |||
(NoThunks (Value era), NoThunks (PParamsDelta era)) => | |||
NoThunks (TxBodyRaw era) | |||
|
|||
instance (FamsFrom era) => FromCBOR (Annotator (TxBodyRaw era)) where | |||
instance (FamsFrom era) => FromCBOR (TxBodyRaw era) where |
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.
This instance is legit
bodyFields | ||
[(0, "inputs"), (1, "outputs"), (2, "txfee")] | ||
) | ||
|
||
instance | ||
(FamsFrom era) => | ||
FromCBOR (Annotator (TxBodyRaw 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.
This instance is [not] sketch
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!
I have exchanged all the
FromCBOR (Annotator PParams)
instances forFromCBOR PParams
instances, in all eras. And similarly all the type up toNewEpochState
that were forced to be annotated due to thePParams
.(This PR does not make the change so that the language view of the parameters stores it's own hash, I'll do that next).