Support application of variables known at compile time #915
waalge
started this conversation in
Core language features
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
why params
Validator params are convenient from one perspective. Only something that understands a bit of cbor and uplc is able to carryout
applyParams
and can be done in, say, browser based setting.There is some (@MicroProofs ?) way to verify on-chain that two scripts belong to the same "family" ie differ by parameters.
why not params
The param values have to propagate down the function calls, increasing arg counts, rather than just
use
ing the constant.Potential computations / optimizations are missed.
Params can be an artifact of needing to test the validator in different contexts, eg depends on token on mainnet but for testing we have to create our own.
In many contexts the full aiken compiler is available when params are known, and there is no advantage to on-chain awareness of "family".
Current work around
Since aiken reads only aiken files and in specific locations then we have separate code that emits an aiken file pre aiken build
Note : This subsumes cases like #676 , with "repeat until fixed".
Beta Was this translation helpful? Give feedback.
All reactions