Logged Conversation (all times UTC)
[04:29] <stellar-slack> sacarlson: yeah only in the new code
[09:34] <stellar-slack> What I need is a guide to start go-horizon. I know that I need attach it to my stellar-core db, but I can't find out how to start it
[11:04] <stellar-slack> I found out that I should run executable horizon but I'm still looking for a guide to use -- commands
[13:49] <stellar-slack> By the way is the using of postgres in stellar-core enough stable? I have some problems with it. It seems not possible to use sqlite3 with go-horizon
[15:48] <stellar-slack> @naumenkogs: go-horizon is currently only compatible with postgresql, but eventually we will support interacting with a sqlite stellar-core database. However, the history database that horizon creates uses postgres specific features (most notably jsonb) and so postgres will likely be the only database compatible with the horizon history database for the foreseeable future.
[15:52] <stellar-slack> as far as a guide to start go-horizon, we don’t really have anything like that yet. You can see the minimal help documentation we have for each argument using `horizon --help`
[15:53] <stellar-slack> Can you give me an example of a command including arguments to call horizon? I mean with --stellar-core-db. There are different formats for postgres url for example so let me know which one do you use. Now I execute something like ./horizon --stellar-core-url="localhost:8912" --stellar-core-db-url="postgresql://stellar:stellar@localhost/stellar" and nothing appears at all.
[15:53] <stellar-slack> I mean maybe I miss some needed args or something like that?
[15:57] <stellar-slack> yeah, totally. but first I want to explain about how environment variables can be used to replace command line arguments. If you look at https://github.com/stellar/go-horizon/blob/master/src/github.com/stellar/go-horizon/cmd/horizon/main.go#L28-L40 you’ll see lines like `viper.BindEnv("stellar-core-db-url", "STELLAR_CORE_DATABASE_URL”)` which means that if a horizon process’s environment has STELLAR_C
[15:57] <stellar-slack> "stellar-core-db-url” command line argument if one isn’t specified. I use this feature during development so that I can launch horizon more simply. I use a `.env` file to establish this environment which you can see here: https://github.com/stellar/go-horizon/blob/master/.env
[15:58] <stellar-slack> So, for example you can see that the `stellar-core-url` needs to be a full http url like `http://localhost:39132`
[16:00] <stellar-slack> As far as your specific question, you haven’t yet specified a `db-url` argument, which is required.
[16:00] <stellar-slack> `db-url`, `stellar-core-db-url`, and `stellar-core-url` should be the 3 currently required arguments
[16:03] <stellar-slack> Creating a stellar-core-db asks me to use user and password in stellar-core.cfg file. I created that db with special password. How should I use pass in stellar-core-db-url?
[16:04] <stellar-slack> As an example: `postgres://USER:PASSWORD@localhost/horizon_development?sslmode=disable`. Does that make sense?
[16:05] <stellar-slack> Yeah, thanks. Now I get a respond. But there are strange exceptions there so I gonna figure them out.
[16:05] <stellar-slack> np, feel free to ask more questions as they come up :)
[16:12] <stellar-slack> Do I need to fill horizon_development manually? It seems like I skipped a step where it is created.
[16:13] <stellar-slack> And now after launching horizon it is empty so I get "relation history_ledgers doesnt exists". Btw I created horizon_development as a simple CREATE TABLE sql in postgres
[16:16] <stellar-slack> @naumenkogs: the horizon database is presently populated by a “ruby-horizon” server which was the first prototype release of horizon: https://github.com/stellar/horizon
[16:16] <stellar-slack> we will be fully removing ruby-horizon prior to the public switchover, but for now you have to run both ruby-horizon and go-horizon to have a fully working horizon system
[16:17] <stellar-slack> ruby-horizon is currently responsible for importing history, posting transactions to stellar-core and the “friendbot” currency faucet
[16:18] <stellar-slack> You’ll want to follow: https://github.com/stellar/horizon/blob/master/doc/developing.md to setup ruby-horizon
[16:18] <stellar-slack> So for now I can use ruby without go but I cannot use go without ruby?
[16:20] <stellar-slack> well, they don’t interact directly, so you can run them independently, but you must presently use ruby to create the schema that go-horizon assumes for the history database and you must use ruby to populate the history database.
[16:21] <stellar-slack> So ruby is needed only for launching once to create schema?
[16:24] <stellar-slack> yes, and it’s also needed to populate the rows of the history database. The ruby code watches the stellar core database for new closed ledgers and then transforms that new data into db rows in the history schema
[16:26] <stellar-slack> By the way, as far as I see in ruby-horizon repo, there is no "CREATE DATABASE hayashi-development" string there, but hayashi_test. Are they equal?
[16:28] <stellar-slack> That document assumes that you created hayashi_development as part of setting up stellar-core.
[16:28] <stellar-slack> hayashi_test is just used if you need to run the test suite
[16:29] <stellar-slack> I mean horizon, not hayashi
[16:29] <stellar-slack> Sorry
[16:29] <stellar-slack> the previous command: `rake db:create && RAILS_ENV=test rake db:create` creates the horizon databases, both development and test
[16:31] <stellar-slack> Can the ruby-horizon currently do, for example, submit transaction request?
[16:33] <stellar-slack> Its API says that i need a strange data_binary parameter. And also some of requests described in API doesnt work. Im trying to figure out if I do something wrong or it is not ready.
[16:36] <stellar-slack> yes, ruby-horizon can submit transactions to the network. You can read about the endpoint here: http://stellar.github.io/go-horizon/endpoint/transactions_create/
[16:37] <stellar-slack> That reference doc is a bit out of date, but the input parameters and the url are the same
[16:40] <stellar-slack> The fact is I have a lot of exceptions while testing and starting ruby-horizon and its difficult to figure out what's wrong
[16:40] <stellar-slack> Go-horizon works correct but it is not enough to work with stellar-core:pensive:
[16:41] <stellar-slack> yep, I totally understand it’s frustrating to learn at present, and I apologize. Our goal is not to keep it that way.
[16:43] <stellar-slack> @naumenkogs absolutely :S just so you know, we're all working towards making Stellar easier for developers. You can track our progress on the public roadmap, if you're interested https://trello.com/c/8PSRgQXl/58-project-endeavour-improve-developer-experience
[16:44] <stellar-slack> and to second Scott, sorry that it's such a frustrating experience right now
[16:44] <stellar-slack> You have a perfect feedback here and I hope the new stellar-core will be developed in a same way.
[16:46] <stellar-slack> :) happy to help
About StellarVerse IRC Logger
StellarValue IRC Logger
is part of