No, it's not unConstitutional to pass a law and apply it retroactively, it's just invalid.
The Constitution explicitly forbids ex-post-facto law, both at the state and federal levels. So yes, it absolutely is unconstitutional to pass a law, and apply it retroactively. Article I, Section 9 states, “No Bill of Attainder or ex post facto Law shall be passed.” And just in case you're thinking that only this restriction applies only to the federal government, Article I, Section 10 states, “No State shall enter into any Treaty, Alliance, or Confederation; grant Letters of Marque and Reprisal; coin Money; emit Bills of Credit; make any Thing but gold and silver Coin a Tender in Payment of Debts; pass any Bill of Attainder, ex post facto Law, or Law impairing the Obligation of Contracts, or grant any Title of Nobility.”
Yeah that's a given. The OP asks a stupid question, he gets a dumbed-down answer.