A Tale of Two Eras
This is the encapsulated description our Talmudic Sages have given us of the first two millennia of human history which are discussed in detail in the first two chapters of the Torah that are read in synagogues on the Shabbatot following the Simchat Torah celebration of completing a yearly cycle of Torah reading.
But each of these two eras provides us with a different lesson. Although idol worship already began in the third generation of man, and violence and corruption were rampant in most of the generations, Heavenly patience provided them a long stay of execution till the Great Deluge. While this is an expression of the long-suffering attribute of G-d, the second era teaches us that despite its sinfulness the world was saved through the righteousness of the Patriarch Avraham.
The practical lesson to be learned from this is that the security of a nation and the world depends on those who follow the righteous ways of Avraham. Only they are capable of securing Israel forever.