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
Fix random failure: MissingScriptWitnessesUTXOW (fromList []) #3039
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TimSheard
force-pushed
the
ts-fixRandomExtraScriptWitness
branch
from
September 15, 2022 17:33
cd927a3
to
a0a513f
Compare
eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/AlonzoEraGen.hs
Outdated
Show resolved
Hide resolved
JaredCorduan
approved these changes
Sep 15, 2022
lehins
requested changes
Sep 15, 2022
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.
Thank you for finally fixing this annoyance
eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/AlonzoEraGen.hs
Outdated
Show resolved
Hide resolved
eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/AlonzoEraGen.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/Consensus.hs
Outdated
Show resolved
Hide resolved
TimSheard
force-pushed
the
ts-fixRandomExtraScriptWitness
branch
2 times, most recently
from
September 15, 2022 23:43
d755abb
to
354569e
Compare
TimSheard
force-pushed
the
ts-fixRandomExtraScriptWitness
branch
from
September 16, 2022 01:17
354569e
to
587f29a
Compare
lehins
approved these changes
Sep 16, 2022
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.
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a long time we get random, in frequent failures in the property tests labeled with
MissingScriptWitnessesUTXOW (fromList [])
This is annoying, and actually very misleading because the actual failure is that there is an extra script witness that is not actually needed. This misleading error message is caused by a long known bug that was improved by code like this
Note when (HardForks.missingScriptsSymmetricDifference pp) is False, and sRecieved is a supersetof sNeeded, we get the misleading error.
So the real problem is that the EraGen process of generating random traces, occasionally (and randomly) generates an extra script witness. It is hard to track this down. There is some evidence that this arises because the script hash appears as the PolicyId in a Value. But that is not been verified. Regardless of the cause, we fix this by
discarding the trace. Note that this is failure to generate a "random" but valid transaction. Discarding the trace adjust for this inadequacy in the generation process. This only appears in the Alonzo era, so this "fix" is applied here, in the genEraDone
method of the EraGen class in the (AlonzoEra c) instance.