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
Horizon timeout returned although the transaction was added to ledger #2483
Comments
This is not terribly intuitive, but it is expected behaviour. A stellar-core instance may drop your transaction after failing to include it in several ledgers (currently 3). However other distributed instances may still rebroadcast the tx. See e.g. stellar/stellar-core#1811. When Horizon provides you with a timeout, it means that Horizon has not had timely confirmation that your tx has made it into a ledger. It does not guarantee that the tx will never make it. If you want to guarantee the tx will never be included beyond some time, you should set an explicit timeout (i.e. an upper timebound). For this reason, an upper timebound is a required argument in most SDKs. |
Thanks @ire-and-curses. |
You can rely on this result. Success is a consensus-level return so you don't need to look it up again. You can see this is so because the response includes the result XDR, and such XDR could only come from stellar-core after ledger application. |
Transaction malformedCan you approve that transaction_malformed results are final & immutable? Transaction failed with transaction result_code ==
|
The follow up questions are not related to this bug. Questions like this are best asked at our Q&A site so that it's easy for others to learn in the future: https://stellar.stackexchange.com/ Would you repost these questions there? |
Of course. |
What version are you using?
I am working on the public network through the public Horizon instance: https://horizon.stellar.org/. I posted transactions to the network on April 12 using this API: https://www.stellar.org/developers/horizon/reference/endpoints/transactions-create.html.
What did you do?
Yesterday, I started posting a transaction on 17:23:15 UTC. 30 seconds later, on 17:23:45 a https://www.stellar.org/developers/horizon/reference/errors/timeout.html was returned. As instructed in the documentation, I retried sending the same transaction after a second delay. 30 seconds later, on 17:24:17, I got the same timeout error. Another second delay and another attempt. 30 seconds later, on 17:24:49, I got the same timeout error. My code gives up after 3 attempts.
What did you expect to see?
My assumption is that if I get a timeout error, then the transaction will not be included in any ledger unless I resubmit it.
What did you see instead?
In practice I found out that my transaction https://stellar.expert/explorer/public/tx/ca4b370f0a0ff8298da3e9282282188c508015cac5b0f908b1b3bab01a7dd9fd made it into this ledger https://stellar.expert/explorer/public/ledger/29145481 which closed at 17:24:57 UTC, a few seconds after the last timeout.
The text was updated successfully, but these errors were encountered: