@Override
    public synchronized Hash hashAndSavePreImage(final Bytes value) {
      return preImageCache.inverse().computeIfAbsent(value, Hash::hash);
    }
A caching PreImageProxy suitable for ReferenceTestWorldState which saves hashes in an unbounded
BiMap.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/pathbased/bonsai/storage/BonsaiPreImageProxy.java