utxo set – Does chainstate leveldb only contain "addresses" for P2PKH and P2SH?

Yes, Bitcoin Core does some compression of standard output scripts to store the minimum amount of data needed.

Whatever it is, would I be right to assume that you can only get an address from script types? 0 and 1 (in base58 encoding the script data)?


In other words, the chaindate string level does not include cookie data allowing you to get addresses for utxos using P2WPKH and P2WSH scripts?

If by witnesses, you hear Segwit outputs, no. All output scriptPubKeys are stored in the database, otherwise it would be impossible to check transactions that use arbitrary scripts and segwit scripts. These scripts are stored without special compression (that is, the type used here) and just serialized as is. Segwit outputs are already in minimal form, so you do not need a guy here.

Since all thePubKeys scripts are stored in the database, you can calculate the address of each UTXO, if any, including the separate UTXOs.

In addition, the term witness data refers to the signatures and data entry of a transaction that uses a segwit output. It does not refer to any element related to the segwit. The use of the term "cookie data" in your question is confusing.