By inspecting the current ledger CDDL specifications, you can see that each block
contains a transaction_witness_sets
field, where each transaction_witness_set
is defined as:
transaction_witness_set =
{ ? 0: [* vkeywitness ]
, ? 1: [* native_script ]
, ? 2: [* bootstrap_witness ]
}
Here, native_script
, if present, contains some rules that need to be respected in order for the transaction to be valid (for instance, some minting policy):
native_script =
[ script_pubkey
// script_all
// script_any
// script_n_of_k
// invalid_before
; Timelock validity intervals are half-open intervals [a, b).
; This field specifies the left (included) endpoint a.
// invalid_hereafter
; Timelock validity intervals are half-open intervals [a, b).
; This field specifies the right (excluded) endpoint b.
]
So not only the script hash is included in the chain, but also the actual rules it contains.