Logged Conversation (all times UTC)
[01:18] <stellar-slack> noooo
[01:18] <stellar-slack> Unfortunately the domain name http://core.jp|core.jp is not available to register. Occasionally our registration system does not correctly detect if a domain name already exists. In some circumstances, the domain name may appear on a non-published reserved/banned list, and for this reason, it may appear that the domain name is technically available to register.
[01:19] <stellar-slack> f**k x)
[01:20] <stellar-slack> need new domain!
[01:34] <stellar-slack> mhhh so what would be the easiest way to externalize changes on the stellar network in real-time to a nodejs process?
[01:52] <stellar-slack> triggers on the postgres db?
[02:42] <stellar-slack> well I use sqlite but if you setup with postgres that should work
[02:44] <stellar-slack> my local steller-core still shows as "state" : "Synced!" so that sounds good
[02:46] <stellar-slack> is that you? ^^
[02:47] <stellar-slack> http://stellar.ddns.net|stellar.ddns.net should be the same
[02:47] <stellar-slack> hehe funny
[02:49] <stellar-slack> yup that checks out
[02:49] <stellar-slack> oh you see me as a node?
[02:52] <stellar-slack> yeah
[02:52] <stellar-slack> ok how do I setup postgresql with rake? as this psql postgres -c "l" shows it's working with no password
[02:53] <stellar-slack> some step I must have missed here
[02:53] <stellar-slack> this is to install horizon on my local system
[02:55] <stellar-slack> Couldn't create database for {"adapter"=>"postgresql", "database"=>"horizon_development", "host"=>"localhost"}
[03:11] <stellar-slack> @matschaffer: so you'll be in at the meetup today? :)
[03:13] <stellar-slack> @sacarlson: seeing horizon is just a rails app, did you try rake db:create ?
[03:13] <stellar-slack> even after changing my postgresql password and editing config/database.yml file with my username and password still get that error
[03:13] <stellar-slack> yes that's what that error comes from above
[03:14] <stellar-slack> so it's some rake setup problem I have I guess
[03:14] <stellar-slack> rake db:create --verbose
[03:14] <stellar-slack> it already spits out alot
[03:15] <stellar-slack> i don't think there is a problem with rake
[03:15] <stellar-slack> what happens when you attempt to start the server
[03:16] <stellar-slack> says no password but I set it in that config file
[03:16] <stellar-slack> post your config file
[03:17] <stellar-slack> @buhrmi: nah, I'm headed to Takayama tomorrow & Nagoya friday so gonna hunker down and get some work done today
[03:24] <stellar-slack> @sacarlson: that's a weird config file. is that in the horizon repo?
[03:24] <stellar-slack> the examples I'm looking at here: https://www.digitalocean.com/community/tutorials/how-to-setup-ruby-on-rails-with-postgres don't show any url: maybe I'll just delete those lines
[03:24] <stellar-slack> yes it's the same repo now running on horizon per matschaffer
[03:25] <stellar-slack> try this config
[06:20] <stellar-slack> gonna compile again, maybe they updated the nodes
[06:23] <stellar-slack> looks like b179493
[06:24] <stellar-slack> master is af2e1db so might want to see if b179493 works better. I haven't seen any alerts about testnet losing sync with itself
[06:24] <stellar-slack> so in theory b179493 should be able to hold sync, granted there could be some cross-internet thing at play here too
[06:25] <stellar-slack> ¯_(ツ)_/¯
[06:26] <stellar-slack> can you spot the change the commit message is talking about https://github.com/stellar/stellar-core/commit/faba645308994c47d272373a9bcdc8dc10bec5f6
[06:26] <stellar-slack> LOL!
[06:32] <stellar-slack> not really - that's a massive commit
[06:37] <stellar-slack> k, synced again ... seems like a db reset did the job
[07:11] <stellar-slack> ha ... found the reason
[07:12] <stellar-slack> having a trigger function on the ledgerheader table causes stellar-core to go out of sync and "reboot" when trying to close the ledger
[07:12] <stellar-slack> don't know why, tho
[07:16] <stellar-slack> interesting
[07:16] <stellar-slack> what's the function doing? stellar-core expects to have pretty fast access to the database
[07:17] <stellar-slack> in production psql is on the same instance and (I believe) connected via unix socket
[07:17] <stellar-slack> at least I'm pretty sure the delivery pipeline does it that way. Not sure about testnet
[07:20] <stellar-slack> it notifies connected clients who listen for trigger ... yeah i think this might introduce a lot of delay
[07:20] <stellar-slack> that'd probably do it
[07:21] <stellar-slack> I think that's sort of what gave rise to go-horizon btw
[07:21] <stellar-slack> since golang made it easier than ruby to stream events out
[07:52] <stellar-slack> after I fill in some of the values in the .rbenv-vars file I now see this
[07:53] <stellar-slack> so is this the error NoMethodError: undefined method `tr' for nil:NilClass
[07:54] <stellar-slack> ?
[08:06] <stellar-slack> i dunno, maybe try a new database.yml file
[08:06] <stellar-slack> I tried many
[08:08] <stellar-slack> I'm more used to mysql and sqlite never used postgresqrl stuf before
[08:12] <stellar-slack> I guess what I have to do is create a new test app that sets up a simple rake db and see if that works first
[08:12] <stellar-slack> at least then I will better understand how it operates
[08:13] <stellar-slack> oh I forgot to ask the #rake guys also
[08:13] <stellar-slack> wooohoo http://open-core.meteor.com
[08:13] <stellar-slack> live updates via Meteor DDP :)
[08:14] <stellar-slack> all I can tell you is that it works
[08:14] <stellar-slack> only thing that currently updates tho are the ledger close times
[08:15] <stellar-slack> with websockets ^^
[08:15] <stellar-slack> I don't even know what a websocket is but...
[08:16] <stellar-slack> I would just set the header to update every 2 secounds
[08:17] <stellar-slack> i'm not in control of that :S
[08:17] <stellar-slack> the SCP is..
[08:18] <stellar-slack> so that's what was making your stellar-core crash ?
[08:18] <stellar-slack> i had a faulty trigger on a postgres table
[08:19] <stellar-slack> and this triger sends events to js?
[08:20] <stellar-slack> so what i did was
[08:21] <stellar-slack> 1. add a trigger to the ledgerheaders table that notifies a channel when there are update, 2. listen to that channel with nodejs, 3. when there are changes, send the changes via DDP to clients viewing http://open-core.meteor.com
[08:21] <stellar-slack> now it works
[08:21] <stellar-slack> cool so what can we use that for?
[08:22] <stellar-slack> visualize transactions, peers, etc...
[08:22] <stellar-slack> wanna continue to work on it tomorrow
[08:22] <stellar-slack> I guess if looking at the correct table you could see changes in a price of an asset in more real time
[08:23] <stellar-slack> would that also work on sqlite these events?
[08:23] <stellar-slack> no
[08:24] <stellar-slack> on mysql?
[08:24] <stellar-slack> i don't know :P
[08:24] <stellar-slack> well bummer it don't work on sqlite as now I have to poll the database for changes and I only do that every 2 sec
[08:25] <stellar-slack> near real time for me but better if event driven
[08:26] <stellar-slack> yeah if u use postgres u can do event driven
[08:26] <stellar-slack> well that's good to know, when the time comes I may put that to use
[08:26] <stellar-slack> so back to the question: "what can we use it for"
[08:27] <stellar-slack> for example
[08:27] <stellar-slack> I already gave you an example
[08:27] <stellar-slack> your pokerchip transactions could show up on that site
[08:27] <stellar-slack> filter by "10 recent pokerchips"
[08:28] <stellar-slack> not sure we need that in realtime but a market moves in realtime so price changes is what it would be best for in trading
[08:29] <stellar-slack> I'm still trying to think of a multi sign contract method for poker
[08:30] <stellar-slack> it starts with 10 people in a game so a contract with even wait for each signs an account with the pot
[08:31] <stellar-slack> this is awesome
[08:31] <stellar-slack> when someone drops out from loss of all his chips then a new contract is auto created with the nine left in the game that create a new contract and send the funds that they now control to the new account
[08:32] <stellar-slack> the problem is when you get down to the last 2 people in the game
[08:32] <stellar-slack> yeah i don't know much about poker
[08:32] <stellar-slack> it not poke it a contract thing
[08:33] <stellar-slack> like stock holders in a corporation have votes to control events in the corporation
[08:33] <stellar-slack> you have more wait if you hold more assets in the corporation
[08:34] <stellar-slack> if a majority don't like someone on the board they can vote him out
[08:34] <stellar-slack> that's how the multi sign contracts also work
[08:36] <stellar-slack> but I'm a bit stuck when there are only 2 people left in the game or left on the board
[08:39] <stellar-slack> check it out http://open-core.meteor.com .. added transactions and peer info :)
[08:40] <stellar-slack> maybe when down to the last 2 people in the game the last 3rd person that was last to loose becomes the third party that acts as the witness
[08:40] <stellar-slack> only 1 transaction is shown
[08:41] <stellar-slack> yeah it only shows the transactions that my node has seen since db reset
[08:41] <stellar-slack> but I guess that's all your core has seen from start?
[08:41] <stellar-slack> ok
[08:41] <stellar-slack> gonna send u another tx
[08:41] <stellar-slack> lets see
[08:41] <stellar-slack> hay wonder if it will also see my errors from attempted transactions?
[08:42] <stellar-slack> ok
[08:42] <stellar-slack> I don't think the database shows failed transactions, I think only seen maybe in the logs
[08:43] <stellar-slack> hay I can see me Address:
[08:44] <stellar-slack> I only show 6 peers on my core
[08:44] <stellar-slack> @buhrmi: coolio!
[08:46] <stellar-slack> so who's the gateway for the sausages and BEER
[08:46] <stellar-slack> then you can start looking at trading
[08:47] <stellar-slack> @sacarlson: have you had a look at https://github.com/stellar/horizon/blob/master/doc/developing.md ?
[08:48] <stellar-slack> remember to set these env variables:
[08:48] <stellar-slack> export DATABASE_URL="postgres://postgres:password@localhost:5432/horizon?sslmode=disable" export STELLAR_CORE_DATABASE_URL="postgres://postgres:password@localhost:5432/stellar?sslmode=disable" export IMPORT_HISTORY=true
[08:49] <stellar-slack> change the username and password accordingly
[08:49] <stellar-slack> make sure the postgres version is at least 9.4
[08:50] <stellar-slack> follow the steps at http://www.postgresql.org/download/linux/ubuntu/
[08:50] <stellar-slack> yes I read that fredolafritte but stuck at this point rake db:create && RAILS_ENV=test rake db:create
[08:50] <stellar-slack> I filled in those values in .rbenv-var
[08:51] <stellar-slack> oh but not like that I didn't cool
[08:51] <stellar-slack> try to add them in *.bashrc*
[08:52] <stellar-slack> ya I could have them set in a script maybe
[08:52] <stellar-slack> but it looks like the values are passed from .rbenv-var I think I just didn't know what to put in the values
[08:55] <stellar-slack> I checked and I do have postgres server 9.3 installed
[08:55] <stellar-slack> so I need 9.4
[09:01] <stellar-slack> with your added values I now get: URI::InvalidURIError: bad URI(is not URI?): "postgres://sacarlson:scottc@localhost:5432/horizon?sslmode=disable"
[09:02] <stellar-slack> so I guess I'll see what's needed to upgrade to 9.4
[09:04] <stellar-slack> it's not related to 9.3 or 9.4
[09:04] <stellar-slack> something else I did?
[09:06] <stellar-slack> horizon gives you this error ?
[09:06] <stellar-slack> I get it from this rake db:create
[09:08] <stellar-slack> maybe on the command line that's incomplete? should be rake db:create && rake db:migrate
[09:08] <stellar-slack> ?
[09:09] <stellar-slack> this from the root of horizon with all setup as told to do in developing.md
[09:12] <stellar-slack> have you tried *./bin/setup* ?
[09:13] <stellar-slack> yes
[09:13] <stellar-slack> I'm running the present commit that is now running on stellar
[09:14] <stellar-slack> http://stellar.org|stellar.org
[09:14] <stellar-slack> of horizon
[09:17] <stellar-slack> might I look at what your database.yml file looks like and all the settings of ENV (other than your passwords of course)?
[09:17] <stellar-slack> @fredolafritte:
[09:18] <stellar-slack> another think I could try is your commit version to see if that works here
[09:21] <stellar-slack> the only settings is the 3 env var stated above, no need to modify *database.yml*
[09:22] <stellar-slack> well my version of database.yml may not be the same
[09:42] <stellar-slack> the ruby version required is 2.2.0
[09:43] <stellar-slack> yes
[09:43] <stellar-slack> forget about any other version
[09:43] <stellar-slack> ruby -v ?
[09:44] <stellar-slack> ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
[09:44] <stellar-slack> got the same
[09:44] <stellar-slack> maybe just a bad install
[09:45] <stellar-slack> can you try with *export DATABASE_URL="postgres://postgres:password@localhost:5432/horizon?sslmode=disable"*
[09:45] <stellar-slack> ?
[09:45] <stellar-slack> sure I can try but I assume I would have to rename .rbenv-var that assume would superceed it
[09:48] <stellar-slack> ok I renamed .rbenv-var and ran again without your export to see what it would do now I see this
[09:51] <stellar-slack> so this must be good!! no?
[09:56] <stellar-slack> so went ahead and ran ./bin/setup and it looks like it might have ran ok
[10:00] <stellar-slack> so I wrote a source_me.sh that I would assume I would have to source ./source_me.sh ; every time I ran horizon
[10:00] <stellar-slack> that has your exports above in it
[10:00] <stellar-slack> I did the same
[10:00] <stellar-slack> cool you are again the man
[10:01] <stellar-slack> you're ready for the next hurdle
[10:01] <stellar-slack> :)
[10:02] <stellar-slack> ya more errors to come I'm sure ha ha
[10:02] <stellar-slack> it's part of the game
[10:02] <stellar-slack> yup
[10:02] <stellar-slack> bear in mind you would also need go-horizon ...
[10:03] <stellar-slack> can't I run without go-horizon?
[10:07] <stellar-slack> some of the functionalities are in horizon, some others in go-horizon
[10:07] <stellar-slack> go-horizon will forward its unimplemented requests to horizon
[10:08] <stellar-slack> still wondering why they rewrite ruby-horizon in go-horizon ...
[10:12] <stellar-slack> it's also not passing bundle exec rspec lots of errors one being StandardError: An error has occurred, this and all later migrations canceled: PG::UndefinedFile: ERROR: could not open extension control file "/usr/share/postgresql/9.3/extension/hstore.control": No such file or directory : CREATE EXTENSION IF NOT EXISTS "hstore"/home/sacarlson/.bundle/gems/activerecord-4.2.1/lib/active_record/connection_ada
[10:12] <stellar-slack> `async_exec'
[10:13] <stellar-slack> might be easier to write my own horizon. it seems it does almost nothing anyway
[10:13] <stellar-slack> that's the 9.3/9.4 version postgres issue
[10:13] <stellar-slack> beware to remove first the 9.3
[10:16] <stellar-slack> ok thanks I'll try upgrade it then
[17:22] <stellar-slack> If anyone wants to reviews some ruby for horizon: https://github.com/stellar/horizon/pull/41
[17:41] <stellar-slack> is it just me or is the number of participating testnet nodes suddenly increasing a lot?
[17:43] <stellar-slack> To the moooon
[18:38] <stellar-slack> @scott gave what feedback I could :). I've been working on getting go-horizon running. Hopefully I will be able to be helpful soon :bowtie:
[18:39] <stellar-slack> @mason: I just saw that. Thanks!
[18:40] <stellar-slack> If you’ve got any questions along the way, please feel free to ask; Things are still definitely rough around the corners.
[18:42] <stellar-slack> Cool will do!
[18:42] <stellar-slack> @mason: would love to hear more about what you're working on :)
[18:44] <stellar-slack> Just interested in helping wherever I can
[18:51] <stellar-slack> I’ll probably look through the issue tracker on go-horizon once I get it up and running. Let me know if something else would be more valuable!
[18:51] <stellar-slack> I should probably get back to work now though haha :S
[18:51] <stellar-slack> :) cheers
[18:51] <stellar-slack> awesome, that's so great to hear @mason! We could certainly use the help
[18:51] <stellar-slack> have a great day at work :)
[18:52] <stellar-slack> thanks! Yeah looking forward to it!
About StellarVerse IRC Logger
StellarValue IRC Logger
is part of