The rate at which heat is extracted across the core mantle boundary (CMB) is constrained by the requirement of dynamo action in the core. This constraint can be computed explicitly using the entropy balance of the core and depends on the thermal conductivity, whose value has been revised upwardly. A high order model (fourth degree polynomial of the radial position) for the core structure is derived and the implications for the core cooling rate and thermal evolution obtained, using the recent values of the thermal conductivity. For a thermal conductivity increasing with depth as proposed by some of these recent studies, a CMB heat flow equal to the isentropic value (13.25 TW at present) leads to a 700 km thick layer at the top of the core where a downward convective heat flow is necessary to maintain an isentropic and well mixed average state. Considering a CMB heat flow larger than the well mixed isentropic value leads to an inner core less than 700 Myr old and the thermal evolution of the core is largely constrained by the conditions for dynamo action without an inner core. Analytical calculations for that period show that a CMB temperature larger than 7000 K must have prevailed 4.5 Gyr ago if the geodynamo has been driven by thermal convection for that whole time. This raises questions regarding the onset of the geodynamo and its continuous operation for the last 3.5 Gyr. Implications regarding the evolution of a basal magma ocean are also considered.