[Machine] The Messenger of Allah ﷺ prayed eight units (rak'ahs) when the sun was eclipsed, in four prostrations. Abu Abdullah (Imam Ahmad) said: Abu Amr ibn Abi Ja'far added to this from Al-Hasan ibn Sufyan who said: and from Ali (may Allah be pleased with him) was the same.
صَلَّى رَسُولُ اللهِ ﷺ حِينَ كَسَفَتِ الشَّمْسُ ثَمَانِ رَكَعَاتٍ فِي أَرْبَعِ سَجَدَاتٍ قَالَ أَبُو عَبْدِ اللهِ زَادَنِي أَبُو عَمْرِو بْنُ أَبِي جَعْفَرٍ فِيهِ عَنِ الْحَسَنِ بْنِ سُفْيَانَ قَالَ وَعَنْ عَلِيٍّ مِثْلُ ذَلِكَ