@@ -124,21 +124,35 @@ script_data_hash = $hash32
124124; in (byte-wise) lexical order sorts earlier.
125125;
126126; For PlutusV1 (language id 0), the language view is the following:
127- ; - the value of costmdls map at key 0 is encoded as an indefinite length
128- ; list and the result is encoded as a bytestring. (our apologies)
127+ ; - the value of costmdls map at key 0 (in other words, the script_integrity_data)
128+ ; is encoded as an indefinite length list and the result is encoded as a bytestring.
129+ ; (our apologies)
130+ ; For example, the script_integrity_data corresponding to the all zero costmodel for V1
131+ ; would be encoded as (in hex):
132+ ; 58a89f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff
129133; - the language ID tag is also encoded twice. first as a uint then as
130134; a bytestring. (our apologies)
135+ ; Concretely, this means that the language version for V1 is encoded as
136+ ; 4100 in hex.
131137; For PlutusV2 (language id 1), the language view is the following:
132138; - the value of costmdls map at key 1 is encoded as an definite length list.
139+ ; For example, the script_integrity_data corresponding to the all zero costmodel for V2
140+ ; would be encoded as (in hex):
141+ ; 98af0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
142+ ; - the language ID tag is encoded as expected.
143+ ; Concretely, this means that the language version for V2 is encoded as
144+ ; 01 in hex.
133145;
134146; Note that each Plutus language represented inside a transaction must have
135147; a cost model in the costmdls protocol parameter in order to execute,
136148; regardless of what the script integrity data is.
137149;
138150; Finally, note that in the case that a transaction includes datums but does not
139- ; include any redeemers, the script data format becomes (in hex):
151+ ; include the redeemers field , the script data format becomes (in hex):
140152; [ 80 | datums | A0 ]
141153; corresponding to a CBOR empty list and an empty map.
154+ ; Note that a transaction might include the redeemers field and set it to the
155+ ; empty map, in which case the user supplied encoding of the empty map is used.
142156
143157; address = bytes
144158; reward_account = bytes
0 commit comments