Article One of the Constitution: "No Bill of Attainder or ex post facto Law shall be passed."
If you amend the Constitution, though, it's up to the courts to decide how to interpret the old and the new provisions.
No doubt. But I assume ex post facto would be deemed to apply unless the amendment specifically made it retroactive.
It’s interesting that this was apparently an important issue back then and nobody cares about it at all today.
At least important enough to get 2/3 of each house of Congress to vote for it, and to get it within two states of the number needed for ratification.