Closed nikita-gorodeckij closed 2 years ago
Hi @nikita-gorodeckij,
Polaris doesn't use the submit response because Polaris supports using third-party custodians. So if I use Polaris for my anchor but I use Circle or Fireblocks for my custody, I won't have a submit response, I'll just have the transaction hash.
But if this is what you're seeing in the application's behavior, you might be right. Let me follow up with the Horizon team to see if this is likely.
The fix would be to retry the request until the transaction is found. If the transaction isn't found have X retries or Y seconds, fail. What do you think?
Wait @nikita-gorodeckij, in your example, ea393ff2-e8bf-4f0b-bcb1-2f919feb952b
is not a valid transaction hash or ID. Trying to fetch a transaction with this ID would certainly fail.
@JakeUrban It is not transaction hash. It is valid uuid. It should be output of this line
Hi @nikita-gorodeckij, you're right about the transaction ID, my mistake. Have you been experiencing this issue still?
https://github.com/stellar/django-polaris/blob/a2bdb49c3a48bd3a6f9a74e7b7b342769c0db164/polaris/management/commands/process_pending_deposits.py#L602
Why don't you use submit response?
Looks like it is not great solution to retrieve details from horizon right after submit - there's a high probability to get NotFoundError.
I don't know exactly how horizon works, but looks like there are a bunch of servers behind load balancer. Because of it submit request could be send on Server#1 but request for transaction details could be send on Server#2. It is possible because of short time period servers won 't have time to sync history, and this will lead to NotFoundError.
Probably I'm wrong in reasons, but I have logs and see that problem with this line.
status_message
for transactions failed because of this line:Error in logs:
And logs point to this line:
https://github.com/stellar/django-polaris/blob/a2bdb49c3a48bd3a6f9a74e7b7b342769c0db164/polaris/management/commands/process_pending_deposits.py#L602