-
Notifications
You must be signed in to change notification settings - Fork 166
Added Dijkstra UTXO rule and collateral Ptr check
#5458
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
base: master
Are you sure you want to change the base?
Conversation
24d0ccb to
669b2a0
Compare
UTXO rule and collateral Ptr check
487ceae to
170e595
Compare
170e595 to
6d10eec
Compare
teodanciu
left a comment
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.
Looks good to me, except for this which I believe we don't want to do:
data DijkstraUtxoPredFailure era = ConwayInDijkstraUtxoPredFailure (ConwayUtxoPredFailure era)
| , Signal (EraRule "UTXO" era) ~ Tx TopTx era | ||
| , BaseM (EraRule "UTXO" era) ~ ShelleyBase | ||
| , STS (EraRule "UTXO" era) | ||
| , -- In this function we we call the UTXOS rule, so we need some assumptions |
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.
Accidental double
| , -- In this function we we call the UTXOS rule, so we need some assumptions | |
| , -- In this function we call the UTXOS rule, so we need some assumptions |
| , Signal (EraRule "UTXO" era) ~ Tx TopTx era | ||
| , BaseM (EraRule "UTXO" era) ~ ShelleyBase | ||
| , STS (EraRule "UTXO" era) | ||
| , -- In this function we we call the UTXOS rule, so we need some assumptions |
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 comment no longer holds I believe
| , -- In this function we we call the UTXOS rule, so we need some assumptions |
|
|
||
| {- ‖collateral tx‖ ≤ maxCollInputs pp -} | ||
| runTest $ Alonzo.validateTooManyCollateralInputs pp txBody | ||
| pure utxos |
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.
Might it be better to return unit perhaps, to make it clear that the function doesn't change the given state?
| import Validation (failure) | ||
|
|
||
| data DijkstraUtxoPredFailure era | ||
| = ConwayInDijkstraUtxoPredFailure (ConwayUtxoPredFailure 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.
I think this wrapping of the predicate failure from the previous era is problematic - ( I don't remember exactly why...perhaps something to do with deserialization).
This issue seems to be about removing these kind of things from the code, if I'm not mistaken: #5299
Description
This PR adds
DijkstraUTXOtogether with a test that prevents using collateral return with aPtr.close #5454
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).