public static Hash withdrawalsRoot(final List<Withdrawal> withdrawals) {
    final MerkleTrie<Bytes, Bytes> trie = trie();

    IntStream.range(0, withdrawals.size())
        .forEach(
            i -> trie.put(indexKey(i), WithdrawalEncoder.encodeOpaqueBytes(withdrawals.get(i))));

    return Hash.wrap(trie.getRootHash());
  }
Generates the withdrawals root for a list of withdrawals

@param withdrawals the transactions
@return the transaction root
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BodyValidation.java