The formal judicial proceeding to prove or confirm the validity of a will or proof of heirship and to settle the affairs of the deceased.