Instructions
DL reported on 25th July that all PYUSD0 transfers on Flow EVM were failing.
Problem
DFNS shared this explanation:
We constructed and broadcasted a transaction for EOA 0x66Bda5aEa2c549a35eB56e796c4ced3ef25C6296 with nonce 21712. And everything went through fine. Here are the bytes for the fully signed transaction. 0x02f901978202eb8254d08503bbf075808503bbf075828301785c94f707b3efca33b0f0cec24f805d8937dd1017f64880b9012474fa41210000000000000000000000000000000000000000000000000000000000000060c3be9b9a0d5d009a29d9b8ddf3fc8d8f9852f9db1b38d4119f74c8f25dee1f93cdb7cb536e1367a6458d9ba8ce473e8e3918df915de5bb32de9a645ba5dbf12c000000000000000000000000000000000000000000000000000000000000009899af3eea856556646c98c8b9b2548fe81524075000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000b69bc8c48fa472020120e43a82b62b90c6a351b800000000000000000000000000000000000000000000000000000000000382700000000000000000c001a05451f222665e340ec532967b2895703e28a1eb89b2c48bd7714a55bfd78bc11ba0124c0d349a7442d7820d4e48333028469aedddb33a528cd5921a8c8c292ac4b2
After a while, we don’t see this transaction included on chain, so our rebroadcaster tried to broadcast the same signed transaction again. And that’s when we got the new error back from the eve gateway node. transaction with the same nonce already submitted.
This part makes sense. And correct me if I’m wrong. That means the original transaction we broadcasted is no longer in the gateway’s mempool, it’s been packaged up in a Cadence transaction and sent to main chain, but hasn’t been executed yet.
But what’s unclear to me is why is it taking so long and still not executed. The first rebroadcast is about 2-3 minutes after the transaction was initially broadcasted. I would expect this should be picked up already.
The bug in our system is that we don’t handle this new error correctly. Our current logic is that we treat this error as a terminating error, so we marked the signed transaction as failed and released the nonce back to be reused by another transaction.
Multiple new transactions were constructed after (about a dozen or so), and after attempting to broadcast each one, we kept getting back the error transaction with the same nonce already submitted, so each of those is marked as failed in our system as well.
Again the error makes sense, the original is still stuck on the Cadence side, so any subsequent attempts will keep failing. Question again is what’s causing that transaction to not be executable?
Eventually, after a while, (based on our logs, took about 10 minutes), we finally constructed a new transaction with the same nonce, was able to successfully broadcast again. Here’s the full bytes for the final transaction that succeeded. 0x02f901978202eb8254d08503bbf075808503bbf075828301785c9469eb4e8a33cef058c2b34234b15315c0572aa9bc80b9012474fa41210000000000000000000000000000000000000000000000000000000000000060ff3ef57d5c3213a4bfc0c237959f6ebcc74d1d6c8c917a37497c7eb33da5810d547c2cfc5bd9ea2b42e262aca44112f362d722880c723af7cb615ab0e86a325f000000000000000000000000000000000000000000000000000000000000009899af3eea856556646c98c8b9b2548fe81524075000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000cd0dbe1de00057e56444c478c3c89f4604ca158b00000000000000000000000000000000000000000000000000000000009896800000000000000000c080a07de55acad5866af89946649cf6d7393e4f035f05975abc16c376b2899f58c21ba0237ce130545f651aad4ca42824d1d9bc6355e503a334639ec9008be66d19ba69, and here’s the transaction from the explorer. https://evm.flow.com/tx/0xbb2eee17f9618aa6e759e40ac2bf637105ba4ca210271791fb347a73dae22496.
What this tells us is that after 10 minutes, Cadence dropped the original from execution. But why was the original transaction not executable?
Comparing the later one that succeeded, the fee amount is the same, I don’t see any clue as to why 1 transaction works but the other one doesn’t.
Not clear on how we should handle such a situation. While the original transaction is in Cadence, trying speeding up the transaction doesn’t work, we get the same error back. Rebroadcasting the same transaction doesn’t work. Reusing the nonce for a new transaction doesn’t work. all other transactions from the same EOA with higher nonces are stuck.
Steps to Reproduce
Acceptance Criteria
Context
Instructions
DL reported on 25th July that all PYUSD0 transfers on Flow EVM were failing.
Problem
DFNS shared this explanation:
Steps to Reproduce
Acceptance Criteria
Context