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

remove annotators from PParams FromCBOR instances #2190

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

JaredCorduan
Copy link
Contributor

I have exchanged all the FromCBOR (Annotator PParams) instances for FromCBOR PParams instances, in all eras. And similarly all the type up to NewEpochState that were forced to be annotated due to the PParams.

(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).

@@ -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
Copy link
Contributor

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))
Copy link
Contributor

@redxaxder redxaxder Mar 22, 2021

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
Copy link
Contributor

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))
Copy link
Contributor

@redxaxder redxaxder Mar 22, 2021

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

Copy link
Contributor

@nc6 nc6 left a comment

Choose a reason for hiding this comment

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

LGTM!

@JaredCorduan JaredCorduan merged commit 2b00c29 into master Mar 22, 2021
@iohk-bors iohk-bors bot deleted the jc/remove-pparam-annotators branch March 22, 2021 15:19
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

3 participants