I have a few dozen "position" accounts for a user's positions in my AMM program.
I previously had been getting these with a getProgramAccounts filter, which I understand is not very performant. So I then moved on to below:
When I try to grab these with ".fetchMultiple" it throws an error, despite the docs which indicate that missing or invalid accounts will return null among successful returns.
Secondly and perhaps more importantly, when I ".fetch" accounts individually, which I know to exist and are correct, it will take a few tries before returning the correct account data. Initially a large portion of these will return "Invalid Account Discriminator".
What could be causing these issues? Any insight would be much appreciated.