@Override
  public Proof<V> getValueWithProof(final K key) {
    checkNotNull(key);
    final ProofVisitor<V> proofVisitor = new ProofVisitor<>(root);
    final Optional<V> value = root.accept(proofVisitor, bytesToPath(key)).getValue();
    final List<Bytes> proof =
        proofVisitor.getProof().stream().map(Node::getEncodedBytes).collect(Collectors.toList());
    return new Proof<>(value, proof);
  }
Create a trie.

@param valueSerializer A function for serializing values to bytes.
ethereum/trie/src/main/java/org/hyperledger/besu/ethereum/trie/SimpleMerkleTrie.java