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

Add invalid UTxO to the conformance tests #788

Closed
dnadales opened this issue Aug 22, 2019 · 0 comments · Fixed by #865
Closed

Add invalid UTxO to the conformance tests #788

dnadales opened this issue Aug 22, 2019 · 0 comments · Fixed by #865

Comments

@dnadales
Copy link
Member

Update ts_prop_invalidBlocksAreRejected in module Test.Cardano.Chain.Block.Model so that the failureProfile includes the invalid UTxO generators:

ts_prop_invalidBlocksAreRejected :: TSProperty
ts_prop_invalidBlocksAreRejected =
  withTestsTS 400  $ property $ do
    let traceLength = 100 :: Word64
    tr <- forAll $ invalidTrace @CHAIN traceLength failureProfile

...

    failureProfile :: [(Int, SignalGenerator CHAIN)]
    failureProfile = [ (1, invalidDelegationGen)
                     , (1, invalidUpdateProposalGen)

Alternatively, unfold ts_prop_invalidBlocksAreRejected into three separate tests:

  • ts_prop_invalidDelegationCertificatesAreRejected
  • ts_prop_invalidUpdatesAreRejected
  • ts_prop_invalidUTxOTransactionsAreRejected

... or something like that.

@mhuesch mhuesch added this to the Invalid chain conformance tests milestone Sep 12, 2019
mhuesch added a commit that referenced this issue Sep 19, 2019
This allows Goblin instances to be written to respect said bounds, so that we
can avoid generating invalid values which case runtime exceptions in the
test-suite.
mhuesch added a commit that referenced this issue Sep 19, 2019
This allows Goblin instances to be written to respect said bounds, so that we
can avoid generating invalid values which case runtime exceptions in the
test-suite.
mhuesch added a commit that referenced this issue Sep 20, 2019
This allows Goblin instances to be written to respect said bounds, so that we
can avoid generating invalid values which case runtime exceptions in the
test-suite.
mhuesch added a commit that referenced this issue Sep 20, 2019
- Use lovelaceCap from GlobalParams
- Remove `modulate` local defn, fix alignment
iohk-bors bot added a commit to input-output-hk/cardano-ledger-byron that referenced this issue Sep 20, 2019
636: Integrate goblins into the conformance tests r=mhuesch a=mhuesch

We add a `ts_prop_invalidTxWitsAreRejected` conformance property to `Test.Cardano.Chain.Block.Model`. Adding this property required reworking of a number of types in `cardano-ledger-specs` to capture bounds which were not previously "knowable" from the type of the value.

***

This relates to IntersectMBO/cardano-ledger#788 & IntersectMBO/cardano-ledger#817.

Co-authored-by: Michael Hueschen <michaelhueschen@gmail.com>
kevinhammond pushed a commit that referenced this issue Oct 28, 2019
This allows Goblin instances to be written to respect said bounds, so that we
can avoid generating invalid values which case runtime exceptions in the
test-suite.
kevinhammond pushed a commit that referenced this issue Oct 28, 2019
- Use lovelaceCap from GlobalParams
- Remove `modulate` local defn, fix alignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants