The solar system was most likely born in a star cluster containing at least 1000 stars. It is highly probable that this cluster environment influenced various properties of the solar system like its chemical composition, size and the orbital parameters of some of its constituting bodies. In the Milky Way, clusters with more than 2000 stars only form in two types - starburst clusters and leaky clusters - each following a unique temporal development in the mass-radius plane. The aim is here to determine the encounter probability in the range relevant to solar system formation for starburst or leaky cluster environments as a function of cluster age. N-body methods are used to investigate the cluster dynamics and the effect of gravitational interactions between cluster members on young solar-type stars surrounded by discs. Using the now available knowledge of the cluster density at a given cluster age it is demonstrated that in starburst clusters the central densities over the first 5Myr are so high (initially > 105 Msun pc-3) that hardly any discs with solar system building potential would survive
this phase. This makes a starburst clusters an unlikely environment for the formation of our solar system. Instead it is highly probable that the solar system formed in a leaky cluster (often classified as OB association).
It is demonstrated that an encounter determining the characteristic properties existing in our solar systems most likely happened very early on ($<$ 2Myr) in its formation history and that after 5Myr the likelihood of a solar-type star experiencing such an encounter in a leaky cluster is negligible even if it was still part of the bound
remnant. This explains why the solar system could develop and maintain its high circularity later in its development.}