Is it possible to have an account with a counter, and an instruction that can be called by any user at any time and will init a new pda with the counter number as seed and add 1 to the counter?
I find difficult to do it because, although I can fetch the counter value from the counter account to pass it in the instruction, as any user can make this transaction at any time, if more than one user transacts at the same time, only one will succeed since the pda with that seed will already be created.
Is it a way to make pdas like this, with a counter on chain? Is it any other way to do it?
Thanks