I believeWhat you are describing sounds something like a Merkle Tree: https://en.m.wikipedia.org/wiki/Merkle_tree
Note that the organization of a Merkle tree is fairly arbitrary; the graph can look like just about anything so long as it is acyclic.
The interesting aspect of a Merkle tree is that any change anywhere in the data "bubbles up" the tree to the root, changing the hash value stored there. But there is no requirement to re-hash all of the data in the tree on every change.