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

cleanup horizon's root endpoint #239

Closed
nikhilsaraf opened this issue Jan 9, 2018 · 7 comments
Closed

cleanup horizon's root endpoint #239

nikhilsaraf opened this issue Jan 9, 2018 · 7 comments

Comments

@nikhilsaraf
Copy link
Contributor

  1. orderbook endpoint should not list buying_issuer and selling_issuer, but instead it should list buying_asset_issuer and selling_asset_issuer for a correct API.

  2. no friendbot api displayed in root for pub net

@MikeFair
Copy link

  1. Friendbot API link in Testnet is wrong (Perhaps should be split out into "ServiceLinks" field?)

Wishlist:
4. Add the current Base_Reserve and Base_Fee amounts for the network

@ramontayag
Copy link
Contributor

Looks like it's this line that needs changing.

@rudle
Copy link
Contributor

rudle commented Aug 27, 2018

Hello, I'm taking a look at this issue. Given that it's a few months old, I'd like to clarify some of the points made above. Regarding points 2 & 3, I believe that 2 has been addressed but I'm confused about the behaviour. To be specific, I see a friendbot API in both testnet and public net. It seems like the redirect from $stellarURL/friendbot -> friendbot.$stellarURL is not working correctly. How can I inspect the value of the config at runtime?

@nikhilsaraf
Copy link
Contributor Author

thank you for taking this on @rudle !

clarifying the points below:
yes, no. 2 still needs to be addressed (after looking at https://horizon.stellar.org) -- currently we show the friendbot URL even though https://horizon.stellar.org points to the main network and we don't have friendbot enabled on the main network. The change should delete this if the environment is the main network (you can also check the friendbot-url variable for this information but I'd go with the approach that we currently use to figure out whether we're in the main net or not, just to keep things consistent)

the redirection would not work on the public network since there's no friendbot instance. we should just change the URL to point to friendbot.$stellarURL to reflect the deprecation of the old option.

@rudle
Copy link
Contributor

rudle commented Aug 28, 2018

Thanks for bringing me up to speed @nikhilsaraf. I'm now understanding that we want to hide the friendbot-url in cases in which there is no friendbot available. I'm also now able to answer my own question about the redirect not working: it only works in the testnet! (EDIT: this is false, https://github.com/stellar/go/pull/217/files/4f1708305a05c39092dede7047774a60bfb3138b#r158850670 shows me that redirection was a temporary feature). I believe it's most correct for stellar to maintain a config for the friendbot URL on a per environment basis. Where does the configuration live for the horizon testnet?

I'll start coding on this and hopefully have a PR ready soon.

@rudle
Copy link
Contributor

rudle commented Aug 28, 2018

See the two PRs above, they address points 1-3.
I need some help understanding the domain a bit better before I can get to 4. Searching the code base for BaseFee and BaseReserve, I see that those are properties of a particular ledger

BaseFee int32 `json:"base_fee_in_stroops"`
- is that true? If so, I don't think it fits in with the root resource adapter.

@bartekn bartekn reopened this Aug 29, 2018
@nikhilsaraf
Copy link
Contributor Author

Yes, fee is a property of a particular ledger --I agree that the root resource is not the best place for it. We are in the process of introducing a new endpoint that exposes operation fee and base reserve information in this PR: #586

Closing this issue since issue no. 4 will be addressed in the linked PR. Feel free to reopen if needed.

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

No branches or pull requests

5 participants