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

the alonzo UTxO rule to use alonzo minfee function #2936

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

JaredCorduan
Copy link
Contributor

A bug was introduced, causing the Alonzo UTxO rule to use the Shelley minfee function instead of the Alonzo version. This PR reverts that.

Additionally, a new golden test for the Alonzo fee calculation has been added, using the block from:
IntersectMBO/cardano-node#4228 (comment)

I will cherry pick the commit in this PR onto the release branch release/1.0.0 after this PR is merged.

resolves IntersectMBO/cardano-node#4228

@@ -295,9 +294,11 @@ feesOK pp tx (UTxO utxo) =
-- restrict Utxo to those inputs we use to pay fees.
utxoCollateral = eval (collateral ◁ utxo)
bal = balance @era (UTxO utxoCollateral)
theFee = txBody ^. feeTxBodyL
Copy link
Contributor

Choose a reason for hiding this comment

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

The first usage of our new lens friends 😀

Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I was going through the commit that introduced the problem, and was wondering about two other cases that are reusing a Shelley function (and also using pp, which from my understanding was the problem - I might be wrong!)

Anyway, just some questions based on perhaps vague understanding- sorry if I'm barking up the wrong tree here!

@JaredCorduan
Copy link
Contributor Author

Thank you so much @teodanciu for checking out the rest of the refactor!

  • The use of ShelleyMA.validateValueNotConservedUTxO looks fine to me, for the reason you stated, it uses Shelley.produced as before.
  • The use of Shelley.validateMaxTxSizeUTxO also looks fine to me, maxTxSize is a protocol parameter that has not changed since Shelley.

Thanks again for looking out for more trouble!

Copy link
Contributor

@TimSheard TimSheard left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Additionally, a new golden test for the alonzo fee calculation has been
added, using the block from:
IntersectMBO/cardano-node#4228 (comment)
@JaredCorduan JaredCorduan merged commit dd4b6e3 into master Jul 28, 2022
@iohk-bors iohk-bors bot deleted the jc/fix-alonzo-minfee branch July 28, 2022 17:56
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.

[BUG] - 1.35.* v7 nodes on Mainnet are picking up the wrong parent-block - Vasil HF Blocker?
3 participants