microproofs
8a461d5bd5
Few minor changes, clippy fixes, and test fixes
2024-08-08 00:39:44 -04:00
microproofs
d7e9fef4d3
Create new helper functions to take care of force and delaying branch terms
2024-08-08 00:39:44 -04:00
KtorZ
23a3134642
Rework choose_data_xxx API to include force/delay inside functions.
2024-08-08 00:39:44 -04:00
KtorZ
021679b8ac
Force unwrap_xxx_or inside function body
...
Otherwise, it becomes the responsibility of the caller to force the result; which may be easily forgotten.
2024-08-08 00:39:44 -04:00
microproofs
a132a2e486
Fix unwrap issues
2024-08-08 00:39:44 -04:00
KtorZ
93a141bfa4
Test and fix 'unwrap_void_or'
2024-08-08 00:39:44 -04:00
KtorZ
49ddcccd12
Revert checking for negative constr on bool
...
It is impossible to serialize/deserialize a Data with a negative
constructor. So the only way this can happen is by programmatically
construct a value using builtin constr_data.
While possible, it is entirely at the responsibility of the
programmer, but not malleable from an attacker who can only provide
values as 'Data' (and thus, must be decoded like others).
2024-08-08 00:39:44 -04:00
KtorZ
aefbc6e1b9
Define a safer API for unwrap_xxx_or and choose_data_xxx
...
Cloning a 'Term' is potentially dangerous, so we don't want this to
happen by mistake. So instead, we pass in var names and turn them into
terms when necessary.
2024-08-08 00:39:44 -04:00
KtorZ
846c16087e
Test (and fix) unwrap_or helpers.
2024-08-08 00:39:44 -04:00
KtorZ
ea8003af8f
Fix bool soft-casting.
...
While the ledger doesn't allow deserializing negative constr value,
they are still possible at the machine level. So, we better make sure
that we don't make assumptions regarding this.
2024-08-08 00:39:44 -04:00
KtorZ
9610237616
Refactor unknown_data_to_type, break down into smaller functions.
2024-08-08 00:39:44 -04:00
KtorZ
c3a61706b5
Factor out common UPLC logic for converting Data to Bool.
2024-08-08 00:39:44 -04:00
microproofs
0be5229f1c
Only 2 errors and todos left to finish
2024-08-08 00:39:44 -04:00
KtorZ
4645257e62
Prune pallas dependencies.
...
Using 'pallas' as a dependency brings utxo-rpc other annoying dependencies such as _tokyo_. This not only makes the overall build longer, but it also prevents it to even work when targetting wasm.
2024-08-03 14:14:49 +02:00
KtorZ
643e43f8aa
Fix zero-arg builtins invokations.
...
There are currently two zero-arg builtins:
- mkNilData
- mkNilPairData
And while they have strictly speaking no arguments, the VM still
requires that they are called with an extra unit argument applied.
2024-08-02 00:17:16 -04:00
KtorZ
b28d4a6e9f
Add input reference to ReferenceInputNotFound error.
...
Fixes #974 .
2024-08-01 15:29:39 +02:00
rvcas
4645fd3e28
chore: Release
2024-07-25 08:28:15 -04:00
KtorZ
49190b485a
chore: Release
2024-07-25 09:58:06 +02:00
microproofs
c286ada08d
clippy fix
2024-07-24 11:29:55 -04:00
microproofs
dfce9c1d96
feat: Add multivalidator as an AIR tree opcode.
...
feat: Add uplc eval optimization
2024-07-24 10:00:08 -04:00
microproofs
4bd9125b86
Fix delay of arguments to be exactly the same as codegen tests
2024-06-25 18:50:00 -04:00
KtorZ
216dab99d4
chore: Release
2024-06-06 11:19:34 +02:00
Matthias Benkort
28515e70ec
Merge pull request #950 from hadelive/k256-error
...
Fix k256 error does not implement clone
2024-05-30 13:42:57 +02:00
hade
740e140c89
fix: custom k256 error
2024-05-30 16:13:51 +07:00
hade
b367ec2113
fix: fmt check
2024-05-30 16:09:32 +07:00
hade
ad3c9f24b7
chore: minimal pallas dependencies
2024-05-30 15:09:05 +07:00
rvcas
338fc0eba6
chore: Release
2024-05-23 16:45:10 -04:00
rvcas
ff50d4d2cf
chore: Release
2024-05-23 16:23:59 -04:00
KtorZ
8e0f32a577
Fix negative evaluation costs
...
Whoopsie.
2024-05-23 11:21:47 +02:00
microproofs
3d06129d9b
add test for curry optimization that is a reduced case of #945
2024-05-22 15:46:32 -04:00
microproofs
d6cc450ce4
The actual issue with #945 is that the curry builtin reducer could sometimes place fully applied builtins that could evaluate and fail above where they were actually used. This happened with builtins that were called with the same constants enough times for the curry builtin to try hoist to a higher scope. This is now fixed by detecting which builtins are safe to evaluate in advance before we hoist fully applied builtins
2024-05-22 15:22:31 -04:00
microproofs
c16bd06e97
make sure traverse_uplc_with_helper is always passing the arg to lambda before running the with function.
...
Breaks #945 again
2024-05-22 11:58:05 -04:00
microproofs
489eff7f5b
Closes #945
...
Switch to depth first optimization passes instead of breadth first for inlining. Need to think more on how to do breadth first optimization passes
2024-05-21 17:12:57 -04:00
rvcas
e28b0df840
fix: add v3 mapping for builtin semantics relates to #907
2024-05-21 17:06:18 -04:00
rvcas
f306f1715a
feat: use plutus version in address command
...
relates to #907
2024-05-21 17:04:25 -04:00
rvcas
3bc3792aa3
feat: add plutus version to aiken.toml
...
relates to #907
2024-05-21 17:02:20 -04:00
rvcas
f8ce46d0f4
chore(ci): run cargo dist init
2024-05-08 11:05:30 -04:00
microproofs
945a3f743b
feat: builtin wrapper reduction optimization
2024-04-26 19:24:04 +02:00
rvcas
9d49be46b8
chore: add some docs to the uplc crate
2024-04-08 14:30:07 -04:00
microproofs
21b1e29f09
chore: clippy fix
2024-03-27 16:39:52 -04:00
rvcas
075668b52e
chore: Release
2024-03-25 22:09:37 -04:00
KtorZ
4e8042fd06
chore: Release
2024-03-22 16:10:17 +01:00
rvcas
fe6710935d
feat: impl serde on errythang
2024-03-08 19:19:07 -05:00
microproofs
94f383762c
step up the optimizations a bit more by inlining a small function
2024-03-08 00:12:44 -05:00
microproofs
1edd1a1fa3
change currying to happen with 3 or more occurrences
2024-03-08 00:12:44 -05:00
microproofs
e9122de061
more identity reduce testing
2024-03-08 00:12:44 -05:00
microproofs
dabaae8ca6
more identity and inline tests
2024-03-08 00:12:44 -05:00
microproofs
97b0cf6813
reorganize shrinker tests
2024-03-08 00:12:44 -05:00
microproofs
eb709d6fc3
reorder tests to match order of functions
2024-03-08 00:12:44 -05:00
KtorZ
bff822ea7f
Rework unit test report to leverage new reification
...
And also provide slightly better errors when traces, or trace-if-false operators are present.
2024-03-07 01:20:40 +01:00