Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deposits completed but polaris says they failed #640

Closed
nikita-gorodeckij opened this issue Jun 9, 2022 · 5 comments
Closed

Deposits completed but polaris says they failed #640

nikita-gorodeckij opened this issue Jun 9, 2022 · 5 comments

Comments

@nikita-gorodeckij
Copy link
Contributor

nikita-gorodeckij commented Jun 9, 2022

await server.transactions().transaction(transaction_hash).call()

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:

NotFoundError: {
  "type": "https://stellar.org/horizon-errors/not_found",
  "title": "Resource Missing",
  "status": 404,
  "detail": "The resource at the url requested was not found.  This usually occurs for one of two reasons:  The url requested is not valid, or no data in our database could be found with the parameters provided."
}

Error in logs:

transaction: ea393ff2-e8bf-4f0b-bcb1-2f919feb952b encountered an error: NotFoundError: {
  "type": "https://stellar.org/horizon-errors/not_found",
  "title": "Resource Missing",
  "status": 404,
  "detail": "The resource at the url requested was not found.  This usually occurs for one of two reasons:  The url requested is not valid, or no data in our database could be found with the parameters provided."
}

And logs point to this line:

await server.transactions().transaction(transaction_hash).call()

@nikita-gorodeckij nikita-gorodeckij changed the title Does it necessary make additional request to horizon? Deposits completed but polaris says that they failed Jun 9, 2022
@nikita-gorodeckij nikita-gorodeckij changed the title Deposits completed but polaris says that they failed Deposits completed but polaris says they failed Jun 9, 2022
@JakeUrban
Copy link
Contributor

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.

@JakeUrban
Copy link
Contributor

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?

@JakeUrban
Copy link
Contributor

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.

@nikita-gorodeckij
Copy link
Contributor Author

nikita-gorodeckij commented Jun 10, 2022

@JakeUrban It is not transaction hash. It is valid uuid. It should be output of this line

logger.error(f"transaction: {transaction.id} encountered an error: {message}")

@JakeUrban
Copy link
Contributor

Hi @nikita-gorodeckij, you're right about the transaction ID, my mistake. Have you been experiencing this issue still?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants