added proof size check to return false instead of throwing a runtime error on proof invalid size.