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

Horizon returns 500 for /paths endpoint #1496

Open
mlsteele opened this issue Jul 10, 2019 · 9 comments

Comments

@mlsteele
Copy link
Contributor

commented Jul 10, 2019

This request cause horizon to return 500 "Internal Server Error". On horizon.stellar.org and our own horizon.

https://horizon.stellar.org/paths?source_account=GBGSPJUIK5W5S7QNSFLL5YJTLTPMWD6Q3GHTSLLB3Q6GMBWNC7ST23UA&destination_account=GC3MRN2NVLDDOLKWD46HZKD4NAGDIXRZUKR227NDOT2TFX4ZYZE2N74X&destination_asset_type=credit_alphanum4&destination_asset_code=KEYZ&destination_asset_issuer=GDVDSIDVX63LKSUFTO5NQ3YHPDDAYUSEPOJLFXVWCVCLEKMOERGHZ7DR&destination_amount=1

Changing any of the inputs is pretty likely to result in a 200. In particular, if destination_amount is <= 1 then 500 is returned. But if destination_amount > 1 e.g. 1.001 then it returns 200.

Some logs:

Jul  9 20:39:47 ip-10-0-7-223 stellar-horizon[15871]: time="2019-07-09T20:39:47.064Z" level=info msg="Starting request" app_name=undefined app_version=undefined client_name=undefined client_version=undefined forwarded_ip= host="10.0.7.223:8000" ip=10.0.10.90 ip_port="10.0.10.90:42116" method=GET path="/paths?source_account=GBGSPJUIK5W5S7QNSFLL5YJTLTPMWD6Q3GHTSLLB3Q6GMBWNC7ST23UA&destination_account=GCZATXK4ZQAXOQ26EP6QVZJXJZFCQR5NYNY7AC267HV72YDPLVGVG2ZH&destination_asset_type=credit_alphanum4&destination_asset_code=KEYZ&destination_asset_issuer=GDVDSIDVX63LKSUFTO5NQ3YHPDDAYUSEPOJLFXVWCVCLEKMOERGHZ7DR&destination_amount=1" pid=15871 req=ip-10-0-7-223/QTg3M8hGmp-4020149 streaming=false
Jul  9 20:39:47 ip-10-0-7-223 stellar-horizon[15871]: time="2019-07-09T20:39:47.065Z" level=info msg="Starting pathfind" destination_amount=10000000 destination_asset=credit_alphanum4/KEYZ/GDVDSIDVX63LKSUFTO5NQ3YHPDDAYUSEPOJLFXVWCVCLEKMOERGHZ7DR pid=15871 source_assets="[credit_alphanum4/BTC/GAUTUYY2THLF7SGITDFMXJVYH3LHDSMGEAKSBU267M2K7A3W543CKUEF credit_alphanum4/BTC/GBSTRH4QOTWNSVA6E4HFERETX4ZLSR3CIUBLK7AXYII277PFJC4BBYOG credit_alphanum4/USD/GBSTRUSD7IRX73RQZBL3RQUH6KS3O4NYFY3QCALDLZD77XMZOPWAVTUK credit_alphanum4/HUG/GD5T6IPRNCKFOHQWT264YPKOZAWUMMZOLZBJ6BNQMUGPWGRLBK3U7ZNP credit_alphanum4/TOAD/GDGHHBNYTCH45RQYQE4Z6F2E3JMMBFHFGMF3DBZ3JODDNT3UWEDP5AT4 credit_alphanum4/USD/GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX credit_alphanum4/KEYZ/GDVDSIDVX63LKSUFTO5NQ3YHPDDAYUSEPOJLFXVWCVCLEKMOERGHZ7DR native]"
Jul  9 20:39:47 ip-10-0-7-223 stellar-horizon[15871]: time="2019-07-09T20:39:47.135Z" level=info msg="Finished pathfind" err="adding these two values will cause an integer overflow: 6562737123349420122, 4612630176791341640" found=2 pid=15871
Jul  9 20:39:47 ip-10-0-7-223 stellar-horizon[15871]: time="2019-07-09T20:39:47.135Z" level=error msg="adding these two values will cause an integer overflow: 6562737123349420122, 4612630176791341640" pid=15871 req=ip-10-0-7-223/QTg3M8hGmp-4020149 stack=unknown
Jul  9 20:39:47 ip-10-0-7-223 stellar-horizon[15871]: time="2019-07-09T20:39:47.135Z" level=info msg="Finished request" app_name=undefined app_version=undefined bytes=444 client_name=undefined client_version=undefined duration=0.070471857 forwarded_ip= host="10.0.7.223:8000" ip=10.0.10.90 ip_port="10.0.10.90:42116" method=GET path="/paths?source_account=GBGSPJUIK5W5S7QNSFLL5YJTLTPMWD6Q3GHTSLLB3Q6GMBWNC7ST23UA&destination_account=GCZATXK4ZQAXOQ26EP6QVZJXJZFCQR5NYNY7AC267HV72YDPLVGVG2ZH&destination_asset_type=credit_alphanum4&destination_asset_code=KEYZ&destination_asset_issuer=GDVDSIDVX63LKSUFTO5NQ3YHPDDAYUSEPOJLFXVWCVCLEKMOERGHZ7DR&destination_amount=1" pid=15871 req=ip-10-0-7-223/QTg3M8hGmp-4020149 route=/paths status=500 streaming=false
@marcinx

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

@tomquisel @bartekn Is there any way to prioritize/speed up the /paths refactoring?

Currently Horizon /paths is badly broken. It returns 500 errors too frequently (see above). Astrograph's pathfinder has some bugs and Johansten's has been out of commission for a few months. How does everyone calculate best paths at the moment? I'd rather not have to write our own pathfinder, especially with the refactored Horizon /paths just around the corner (hopefully).

@tomquisel

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

Yeah, this is a bummer. It's very high priority! In fact, we're shooting to have a release candidate with the new path finder this month. @ire-and-curses heads up about the importance of this.

@marcinx

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2019

I saw the WIP check-ins. Great news. Thanks for the update.

Maybe this would be a good opportunity to retire the mandatory destination_account parameter as it's not being used by the path finder?

@johansten

This comment has been minimized.

Copy link

commented Jul 19, 2019

Stargazer is all path-payments, so it is completely out of commission. Just saying.

@patrickxb

This comment has been minimized.

Copy link

commented Aug 5, 2019

Any updates on this one?

@tomquisel

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

We should be getting a release out this week! I'm not sure if new pathfinding will be turned on by default though. @ire-and-curses ?

@patrickxb

This comment has been minimized.

Copy link

commented Aug 5, 2019

ok, thanks.

@ire-and-curses

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

This is targeted for Horizon 0.20 (next release). The work is tied closely to the new ingestion system so needs careful testing. We're aiming for a release candidate by the end of this week, and then we'll spend a week monitoring and testing. Barring any significant issues, the actual release will likely be early in the week after (i.e. the week of the 19th August).

I expect we'll turn it on by default since it should be much much better than the current situation.

@bartekn bartekn added this to the Horizon 0.20.0 milestone Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.