class BodyValidation {

  public static Hash transactionsRoot(final List<Transaction> transactions) {
    final MerklePatriciaTrie<Bytes, Bytes> trie = trie();

    for (int i = 0; i < transactions.size(); ++i) {
      trie.put(indexKey(i), RLP.encode(transactions.get(i)::writeTo));
    }

    return Hash.wrap(trie.getRootHash());
  }

  private  BodyValidation();

}