The optical potential in proton-nucleus scattering