public static void validate(final Bytes encodedValue) {
    final RLPInput in = input(encodedValue);
    while (!in.isDone()) {
      while (in.isEndOfCurrentList()) {
        in.leaveList();
      }
      if (in.nextIsList()) {
        in.enterList();
      } else {
        // Skip does as much validation as can be done in general, without allocating anything.
        in.skipNext();
      }
    }
  }
Validates that the provided value is a valid RLP encoding.

@param encodedValue The value to check.
@throws RLPException if {@code encodedValue} is not a valid RLP encoding.
ethereum/rlp/src/main/java/org/hyperledger/besu/ethereum/rlp/RLP.java