pendulum-chain / spacewalk-testing-service

GNU General Public License v3.0
0 stars 0 forks source link

5 testing service getting stuck with bad sequence error #9

Closed gianfra-t closed 8 months ago

gianfra-t commented 8 months ago

Should fix #5.

The bug was showing the following logs:

Sending 0.01 USDC to GAH34W7R5EOCVL3Q2PITD6VQ5QASVLY5CFNJ6JQJXR3CYRI7XWF4FT7Y with memo otfNECDFFf5Qb6SkSDuzRMjRNmTB
Received a bad sequence error from Horizon, retrying with a new transaction... Used sequence: 210264758245404562
Sending 0.01 USDC to GAH34W7R5EOCVL3Q2PITD6VQ5QASVLY5CFNJ6JQJXR3CYRI7XWF4FT7Y with memo otfNECDFFf5Qb6SkSDuzRMjRNmTB
Received a bad sequence error from Horizon, retrying with a new transaction... Used sequence: 210264758245404563
Sending 0.01 USDC to GAH34W7R5EOCVL3Q2PITD6VQ5QASVLY5CFNJ6JQJXR3CYRI7XWF4FT7Y with memo otfNECDFFf5Qb6SkSDuzRMjRNmTB
Received a bad sequence error from Horizon, retrying with a new transaction... Used sequence: 210264758245404564

meaning that the sequence was increasing with the sequence number by 1 on each failed attempt. This may probably happened because the account was cached initially. But since for some unknown mechanism the sequence was initially higher than required and not lower, each submission attempt would increment it yet it would never have the chance to sync, and lower the sequence number to the correct one. Directly loading the account will ensure this won't happen. See official docs for documentation on these two mechanisms.

gianfra-t commented 8 months ago

Ohhh yes. Let me exclude the lock file.