It looks like this early attack opens a possibility to stop the war.
This immediate attack was powerful enough to satisfy the Shia population. Iran has clearly shown that they are not afraid of war. The Iranian officials have said that these rocket attacks have been their retaliation. The third wave will follow only if the US retaliates, immediately at the time of a retaliation. There has been no reaction of the US air defenses, despite the fact that the US forces have been in high alert. This shows that the US air defenses are not a problem for Iranian missiles. Given this situation, an immediate retaliation by the US would be stupid in already from a purely military point of view - the US bases around Iran are yet easy targets, and the US does not have powerful enough attack possibilities nearby, and after this attack, it is clear now that there is no hope that Iran will not react against some retaliation.
If we remember how much time the US needed to prepare its troops to start the Iraq war, it seems easy for Trump to justify that there will be no immediate retaliation. Moreover, there have been explicit statements by various US politicians (Pelosi, Rand Paul) against starting a war. So, a reasonable and defensible line for Trump will be no immediate reaction, but start the preparations for a full-scale war. With the retaliation delayed until these preparations have been finished. This could be sold as sufficiently tough but nonetheless reasonable.
So, Trump can shift that officially simply delayed start of the retaliation against Iran to some time after the elections. That means, Iran and the US will remain in a sort of ceasefire up to the elections.
But this is, of course, not all. Because there are also some other forces. Namely, first of all, the Iraqi Shia militias. For these forces, the murder of Suleimani needs revenge too. Moreover, the US has explicitly attacked them and, together with Suleimani, murdered some high-level leaders. So, this sort of ceasefire with the Iran is irrelevant to these forces. They will fight the US bases in Iraq and have already started this today. Iran will not bother about this, and the US has no possibility to blame Iran and retaliate against Iran for initiating or supporting these attacks, even if this would be not a fantasy but if there would be real such support. Why? Simply because of the ceasefire above.
So, the US bases in Iraq will be under attack of the Iraqi Shia militias, despite the ceasefire with Iran, which stops only rocket attacks from Iranian territory. Actually, these bases have not simply enough personal to defend themselves against them without any defense from some other Iraqi forces. Of course, the Shia militias have much less power than Iran, but nonetheless the bases have not been prepared for this situation. It is one thing to have bases in agreement with the government of a country, and another one to fight large parts of the army of that country without any other support. Moreover, the US relied heavily on the belief that nobody will attack them in fear of retaliation - which is no longer the case. So, even simply from a military point of view, even if the decision would be to start a war with Iran, it would be reasonable to leave those bases as essentially indefensible in this situation, until the preparation for a war against Iran has been finished.
So, Trump has now the chance to look tough enough, preparing the US forces for a serious war against Iran during the next year until the elections, but at the same time to leave Iraq as well as Syria. After the elections, this war will be forgotten.
The last formal declaration of war by the US was that of WW II.
https://en.wikipedia.org/wiki/Declaration_of_war_by_the_United_States Neither Korea nor Vietnam, even less Afghanistan and Iraq, were wars according to your criterion. I think nobody cares about this.
I have speculated that Iran may formally declare war without attacking immediately, but this attack against the US bases is a much more powerful reaction. After this, to declare war makes no sense for Iran too.
Yes. But Nasrallah has already said that he does not believe and promised in the case of a US retaliation against Iran to start attacks against Israel too.