Commit Graph

84 Commits

Author SHA1 Message Date
KtorZ
f9acbd3bcb DRY handlers generation from validator 2024-08-25 16:20:07 +02:00
KtorZ
047f422d0d remove v2 script contexts acceptance tests.
V2 is dead. Long live V3.
2024-08-25 16:20:07 +02:00
KtorZ
fe205e360f Update remaining script context e2e tests. 2024-08-25 16:20:06 +02:00
rvcas
be7c0c8012 fix: withdraw kinda 2024-08-25 16:20:06 +02:00
rvcas
3aa9e0c4b7 chore: run fmt on mint 2024-08-25 16:20:05 +02:00
rvcas
3fac7002d4 feat: switch mint to new def 2024-08-25 16:20:05 +02:00
microproofs
953ee6b5d1 Fix ordering for ScriptInfo type 2024-08-25 16:20:05 +02:00
KtorZ
823492c27b Adjust v3 script context end-to-end tests to work with new syntax. 2024-08-25 16:20:04 +02:00
KtorZ
520ceff83d Do not ignore ctx/inputs.cbor; it is used/needed by the test runner. 2024-08-14 03:09:45 +02:00
KtorZ
b104356fb9 (temporarily) make script context tests more verbose. 2024-08-14 03:02:40 +02:00
KtorZ
f879f6d183 Fix script context translations for withdrawals and validity intervals. 2024-08-13 23:43:47 +02:00
KtorZ
5067aad0d8 Fix 'Pair' formatter inside forced unbroken components. 2024-08-13 17:05:41 +02:00
KtorZ
7501538053 Add script context translations for voting purpose. 2024-08-13 16:24:01 +02:00
KtorZ
bfc93bf076 Add script context translation for new Conway certificates 2024-08-13 10:56:29 +02:00
KtorZ
f244b9c496 Add support for protocol parameters (except cost models)
We can now simulate transactions with protocol parameters voting
  procedures. Cost models remain to be done, though.
2024-08-13 10:56:29 +02:00
KtorZ
50dad1fdfe Test proposal procedures through Aiken. 2024-08-13 10:56:29 +02:00
KtorZ
6b6bace8a5 test 'mint' purpose and script context creation.
Alongside a bunch of other stuff from the coverage list. In
  particular, the mint transaction contains:

  - reference inputs
  - multiple outputs, with assets, and type-0, type-1 and type-6
    addresses.
  - an output with a datum hash
  - an output with an inline script
  - carries an extra datum witness, preimage of the embedded hash
  - mint, with 2 policies purposely ordered wrongly, with 1 and 2
    assets purposely ordered wrong. One of the mint is actually a
    burn (i.e. negative quantity)
2024-08-13 10:56:29 +02:00
KtorZ
eea8dc7d0a Support multi-validator in script context accept test. 2024-08-13 10:56:28 +02:00
KtorZ
62b1b932f9 Write down first e2e script context test for v3. 2024-08-13 10:56:28 +02:00
KtorZ
821f7bd8c7 Fix ToPlutusData serializer for V3
This is intense, as we still want to preserve the serializer for V1 &
  V2, and I've tried as much as possible to avoid polluting the
  application layer with many enum types such as:

  ```
  pub enum TxOut {
    V1(TransactionOutput),
    V2(TransactionOutput),
    V3(TransactionOutput),
  }
  ```

  Those types make working with the script context cumbersome, and are
  only truly required to provide different serialisation strategies. So
  instead, we keep one top-level `TxInfo V1/V2/V3` type, and we ensure
  to pass serialization strategies as type wrappers.

  This way, the strategy propagates through the structure up until it's
  eliminated when it reaches the relevant types.

  All-in-all, this strikes a correct balance between maintainability and
  repetition; and it makes it possible to define _different but mostly
  identical_ encoders for the various versions.

  With it, I've been able to successfully encode a V3 script context and
  match it against one produced using the Haskell libraries. More to
  come.
2024-08-13 10:55:23 +02:00
KtorZ
0dec4dc533 Move script context e2e tests under a nested 'v2' directory.
And rework scripts to run them in anticipation of new v3 contexts.
2024-08-13 10:55:21 +02:00
microproofs
72059eacee Fix: Recursion issue where the static param optimization on recursive functions that were passed as arguments to other functions 2024-08-08 19:36:16 -04:00
microproofs
0a1992acd2 Run acceptance tests 2024-08-08 00:39:44 -04:00
KtorZ
bf5a406ffb Remove clause guards.
Closes #886.
2024-08-02 00:16:27 -04:00
KtorZ
fe7d744946 Split continuous workflow in three jobs.
Doing all steps sequentially is starting to get long. Several of those checks are unrelated and can be done in parallel.
2024-07-16 17:41:14 +02:00
microproofs
f1cfc84e67 Fix tree traversal node selection for a few of the enum variants 2024-06-25 18:50:00 -04:00
microproofs
3d06129d9b add test for curry optimization that is a reduced case of #945 2024-05-22 15:46:32 -04:00
microproofs
c1c2cd97b7 New test 103 and clippy fixes 2024-05-21 11:56:12 -04:00
KtorZ
6d7b851c70 Fix 077 after yet-another-breaking-change in stdlib. 2024-05-10 19:05:00 +02:00
microproofs
893e9c9855 activate test 75 2024-05-06 15:17:01 -04:00
KtorZ
99c35a6459 Add now-necessary type-annotations in tests 2024-05-06 15:17:01 -04:00
microproofs
b3d0c3ec04 fix: fixing tests to account for the new stdlib main. Also added test 75 but commented out for now until a fix is merged 2024-05-04 14:26:06 -04:00
microproofs
a44ed4c1a8 Change prelude Map to AList 2024-05-04 14:04:12 -04:00
microproofs
fc0e88018e Chore:
Refactor get_uplc_type to account for constr types that don't exactly resolve to a uplc type
Check arg_stack in uplc generator has only 1 argument at the end of the generation
warning fixes
2024-05-04 14:04:12 -04:00
KtorZ
1091eba3c3 Review & fix acceptance tests
Temporarily using the 'specialize-dict-key' branch from the stdlib
  which makes use of Pair where relevant. Once this is merged back into
  'main' we should update the acceptance test toml files to keep getting
  them automatically upgraded.

  This commit also fixes an oversight in the reification of data-types
  now properly distinguishing between pairs and 2-tuples.

  Co-authored-by: Microproofs <kasey.white@cardanofoundation.org>
2024-05-04 14:04:12 -04:00
microproofs
a6003c3be9 chore: push changes in blueprint snapshot test 2024-03-27 15:57:29 -04:00
microproofs
61936cb91e fix(codegen): Add tracing when checking for a constr vs another primitive 2024-03-17 16:25:17 -04:00
microproofs
eb07365e73 fix tests 2024-03-08 00:12:44 -05:00
microproofs
a3fbe6c155 fix tests 2024-03-06 23:27:10 -05:00
microproofs
27eb1a3e04 Change all uses of interning besides the uplc parser to use the new CodeGenInterner 2024-03-04 11:03:23 -05:00
microproofs
e14f091b86 add back test 93 2024-03-04 10:52:56 -05:00
KtorZ
2b8e99a1b8 Fix CI script for acceptance tests, and have them run in parallel. 2024-03-02 14:11:22 +01:00
microproofs
d8cdeba6fd chore: lastest acceptance test lock and plutus.json files 2024-01-31 00:07:43 -05:00
microproofs
c7af27a6ba fix: generic edge case with tuples that allowed 2 tuples and 3 tuples to use the same monomorphized function.
Also massively reduced the space taken up by generics in scripts when using generics with list and tuples
2024-01-13 17:46:32 -05:00
microproofs
394cac86b8 feat: expect on a type now can take in a msg when in trace mode 2024-01-04 16:03:51 -05:00
rvcas
b17b7f287c chore: update to pallas v0.20.0 2023-12-04 21:44:19 -05:00
rvcas
7c4cabada9 chore: add latest acceptance artifacts 2023-12-04 21:10:55 -05:00
microproofs
446ef11606 chore: finishing acceptance test 29
and updating acceptance test lock files
2023-11-08 14:31:44 -05:00
microproofs
7d319077e6 chore: clean up validator comments and
commit script context test lockfile
2023-11-06 15:49:13 -05:00
microproofs
68d9a21c6a commit current lock files 2023-10-07 19:42:24 -04:00