Evolution of planetary redox state