import hashlib


def validate_proof(previous_proof, proof):
    """
    Validates the new proof.

    :param int previous_proof: Proof of the previous block
    :param int proof: Potential proof of the next block
    :return bool: True if the new proof is valid, False if not
    """

    attempt = f'{previous_proof}{proof}'.encode()
    hashed_attempt = hashlib.sha256(attempt).hexdigest()

    return hashed_attempt[:4] == '0000'