aiken-lang / stdlib

The Aiken Standard Library
https://aiken-lang.github.io/stdlib
Apache License 2.0
47 stars 26 forks source link

is reference script not the actual script? #85

Closed waalge closed 4 months ago

waalge commented 4 months ago

Question in the form of a PR

https://github.com/IntersectMBO/cardano-ledger/blob/15afd0483d81f281018cf7d42629ed561845bc86/eras/conway/impl/cddl-files/conway.cddl#L606

KtorZ commented 4 months ago

On-chain: yes. In the script context: no. On-chain validators only have access to the hash digest.

This particular API you're pointing to in Aiken captures that, not the ledger types. Similar to the Haskell Plutus Ledger API.

KtorZ commented 4 months ago

Note: there are other subtle differences like this in the script context. It's not a 100% faithful representation of the transaction, but only some kind of "summary". For example in V1, some inputs/outputs would also be missing if they related to Byron addresses. That was utterly confusing so in V2, it simply became forbidden to mix validators with Byron addresses altogether.