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 exunits from txbody #2166

Merged
merged 10 commits into from
Mar 4, 2021
Merged

remove exunits from txbody #2166

merged 10 commits into from
Mar 4, 2021

Conversation

polinavino
Copy link
Contributor

@polinavino polinavino commented Mar 3, 2021

  • removing ExUnits field in the body of the tx because they are already tracked in the indexed redeemer structure inside the witness section of the transaction
  • removing adHash from the body because the body contained 2 hashes of auxiliary data, and only needs 1, and renaming scriptHash (the other aux. data hash) to auxdHash to match the order in the spec

Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

LGTM

@nc6
Copy link
Contributor

nc6 commented Mar 4, 2021

Please either rebase or squash before committing.

@@ -399,18 +401,24 @@ txsize :: Tx era -> Integer
txsize (TxConstr (Memo _ bytes)) = fromIntegral (SBS.length bytes)

minfee ::
( HasField "exunits" (Core.TxBody era) ExUnits
( Era era,
ToCBOR (Core.AuxiliaryData era),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why we need this ToCBOR constraint. Where is it used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was complaining about the lack of this constraint. I saw that it was also used somewhere else where txrdmrs appeared

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ill try taking it out

where
a protparam = Coin (fromIntegral (_minfeeA protparam))
b protparam = Coin (fromIntegral (_minfeeB protparam))
totExunits = foldl (<>) mempty (snd $ unzip (Map.elems trd))
trd = getField @"txrdmrs" txw
txw = getField @"wits" tx
Copy link
Contributor

Choose a reason for hiding this comment

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

Could just inline this in the previous line

@polinavino polinavino merged commit 9041279 into master Mar 4, 2021
@iohk-bors iohk-bors bot deleted the polina/exu branch March 4, 2021 14:32
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.

3 participants