I'm currently encountering a peculiar issue on the Polygon Mainnet, which doesn't seem to occur on the Testnet. When running two or more parallel node processes which have two different wallets with Alchamy RPC that call contract functions, I experience the following problems:
On the first attempt, when calling the contract function with identical method parameters, one of the node processes returns a "CALL_EXCEPTION" Transaction reverted without a reason string. Meanwhile, the other node process executes the call successfully both have the same method parameters on contract and sufficient gasLimit and updated gasParameters
During the second attempt, where the data is different from the first attempt but still identical for both nodes. the nodes try to call the same contract functions again now The same node which showed error despite having sufficient gas, fails to process. It results in a timeout error and remains unprocessed.
If i try to retry the same transaction it results into the Transaction Replacement errors and sometime transaction passes but sometime it dosen't. We cannot have timeouts in our side of application architecture so even if it executes after couple of attempts it is not usable.
Noticeable is the same Node keeps falling into timeouts again and again and never recover
I'm using ethers.js and Alchemy as the RPC for handling transactions, but this odd behavior persists. Any insights or suggestions to help resolve this issue would be greatly appreciated.