I
suggested upthread that blocks contain a hash of the UTXO set. This could potentially be done via a softfork
Why does this hash need to be included in the block? While you're downloading your pruned node, you could calculate this hash on your own. I see no reason to increase the size of the blockchain by a soft fork for this.
Nodes do not calculate this hash presently.
A node can obtain the actual UTXO set as of block x from a third party, calculate the hash of the UTXO set it was provided, and compare this to the hash contained in block x it receives from its peers. The node will also look at subsequent blocks to see how the UTXO set changed according to the blocks, calculate the hash, and validate accordingly. As long as the node is not being subjected to a Sybil attack, I would confidently say the node has sufficient information to know if a transaction is valid or not.
You've kinda lost me here: what can you do with this information that you can't currenly do (assuming you have a pruned node with full UTXO information)?
Presently, nodes review information from each block starting from block 1 to keep track of all outputs, and if they have been spent. The only way to know if an input is valid and if it has been previously spent is to look at all blocks, or to use information derived from looking at all blocks. Nodes currently keep track of the UTXO set by storing it in RAM, but the only way they authoritatively know the UTXO set is because the node previously looked at every block.
For example, a node will know the following is part of the UTXO set:
txid,index,amount,block
2a6a13ffb7146ef05a009d65d83b08bf48d53b13c471d13113345b4c9953611b,1,13.55748202,704548
Nodes store the above information, along with similar information about every other unspent output.
If a node were to store the UTXO set in a very specific order, and in a very specific format, two arbitrary nodes would calculate the hash of this information and the calculated hash would be the same.
If the above hash were to be stored in blocks, someone could spin up a node, obtain the UTXO set from an arbitrary untrusted third party, and immediately know if an arbitrary transaction they receive is valid or not (assuming they know the current consensus rules). Your average user would not need to download and store the blockchain, nor would they need to wait for their node to catch up to the current tip if their node has been offline for a period of time.
I would also point out that dissenters who are using bitcoin will want to minimize their data use as much as they can. No amount of data use would be "safe", but being able use a full node after has been offline for days/weeks without having to download all blocks subsequent to the last time it was online would reduce the risk of using bitcoin, and would make it so they would not have to rely on third-party services to send transactions or verify if a transaction has been received.